Skip to content

Commit

Permalink
fix: url缺少最后的/导致崩溃
Browse files Browse the repository at this point in the history
  • Loading branch information
shing-yu committed Jan 17, 2024
1 parent ed529d1 commit 7abd385
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,17 +274,17 @@ def get_parameter(retry):
try:
if page_url.isdigit():
book_id = page_url
page_url = "https://www.qimao.com/shuku/" + book_id
page_url = "https://www.qimao.com/shuku/" + book_id + "/"
break

elif "www.qimao.com/shuku/" in page_url:
book_id = re.search(r"www.qimao.com/shuku/(\d+)", page_url).group(1)
page_url = "https://www.qimao.com/shuku/" + book_id
page_url = "https://www.qimao.com/shuku/" + book_id + "/"
break # 如果是正确的链接,则退出循环

elif "app-share.wtzw.com" in page_url:
book_id = re.search(r"article-detail/(\d+)", page_url).group(1)
page_url = "https://www.qimao.com/shuku/" + book_id
page_url = "https://www.qimao.com/shuku/" + book_id + "/"
break
else:
print(Fore.YELLOW + Style.BRIGHT + "请输入正确的小说目录页面或手机端分享链接(或书籍ID)")
Expand Down

0 comments on commit 7abd385

Please sign in to comment.