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

Add new Dominican Republic scraper #481

Merged
merged 2 commits into from
Sep 2, 2020
Merged

Add new Dominican Republic scraper #481

merged 2 commits into from
Sep 2, 2020

Conversation

aguilerapy
Copy link
Contributor

closes #472.

kingfisher_scrapy/spiders/dominican_republic_portal.py Outdated Show resolved Hide resolved
)
yield scrapy.Request(url, meta={'file_name': 'page-1.json'}, callback=self.parse_response)

def parse_response(self, response):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the spider is not working as you are not returning anything if the response is 200 here. Also, this should be already covered by the use of handle_http_error so this callback is not necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I accidentally deleted a line in that function to continue the scraper.

I wanted to give more information to the user in case they enter a date range where there is no data, otherwise, we only show this message:

imagen

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that 404 error is clear enough but we can add that message to handle_http_error if from_date and/or until_date are used, in another issue

@yolile yolile merged commit 9fd1ea4 into master Sep 2, 2020
@yolile yolile deleted the 472-dominican_republic branch September 2, 2020 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dominican Republic API
2 participants