mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-12 08:33:10 +00:00
SyntaxCheck plugins only work with http
They use a Requests session from url_data.
This commit is contained in:
parent
a977e4d712
commit
068a60ee39
1 changed files with 6 additions and 4 deletions
|
|
@ -54,8 +54,9 @@ class HtmlSyntaxCheck(_ContentPlugin):
|
|||
self.timer = W3Timer()
|
||||
|
||||
def applies_to(self, url_data):
|
||||
"""Check for HTML and extern."""
|
||||
return url_data.is_html() and not url_data.extern[0]
|
||||
"""Check for HTML, extern and session."""
|
||||
return (url_data.is_html() and not url_data.extern[0]
|
||||
and hasattr(url_data, "session"))
|
||||
|
||||
def check(self, url_data):
|
||||
"""Check HTML syntax of given URL."""
|
||||
|
|
@ -88,8 +89,9 @@ class CssSyntaxCheck(_ContentPlugin):
|
|||
self.timer = W3Timer()
|
||||
|
||||
def applies_to(self, url_data):
|
||||
"""Check for CSS and extern."""
|
||||
return url_data.is_css() and not url_data.extern[0]
|
||||
"""Check for CSS, extern and session."""
|
||||
return (url_data.is_css() and not url_data.extern[0]
|
||||
and hasattr(url_data, "session"))
|
||||
|
||||
def check(self, url_data):
|
||||
"""Check CSS syntax of given URL."""
|
||||
|
|
|
|||
Loading…
Reference in a new issue