Fix: Data analysis in API

This commit is contained in:
yoshiko2
2023-02-03 06:13:57 +08:00
parent 3b42a17dbf
commit db35986f87
2 changed files with 3 additions and 6 deletions

View File

@@ -100,11 +100,8 @@ def get_data_from_json(
# ================================================网站规则添加结束================================================ # ================================================网站规则添加结束================================================
title = json_data.get('title') title = json_data.get('title')
if json_data['source'] =='pissplay': # pissplay actor为英文名不用去除空格 actor_list = str(json_data.get('actor')).strip("[ ]").replace("'", '').split(',') # 字符串转列表
actor_list = [json_data.get('actor')] actor_list = [actor.strip() for actor in actor_list] # 去除空白
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') director = json_data.get('director')
release = json_data.get('release') release = json_data.get('release')
number = json_data.get('number') number = json_data.get('number')

View File

@@ -76,7 +76,7 @@ class Pissplay(Parser):
else: else:
return [tags[0]] return [tags[0]]
else: else:
return 'Bruce and Morgan' return ['Bruce and Morgan']
def getOutline(self, htmltree): def getOutline(self, htmltree):
outline = self.getTreeAll(htmltree, self.expr_outline) outline = self.getTreeAll(htmltree, self.expr_outline)