mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-17 06:20:27 +00:00
Fix TypeError: string arg required in content_allows_robots()
See #323 an #317.
This commit is contained in:
parent
6a9ab5ae44
commit
58b0d5aaae
4 changed files with 11 additions and 2 deletions
|
|
@ -88,7 +88,7 @@ class HttpUrl (internpaturl.InternPatternUrl, proxysupport.ProxySupport):
|
|||
parser.encoding = self.charset
|
||||
# parse
|
||||
try:
|
||||
parser.feed(self.get_content())
|
||||
parser.feed(self.get_raw_content())
|
||||
parser.flush()
|
||||
except linkparse.StopParse as msg:
|
||||
log.debug(LOG_CHECK, "Stopped parsing: %s", msg)
|
||||
|
|
|
|||
5
tests/checker/data/http_utf8.html
Normal file
5
tests/checker/data/http_utf8.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<meta charset="utf-8">
|
||||
<p>Some text — but with an em-dash.</p>
|
||||
</html>
|
||||
4
tests/checker/data/http_utf8.html.result
Normal file
4
tests/checker/data/http_utf8.html.result
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
url http://localhost:%(port)d/%(datadir)s/http_utf8.html
|
||||
cache key http://localhost:%(port)d/%(datadir)s/http_utf8.html
|
||||
real url http://localhost:%(port)d/%(datadir)s/http_utf8.html
|
||||
valid
|
||||
|
|
@ -39,7 +39,7 @@ class TestHttp (HttpServerTest):
|
|||
self.file_test("http_slash.html", confargs=confargs)
|
||||
self.file_test("http.xhtml", confargs=confargs)
|
||||
self.file_test("http_file.html", confargs=confargs)
|
||||
self.file_test("utf8.html", confargs=confargs)
|
||||
self.file_test("http_utf8.html", confargs=confargs)
|
||||
|
||||
def test_status(self):
|
||||
for status in sorted(self.handler.responses.keys()):
|
||||
|
|
|
|||
Loading…
Reference in a new issue