add pissplay
This commit is contained in:
17
scraper.py
17
scraper.py
@@ -100,8 +100,11 @@ def get_data_from_json(
|
||||
# ================================================网站规则添加结束================================================
|
||||
|
||||
title = json_data.get('title')
|
||||
actor_list = str(json_data.get('actor')).strip("[ ]").replace("'", '').split(',') # 字符串转列表
|
||||
actor_list = [actor.strip() for actor in actor_list] # 去除空白
|
||||
if json_data['source'] =='pissplay': # pissplay actor为英文名,不用去除空格
|
||||
actor_list = [json_data.get('actor')]
|
||||
else:
|
||||
actor_list = str(json_data.get('actor')).strip("[ ]").replace("'", '').split(',') # 字符串转列表
|
||||
actor_list = [actor.strip() for actor in actor_list] # 去除空白
|
||||
director = json_data.get('director')
|
||||
release = json_data.get('release')
|
||||
number = json_data.get('number')
|
||||
@@ -134,11 +137,15 @@ def get_data_from_json(
|
||||
tag.remove('XXXX')
|
||||
while 'xxx' in tag:
|
||||
tag.remove('xxx')
|
||||
actor = str(actor_list).strip("[ ]").replace("'", '').replace(" ", '')
|
||||
if json_data['source'] =='pissplay': # pissplay actor为英文名,不用去除空格
|
||||
actor = str(actor_list).strip("[ ]").replace("'", '')
|
||||
else:
|
||||
actor = str(actor_list).strip("[ ]").replace("'", '').replace(" ", '')
|
||||
|
||||
if title == '' or number == '':
|
||||
print('[-]Movie Number or Title not found!')
|
||||
return None
|
||||
if json_data['source'] != 'pissplay': # pissplay 没有番号
|
||||
print('[-]Movie Number or Title not found!')
|
||||
return None
|
||||
|
||||
# if imagecut == '3':
|
||||
# DownloadFileWithFilename()
|
||||
|
||||
Reference in New Issue
Block a user