mirror of
https://github.com/python/cpython.git
synced 2025-07-25 04:04:13 +00:00
Fix Issue6325 - robotparse to honor urls with query strings.
This commit is contained in:
parent
96a60ae90c
commit
3f8ab965f7
2 changed files with 15 additions and 2 deletions
|
@ -129,8 +129,10 @@ class RobotFileParser:
|
|||
return True
|
||||
# search for given user agent matches
|
||||
# the first match counts
|
||||
url = urllib.parse.quote(
|
||||
urllib.parse.urlparse(urllib.parse.unquote(url))[2])
|
||||
parsed_url = urllib.parse.urlparse(urllib.parse.unquote(url))
|
||||
url = urllib.parse.urlunparse(('','',parsed_url.path,
|
||||
parsed_url.params,parsed_url.query, parsed_url.fragment))
|
||||
url = urllib.parse.quote(url)
|
||||
if not url:
|
||||
url = "/"
|
||||
for entry in self.entries:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue