Skip to content

Commit

Permalink
修复由于 dlsite api 部分旧作品的没有 "creaters" 数据造成的 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yodhcn committed Jan 2, 2023
1 parent 9a0f35b commit 5af74f7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scraper/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,9 @@ def __scrape_metadata_from_product_api(self, rjcode: str):
for genre in product_info['genres']:
metadata['tags'].append(genre['name'])
# cvs
for cv in product_info['creaters']['voice_by']:
metadata['cvs'].append(cv['name'])
if isinstance(product_info['creaters'], dict):
for cv in product_info['creaters']['voice_by']:
metadata['cvs'].append(cv['name'])

# age_category
if product_info['age_category'] == 1:
Expand Down

0 comments on commit 5af74f7

Please sign in to comment.