From a76339a3fd8237837b5f5cf055840b5e166fd311 Mon Sep 17 00:00:00 2001 From: nativaldezt Date: Tue, 17 Nov 2020 11:31:30 -0300 Subject: [PATCH] Fix data_type, date range option is removed because api ignores it --- kingfisher_scrapy/spiders/spain_zaragoza.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/kingfisher_scrapy/spiders/spain_zaragoza.py b/kingfisher_scrapy/spiders/spain_zaragoza.py index 86ca1c15b..c133c7c30 100644 --- a/kingfisher_scrapy/spiders/spain_zaragoza.py +++ b/kingfisher_scrapy/spiders/spain_zaragoza.py @@ -21,21 +21,12 @@ class SpainZaragoza(SimpleSpider): https://www.zaragoza.es/docs-api_sede/ """ name = 'spain_zaragoza' - data_type = 'release_list' - date_format = 'datetime' - default_from_date = '2000-01-01T00:00:00' + data_type = 'release_package' url = 'https://www.zaragoza.es/sede/servicio/contratacion-publica/ocds/contracting-process/' def start_requests(self): # row parameter setting to 100000 to get all releases - url = self.url + '?rf=html&rows=100000' - - # check date parameters and set "yyyy-MM-dd'T'HH:mm:ss'Z'" format - if self.from_date and self.until_date: - # `before` and `after` query string parameters behave opposite in API - after = self.until_date.strftime("%Y-%m-%dT%H:%M:%SZ") - before = self.from_date.strftime("%Y-%m-%dT%H:%M:%SZ") - url = f'{url}&before={before}&after={after}' + url = f'{self.url}?rf=html&rows=100000' yield scrapy.Request(url, meta={'file_name': 'list.json'}, callback=self.parse_list)