Skip to content

Commit

Permalink
第八章终幕
Browse files Browse the repository at this point in the history
  • Loading branch information
lyy289065406 committed Jun 11, 2024
1 parent 3a46902 commit d91efb0
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions py/crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ def save_page(args, uri, html_title) :

# 解析 html 标题获取必要参数
grps = re.findall(r'(\D+?)(\d*)([a-z]?) (.+)', html_title)[0]
chapter = grps[0]
idx1 = grps[1]
idx2 = grps[2]
chapter = grps[0].strip()
idx1 = grps[1].strip()
idx2 = grps[2].strip()
chapter_idx = "%s%s" % (idx1, "" if not idx2 else ("-" + idx2))
chapter_idx = chapter_idx if chapter_idx else ('%i' % time.time()) # 若无分节编号,则使用时间戳代替
chapter_title = grps[3]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d91efb0

Please sign in to comment.