Skip to content

Commit

Permalink
Merge branch 'sqzw-x:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
northsea4 authored Feb 22, 2024
2 parents b0f917a + 828e29e commit 8e2488c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/models/crawlers/kin8.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,13 @@ def main(number, appoint_url='', log_info='', req_web='', language='jp'):
debug_info = ''
if real_url:
key = re.findall(r'\d{3,}', real_url)
number = f'KIN8-{key[0]}' if key else number
key = key[0] if key else ""
assert isinstance(key, str)
number = f'KIN8-{key}' if key else number
else:
key = re.findall(r'KIN8(TENGOKU)?-?(\d{3,})', number.upper())
key = key[0][1] if key else ''
assert isinstance(key, str)
if not key:
debug_info = f'番号中未识别到 KIN8 番号: {number} '
log_info += web_info + debug_info
Expand Down Expand Up @@ -201,4 +204,5 @@ def main(number, appoint_url='', log_info='', req_web='', language='jp'):

if __name__ == '__main__':
# yapf: disable
print(main('kin8-3681'))
# print(main('kin8-3681'))
print(main(number="", appoint_url="https://www.kin8tengoku.com/moviepages/1232/index.html"))

0 comments on commit 8e2488c

Please sign in to comment.