Use str() for robotparser.
This commit is contained in:
parent
becc17029a
commit
190ffcd390
1 changed files with 1 additions and 1 deletions
|
@ -289,7 +289,7 @@ def check_robotstxt(url, session):
|
||||||
"""
|
"""
|
||||||
roboturl = get_roboturl(url)
|
roboturl = get_roboturl(url)
|
||||||
rp = get_robotstxt_parser(roboturl, session=session)
|
rp = get_robotstxt_parser(roboturl, session=session)
|
||||||
if not rp.can_fetch(UserAgent, url):
|
if not rp.can_fetch(UserAgent, str(url)):
|
||||||
raise IOError("%s is disallowed by robots.txt" % url)
|
raise IOError("%s is disallowed by robots.txt" % url)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue