diff --git a/01_scrapy/wikipedia_country_scraper/wikipedia_country_scraper/spiders/anthems.py b/01_scrapy/wikipedia_country_scraper/wikipedia_country_scraper/spiders/anthems.py index c4cdedf..6fc9fa2 100644 --- a/01_scrapy/wikipedia_country_scraper/wikipedia_country_scraper/spiders/anthems.py +++ b/01_scrapy/wikipedia_country_scraper/wikipedia_country_scraper/spiders/anthems.py @@ -60,6 +60,7 @@ class AnthemsSpider(scrapy.Spider): anthem_item["country_name"] = country_name anthem_item["native_anthem_title"] = native_anthem_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