Skip to content

Commit

Permalink
fix: argentina_mendoza add handle_http_error
Browse files Browse the repository at this point in the history
  • Loading branch information
yolile committed Jan 9, 2024
1 parent ac3861e commit e0fb1fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kingfisher_scrapy/spiders/argentina_mendoza_province_bulk.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import scrapy

from kingfisher_scrapy.base_spiders import SimpleSpider
from kingfisher_scrapy.util import components
from kingfisher_scrapy.util import components, handle_http_error


class ArgentinaMendozaProvinceBulk(SimpleSpider):
Expand All @@ -21,6 +21,7 @@ class ArgentinaMendozaProvinceBulk(SimpleSpider):
def start_requests(self):
yield scrapy.Request(f'{self.base_url}/datasets/', callback=self.parse_list)

@handle_http_error
def parse_list(self, response):
for file_url in response.xpath('//div/a/@href').getall():
if file_url.endswith('.json'):
Expand Down

0 comments on commit e0fb1fa

Please sign in to comment.