Use 'in' instead of == due to charset.
This commit is contained in:
parent
fa79da3a7b
commit
eceed3694e
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@ def linkchecker(do_external=True):
|
|||
if link not in seen:
|
||||
queue.append(link)
|
||||
seen.add(link)
|
||||
elif result.head.headers['content-type'] == 'text/html' and not url.endswith('.html'):
|
||||
elif 'text/html' in result.head.headers['content-type'] and not url.endswith('.html'):
|
||||
log.debug('GET %s', url)
|
||||
response = session.get(url)
|
||||
soup = bs4.BeautifulSoup(response.text, 'html.parser')
|
||||
|
|
Loading…
Reference in a new issue