Skip to content

Commit

Permalink
add italy anac spider
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravf95 committed Nov 24, 2021
1 parent 60da8f1 commit 2dbee7d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/spiders.rst
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,13 @@ Italy
scrapy crawl italy
.. autoclass:: kingfisher_scrapy.spiders.italy_anac.ItalyANAC
:no-members:

.. code-block:: bash
scrapy crawl italy_anac
.. autoclass:: kingfisher_scrapy.spiders.italy_digiwhist.ItalyDigiwhist
:no-members:

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


class ItalyANAC(PeriodicSpider):
"""
Domain
Italy ANAC
Bulk download documentation
https://dati.anticorruzione.it/opendata/organization/anticorruzione
"""
name = 'italy_anac'
download_timeout = 99999

# BaseSpider
date_format = 'year-month'
default_from_date = '2018-01'
default_until_date = '2020-12'

# PeriodicSpider
pattern = 'https://dati.anticorruzione.it/' \
'opendata/download/dataset/ocds/filesystem/bulk/{0.year:d}/{0.month:02d}.json'
formatter = staticmethod(components(-1))

# SimpleSpider
data_type = 'release_package'

0 comments on commit 2dbee7d

Please sign in to comment.