Skip to content

Commit

Permalink
Merge pull request #544 from open-contracting/539-italy
Browse files Browse the repository at this point in the history
Update Italy scraper
  • Loading branch information
yolile committed Nov 6, 2020
2 parents 475ce82 + 9e701c7 commit 5392620
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions docs/spiders.rst
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,16 @@ Indonesia
scrapy crawl indonesia_bandung
Italy
-----

.. autoclass:: kingfisher_scrapy.spiders.italy.Italy
:no-members:

.. code-block:: bash
scrapy crawl italy
Kenya
-----

Expand Down
4 changes: 2 additions & 2 deletions kingfisher_scrapy/spiders/italy.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import scrapy

from kingfisher_scrapy.base_spider import SimpleSpider
from kingfisher_scrapy.util import components, handle_http_error, join
from kingfisher_scrapy.util import components, handle_http_error


class Italy(SimpleSpider):
Expand All @@ -26,4 +26,4 @@ def parse_list(self, response):
html_urls = response.xpath('//a/@href').getall()
for html_url in html_urls:
if '.json' in html_url:
yield self.build_request(html_url, formatter=join(components(-2, -1), components(-1)))
yield self.build_request(html_url, formatter=components(-2))

0 comments on commit 5392620

Please sign in to comment.