From acd3e7a1ef15bb439db3904a61c49a38f92f8a7e Mon Sep 17 00:00:00 2001 From: omg-xtao <100690902+omg-xtao@users.noreply.github.com> Date: Tue, 7 Jun 2022 23:00:19 +0800 Subject: [PATCH] =?UTF-8?q?resou=20weather=20=E4=BF=AE=E5=A4=8D=E9=94=99?= =?UTF-8?q?=E8=AF=AF=20(#12)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- list.json | 4 ++-- resou/main.py | 6 +++--- weather/main.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/list.json b/list.json index 12b6344..baf20cf 100644 --- a/list.json +++ b/list.json @@ -132,7 +132,7 @@ }, { "name": "weather", - "version": "1.111", + "version": "1.112", "section": "daily", "maintainer": "xtaodada", "size": "3.1 kb", @@ -142,7 +142,7 @@ }, { "name": "resou", - "version": "1.221", + "version": "1.222", "section": "daily", "maintainer": "KorenKrita、xtaodada、monsterxcn", "size": "2.5 kb", diff --git a/resou/main.py b/resou/main.py index 39825c8..ef6b74c 100644 --- a/resou/main.py +++ b/resou/main.py @@ -7,7 +7,7 @@ from pagermaid.utils import Message, client @listener(command="zhrs", description="知乎热搜。") async def zhrs(_: Client, message: Message): - req = await client.get("https://tenapi.cn/zhihuresou") + req = await client.get("https://tenapi.cn/zhihuresou/") if req.status_code == 200: try: data = req.json() @@ -25,7 +25,7 @@ async def zhrs(_: Client, message: Message): @listener(command="wbrs", description="微博热搜。") async def wbrs(_: Client, message: Message): - req = await client.get("https://tenapi.cn/resou") + req = await client.get("https://tenapi.cn/resou/") if req.status_code == 200: try: data = req.json() @@ -44,7 +44,7 @@ async def wbrs(_: Client, message: Message): @listener(command="dyrs", description="抖音热搜。") async def dyrs(_: Client, message: Message): - req = await client.get("https://tenapi.cn/douyinresou") + req = await client.get("https://tenapi.cn/douyinresou/") if req.status_code == 200: try: data = req.json() diff --git a/weather/main.py b/weather/main.py index 4d95793..98338bb 100644 --- a/weather/main.py +++ b/weather/main.py @@ -40,7 +40,7 @@ def calcWindDirection(windDirection): description="查询天气", parameters="<城市>") async def weather(_: Client, message: Message): - of not message.arguments: + if not message.arguments: return await message.edit("出错了呜呜呜 ~ 无效的参数。") try: req = await client.get(