Skip to content

Commit

Permalink
Fix: source not found in scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdctop committed Feb 3, 2023
1 parent db35986 commit f9a613e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ def get_data_from_json(

# ================================================网站规则添加结束================================================

if json_data.get('title') == '':
print('[-]Movie Number or Title not found!')
return None

title = json_data.get('title')
actor_list = str(json_data.get('actor')).strip("[ ]").replace("'", '').split(',') # 字符串转列表
actor_list = [actor.strip() for actor in actor_list] # 去除空白
Expand Down Expand Up @@ -139,11 +143,6 @@ def get_data_from_json(
else:
actor = str(actor_list).strip("[ ]").replace("'", '').replace(" ", '')

if title == '' or number == '':
if json_data['source'] != 'pissplay': # pissplay 没有番号
print('[-]Movie Number or Title not found!')
return None

# if imagecut == '3':
# DownloadFileWithFilename()

Expand Down

0 comments on commit f9a613e

Please sign in to comment.