Skip to content

Commit

Permalink
测试
Browse files Browse the repository at this point in the history
  • Loading branch information
Agnes4m committed Feb 20, 2024
1 parent 853782b commit 5ef237b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions nonebot_plugin_bilifan/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import shutil
from pathlib import Path
from typing import List

# import aiohttp
from nonebot import get_driver, on_command, require
Expand Down Expand Up @@ -30,7 +31,7 @@


driver = get_driver()
__version__ = "0.3.0"
__version__ = "0.3.3"
__plugin_meta__ = PluginMetadata(
name="bilifan",
description="b站粉丝牌~",
Expand Down Expand Up @@ -112,7 +113,7 @@ async def _(matcher: Matcher, event: Event):
else:
logger.info(msg_path)
await matcher.finish("你尚未登录,请输入【b站登录】")
messageList = await mains(msg_path.parent)
messageList:List[str] = await mains(msg_path.parent)
message_str = "\n".join(messageList)
await matcher.finish(message_str)
except (FileNotFoundError, SystemExit):
Expand Down Expand Up @@ -186,3 +187,4 @@ async def _():
)
except Exception:
logger.warning("定时任务已存在")
logger.warning("定时任务已存在")
2 changes: 1 addition & 1 deletion nonebot_plugin_bilifan/login/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ async def get_tv_qrcode_url_and_auth_code():
# headers={"Content-Type": "application/x-www-form-urlencoded"},
) as resp:
resp_data = await resp.json()
print(resp_data)
code = resp_data["code"]
if code == 0:
login_url = resp_data["data"]["url"]
Expand All @@ -73,6 +72,7 @@ async def verify_login(login_key: str, data_path: Path):
if resp.status != 200:
raise Exception("Failed to connect to server")
response_dict = await resp.json()
print("验证模式")
print(response_dict)
url = response_dict["data"]["url"]
access_key = response_dict["data"]["refresh_token"]
Expand Down
2 changes: 1 addition & 1 deletion nonebot_plugin_bilifan/src/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ async def likeInteractV3(self, room_id: int, up_id: int, self_uid: int):
"click_time": 1,
"room_id": room_id,
"anchor_id": up_id,
"uid": up_id,
"uid": self_uid,
}
self.headers.update(
{
Expand Down

0 comments on commit 5ef237b

Please sign in to comment.