Skip to content

Commit

Permalink
Merge pull request #1249 from noahzark/patch-3
Browse files Browse the repository at this point in the history
修复B站转发卡片BUG
  • Loading branch information
HibiKier authored Feb 5, 2023
2 parents d2cf18e + 5ddfd2b commit 4d133ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/parse_bilibili_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async def _(event: GroupMessageEvent):
data = None
if data:
# 转发视频
if data.get("desc") == "哔哩哔哩":
if data.get("desc") == "哔哩哔哩" or data.get('prompt').find('哔哩哔哩') != -1:
async with aiohttp.ClientSession(
headers=get_user_agent()
) as session:
Expand All @@ -64,6 +64,8 @@ async def _(event: GroupMessageEvent):
timeout=7,
) as response:
url = str(response.url).split("?")[0]
if url[-1] == '/':
url = url[:-1]
bvid = url.split("/")[-1]
vd_info = await video.get_video_base_info(bvid)
# 转发专栏
Expand Down

0 comments on commit 4d133ed

Please sign in to comment.