-
-
Notifications
You must be signed in to change notification settings - Fork 34.8k
bpo-35922: Fix RobotFileParser when robots.txt is invalid #11791
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
Merged
taleinat
merged 16 commits into
python:master
from
remilapeyre:fix-robotfileparser-for-invalid-files
Jun 16, 2019
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
e7b777f
Fix RobotFileParser when robot.txt is invalid
decb931
Rename test case
b219f9d
Return None explicitly
f417727
Add tests for bad user-agent and missing attributes
00b918a
Always test craw_delay and request_rate
8680e41
Remove NoRequestRateAndCrawlDelayTest
1e2a03e
Remove useless attributes in DifferentAgentTest
4693573
Remove Misc/python-embed.pc
3125ee9
Fix EmptyFileTest
0988fb2
add a NEWS entry
taleinat 20dce06
tidy up test_request_rate code
taleinat 5d64344
fix BaseRequestRateTest and make EmptyFileTest inherit it
taleinat aaade01
improve NEWS entry formatting
taleinat 4e6a9bd
Update 2019-06-11-19-34-29.bpo-35922.rxpzWr.rst
taleinat d2e9b69
fix NEWS entry formatting
taleinat 67a6ee2
address Berker Peksag's review comments
taleinat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
Misc/NEWS.d/next/Library/2019-06-11-19-34-29.bpo-35922.rxpzWr.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Fix :meth:`RobotFileParser.crawl_delay` and | ||
| :meth:`RobotFileParser.request_rate` to return ``None`` rather than | ||
| raise :exc:`AttributeError` when no relevant rule is defined in the | ||
| robots.txt file. Patch by Rémi Lapeyre. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.