chore: try new xpath for anthem

This commit is contained in:
2022-06-24 02:14:45 +01:00
parent 4b305f757c
commit 0bd759a002
3 changed files with 78 additions and 110 deletions

View File

@@ -97,5 +97,5 @@ FEEDS = {
/ "data"
/ "scrapy"
/ "raw_country_data"
/ "countries.json": {"format": "json", "encoding": "utf8", "store_empty": True}
/ "countries.json": {"format": "json", "encoding": "utf8", "store_empty": False}
}

View File

@@ -50,7 +50,7 @@ class CountrydownloaderSpider(scrapy.Spider):
).get()
anthem_page_url = response.xpath(
"//table[contains(@class, 'infobox')]/tbody/tr/td[contains(@class, 'anthem')]/a/@href"
"//table[contains(@class, 'infobox')]/tbody/tr/td[contains(@class, 'anthem')]//span[contains(@class, 'audio')]/a/@href"
).get()
country_item = {