From f9a613e2225e77d447cacd9b8ec282568f1026ee Mon Sep 17 00:00:00 2001 From: yoshiko2 Date: Fri, 3 Feb 2023 21:16:55 +0800 Subject: [PATCH] Fix: source not found in `scraper.py` --- scraper.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scraper.py b/scraper.py index 91fb89465..40a78bb63 100644 --- a/scraper.py +++ b/scraper.py @@ -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()