Skip to content

Commit

Permalink
Merge pull request #15 from LeoWrDeom/patch-1
Browse files Browse the repository at this point in the history
update__init__:修复部分情况分P输入参数可能为0
  • Loading branch information
zhiyu1998 authored Oct 9, 2024
2 parents 443e760 + 51186a2 commit 7d85a39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nonebot-plugin-resolver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ async def bilibili(bot: Bot, event: Event) -> None:
# 解析查询字符串中的参数
query_params = parse_qs(parsed_url.query)
# 获取指定参数的值,如果参数不存在,则返回None
page_num = int(query_params.get('p', [0])[0]) - 1
page_num = int(query_params.get('p', [1])[0]) - 1
else:
page_num = 0
if 'duration' in video_info['pages'][page_num]:
Expand Down

0 comments on commit 7d85a39

Please sign in to comment.