Skip to content

Don't scrape error pages - #190

Merged
codelucas merged 3 commits into
codelucas:masterfrom
yprez:fail-error-responses
Jan 28, 2016
Merged

Don't scrape error pages#190
codelucas merged 3 commits into
codelucas:masterfrom
yprez:fail-error-responses

Conversation

@yprez

@yprez yprez commented Jan 27, 2016

Copy link
Copy Markdown
Collaborator

Added a setting (default=True) to only scrape success pages. HTTP error pages are treated the same as other requests errors.

This fixes #142

Also added minor code improvements (more strict exception catching and remove redundant pass statement).

@codelucas

Copy link
Copy Markdown
Owner

Looks good to me! Thanks for changing except Exception to except requests.exceptions.RequestException, catching base exceptions is bad form

codelucas added a commit that referenced this pull request Jan 28, 2016
@codelucas
codelucas merged commit 8e00251 into codelucas:master Jan 28, 2016
@yprez
yprez deleted the fail-error-responses branch February 13, 2016 16:24
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.

Handling 404, 500, and other non-200 http response codes to prevent scraping error pages

2 participants