Skip to content

Commit

Permalink
fix(re): 修复正则表达式的 r 标志
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanyang17 committed Feb 21, 2021
1 parent 574c207 commit 4131633
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Binary file modified __pycache__/utils.cpython-37.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ def get_input():
js_res = auth_get(js_url, session, username, password)
print(js_url)
s = str(js_res.content, js_res.apparent_encoding)
page_now = int(re.search('totalPageCount=(\d+)', s).group(1))
page_now = int(re.search(r'totalPageCount=(\d+)', s).group(1))
if book_name == '':
book_name = re.search('bookConfig.bookTitle="(\d+)"', s).group(1)
book_name = re.search(r'bookConfig.bookTitle="(\d+)"', s).group(1)
print(book_name, page_now)
print('Chapter: %d' % (ind + 1))
img_fmt = get_fmt(url, img_relpath, candi_fmts, session, username, password) # 获取图片格式
Expand Down

0 comments on commit 4131633

Please sign in to comment.