Source code for kingfisher_scrapy.spiders.nigeria_ebonyi_state

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

[docs]class NigeriaEbonyiState(PeriodicSpider): """ Domain Ebonyi E-PROCUREMENT Caveats The JSON data sometimes contains unescaped tab characters within strings. Spider arguments from_date Download only data from this year onward (YYYY format). Defaults to '2018'. until_date Download only data until this year (YYYY format). Defaults to the current year. Bulk download documentation """ name = 'nigeria_ebonyi_state' # BaseSpider date_format = 'year' default_from_date = '2018' # PeriodicSpider pattern = '{}.json' formatter = staticmethod(components(-1)) # SimpleSpider data_type = 'release_package' @handle_http_error def parse(self, response): # Replace unescaped tab characters within strings. response = response.replace(body=response.text.replace('\t', ' ')) yield from super().parse(response)