Skip to content

Commit

Permalink
Update number_parser.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Feng4 authored Dec 19, 2020
1 parent 86db4b1 commit 7af0951
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion number_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ def get_number(debug,filepath: str) -> str:
file_number = re.search(r'\w+-\w+', filename, re.A).group()
return file_number
else: # 提取不含减号-的番号,FANZA CID
# 欧美番号匹配规则
oumei = re.search(r'[a-zA-Z]+\.\d{2}\.\d{2}\.\d{2}', filepath)
if oumei:
return oumei.group()

try:
return str(
re.findall(r'(.+?)\.',
Expand All @@ -72,4 +77,4 @@ def get_number(debug,filepath: str) -> str:

# if __name__ == "__main__":
# import doctest
# doctest.testmod(raise_on_error=True)
# doctest.testmod(raise_on_error=True)

0 comments on commit 7af0951

Please sign in to comment.