Fix: source not found in scraper.py

This commit is contained in:
yoshiko2
2023-02-03 21:16:55 +08:00
parent db35986f87
commit f9a613e222

View File

@@ -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] # 去除空白
@@ -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()