diff --git a/scraper/scraper.py b/scraper/scraper.py index 9e361d4..dd4006d 100644 --- a/scraper/scraper.py +++ b/scraper/scraper.py @@ -76,8 +76,8 @@ def __parse_metadata(self, html: str, rjcode: str): 'maker_id': '', 'maker_name': '', 'release_date': '', - 'series_name': '', - 'series_id': '', + 'series_name': None, + 'series_id': None, 'age_category': '', 'tags': [], 'cvs': [], @@ -184,7 +184,7 @@ def __scrape_metadata_from_product_api(self, rjcode: str): for genre in product_info['genres']: metadata['tags'].append(genre['name']) # cvs - if isinstance(product_info['creaters'], dict): + if isinstance(product_info['creaters'], dict) and 'voice_by' in product_info['creaters']: for cv in product_info['creaters']['voice_by']: metadata['cvs'].append(cv['name'])