linkcheck.checker.unknownurl

Handle uncheckable URLs.

Classes

UnknownUrl(base_url, recursion_level, aggregate)

Handle unknown or just plain broken URLs.

class linkcheck.checker.unknownurl.UnknownUrl(base_url, recursion_level, aggregate, parent_url=None, base_ref=None, line=-1, column=-1, page=-1, name='', url_encoding=None, extern=None)[source]

Bases: UrlBase

Handle unknown or just plain broken URLs.

Initialize check data, and store given variables.

Parameters:
  • base_url – unquoted and possibly unnormed url

  • recursion_level – on what check level lies the base url

  • aggregate – aggregate instance

  • parent_url – quoted and normed url of parent or None

  • base_ref – quoted and normed url of <base href=””> or None

  • line – line number of url in parent content

  • column – column number of url in parent content

  • page – page number of url in parent content

  • name – name of url or empty

  • url_encoding – encoding of URL or None

  • extern – None or (is_extern, is_strict)

build_url()[source]

Only logs that this URL is unknown.

can_get_content()[source]

Unknown URLs have no content.

Returns:

False

Return type:

bool

is_ignored()[source]

Return True if this URL scheme is ignored.

linkcheck.checker.unknownurl.is_unknown_scheme(string, pos=0, endpos=9223372036854775807)

Matches zero or more characters at the beginning of the string.