Skip to content

Commit

Permalink
Merge pull request #1047 from open-contracting/lapsed-spiders
Browse files Browse the repository at this point in the history
feat: remove lapsed spiders
  • Loading branch information
yolile authored Jan 9, 2024
2 parents a075e4b + d4400c8 commit 3258ff4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 60 deletions.
1 change: 1 addition & 0 deletions docs/history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Lapsed spiders

This page records the spiders that were available but stopped publishing and therefore where removed from Kingfisher Collect, since January 2022:

- 2024-01-09: `mexico_puebla_itaipue, nigeria_edo_state, <https://github.com/open-contracting/kingfisher-collect/pull/1047>`__
- 2023-10-04: `honduras_cost, kenya_makueni, kyrgyzstan, portugal_bulk <https://github.com/open-contracting/kingfisher-collect/pull/1030>`__
- 2022-12-13: `ecuador_emergency, mexico_oaxaca_iaip, nicaragua_solid_waste, nigeria_budeshi_*, nigeria_kaduna_state_budeshi_*, tanzania_zabuni <https://github.com/open-contracting/kingfisher-collect/pull/979>`__
- 2022-04-20: `afghanistan_*, indonesia_bandung <https://github.com/open-contracting/kingfisher-collect/pull/930>`__
Expand Down
14 changes: 0 additions & 14 deletions docs/spiders.rst
Original file line number Diff line number Diff line change
Expand Up @@ -789,13 +789,6 @@ Mexico
scrapy crawl mexico_nuevo_leon_releases
.. autoclass:: kingfisher_scrapy.spiders.mexico_puebla_itaipue.MexicoPueblaITAIPUE
:no-members:

.. code-block:: bash
scrapy crawl mexico_puebla_itaipue
.. autoclass:: kingfisher_scrapy.spiders.mexico_quien_es_quien_records.MexicoQuienEsQuienRecords
:no-members:

Expand Down Expand Up @@ -934,13 +927,6 @@ Nigeria
scrapy crawl nigeria_ebonyi_state
.. autoclass:: kingfisher_scrapy.spiders.nigeria_edo_state.NigeriaEdoState
:no-members:

.. code-block:: bash
scrapy crawl nigeria_edo_state
.. autoclass:: kingfisher_scrapy.spiders.nigeria_ekiti_state.NigeriaEkitiState
:no-members:

Expand Down
6 changes: 4 additions & 2 deletions 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 @@ -19,8 +19,10 @@ class ArgentinaMendozaProvinceBulk(SimpleSpider):
base_url = 'https://datosabiertos-compras.mendoza.gov.ar'

def start_requests(self):
yield scrapy.Request(f'{self.base_url}/datasets/', callback=self.parse_list)
yield scrapy.Request(f'{self.base_url}/datasets/', meta={'file_name': 'list.html'},
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
24 changes: 0 additions & 24 deletions kingfisher_scrapy/spiders/mexico_puebla_itaipue.py

This file was deleted.

20 changes: 0 additions & 20 deletions kingfisher_scrapy/spiders/nigeria_edo_state.py

This file was deleted.

0 comments on commit 3258ff4

Please sign in to comment.