mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-22 07:04:44 +00:00
commit
5f3b007934
1 changed files with 2 additions and 1 deletions
|
|
@ -92,8 +92,9 @@ class RobotFileParser:
|
|||
try:
|
||||
response = self.session.get(self.url, **kwargs)
|
||||
response.raise_for_status()
|
||||
log.debug(LOG_CHECK, "Robots response headers: %s", response.headers)
|
||||
content_type = response.headers.get('content-type')
|
||||
self.encoding = response.encoding
|
||||
self.encoding = response.encoding = "utf-8"
|
||||
if content_type and content_type.lower().startswith('text/plain'):
|
||||
self.parse(response.iter_lines(decode_unicode=True))
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in a new issue