From 65e6945e1e370e504d4f86d470c1a60de86dbeeb Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Tue, 7 Jan 2025 14:11:10 -0500 Subject: [PATCH] fix(poland_digiwhist): The usual URL is 404 --- .../spiders/government_transparency_institute_base.py | 5 +++-- kingfisher_scrapy/spiders/poland_digiwhist.py | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/kingfisher_scrapy/spiders/government_transparency_institute_base.py b/kingfisher_scrapy/spiders/government_transparency_institute_base.py index 5f488906d..7626ab1f0 100644 --- a/kingfisher_scrapy/spiders/government_transparency_institute_base.py +++ b/kingfisher_scrapy/spiders/government_transparency_institute_base.py @@ -19,9 +19,10 @@ class GovernmentTransparencyInstituteBase(CompressedFileSpider): data_type = 'release_package' # Local - base_url = 'https://opentender.eu/data/downloads/data-{}-ocds-json.zip' + base_url = 'https://opentender.eu/data/downloads/data-{}-{}-json.zip' + infix = 'ocds' # country_code must be provided by subclasses. def start_requests(self): - yield self.build_request(self.base_url.format(self.country_code), formatter=components(-1)) + yield self.build_request(self.base_url.format(self.country_code, self.infix), formatter=components(-1)) diff --git a/kingfisher_scrapy/spiders/poland_digiwhist.py b/kingfisher_scrapy/spiders/poland_digiwhist.py index 9fd614056..bedd86116 100644 --- a/kingfisher_scrapy/spiders/poland_digiwhist.py +++ b/kingfisher_scrapy/spiders/poland_digiwhist.py @@ -4,3 +4,4 @@ class PolandDigiwhist(GovernmentTransparencyInstituteBase): name = 'poland_digiwhist' country_code = 'pl' + infix = 'json' # https://opentender.eu/pl/download