Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

622 Update mexico inai spider. #677

Merged
merged 3 commits into from
Mar 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions docs/spiders.rst
Original file line number Diff line number Diff line change
Expand Up @@ -701,19 +701,12 @@ Mexico

scrapy crawl mexico_grupo_aeroporto

.. autoclass:: kingfisher_scrapy.spiders.mexico_inai.MexicoINAI
.. autoclass:: kingfisher_scrapy.spiders.mexico_inai_api.MexicoINAIAPI
:no-members:

.. code-block:: bash

scrapy crawl mexico_inai

.. autoclass:: kingfisher_scrapy.spiders.mexico_inai_portal.MexicoINAIPortal
:no-members:

.. code-block:: bash

scrapy crawl mexico_inai_portal
scrapy crawl mexico_inai_api

.. autoclass:: kingfisher_scrapy.spiders.mexico_nuevo_leon_records.MexicoNuevoLeonRecords
:no-members:
Expand Down
45 changes: 0 additions & 45 deletions kingfisher_scrapy/spiders/mexico_inai.py

This file was deleted.

34 changes: 34 additions & 0 deletions kingfisher_scrapy/spiders/mexico_inai_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
from kingfisher_scrapy.base_spider import PeriodicSpider
from kingfisher_scrapy.util import components


class MexicoINAIAPI(PeriodicSpider):
"""
Domain
Instituto Nacional de Transparencia, Acceso a la Información y Protección de Datos Personales (INAI)
Spider arguments
from_date
Download only releases from this date onward (YYYY format).
If ``from_date`` is not provided defaults to 2015.
until_date
Download only releases until this date (YYYY format).
If ``until_date`` is not provided defaults to 2020.
API documentation
http://contratacionesabiertas.inai.org.mx/contratacionesabiertas/datosabiertos
"""
name = 'mexico_inai_api'

# BaseSpider
root_path = 'arrayReleasePackage.item'
date_format = 'year'
default_from_date = '2015'
default_until_date = '2020'

nativaldezt marked this conversation as resolved.
Show resolved Hide resolved
# SimpleSpider
data_type = 'release_package'

# PeriodicSpider
pattern = 'http://contratacionesabiertas.inai.org.mx:3000/edca/contractingprocess/{}'

def get_formatter(self):
return components(-1)
41 changes: 0 additions & 41 deletions kingfisher_scrapy/spiders/mexico_inai_portal.py

This file was deleted.