chore: dont set file url if anthem is missing
This commit is contained in:
@@ -60,6 +60,7 @@ class AnthemsSpider(scrapy.Spider):
|
|||||||
anthem_item["country_name"] = country_name
|
anthem_item["country_name"] = country_name
|
||||||
anthem_item["native_anthem_title"] = native_anthem_title
|
anthem_item["native_anthem_title"] = native_anthem_title
|
||||||
anthem_item["english_title"] = english_title
|
anthem_item["english_title"] = english_title
|
||||||
anthem_item["file_urls"] = [f"https://en.wikipedia.org{anthem_url}" if anthem_url is not None else None]
|
if anthem_url is not None:
|
||||||
|
anthem_item["file_urls"] = [f"https://en.wikipedia.org{anthem_url}"]
|
||||||
|
|
||||||
yield anthem_item
|
yield anthem_item
|
||||||
|
|||||||
Reference in New Issue
Block a user