linkcheck.checker.telneturl

Handle telnet: links.

Functions

encode(s[, encoding, errors])

Encode telnet data like username and password.

Classes

TelnetUrl(base_url, recursion_level, aggregate)

Url link with telnet scheme.

class linkcheck.checker.telneturl.TelnetUrl(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: linkcheck.checker.urlbase.UrlBase

Url link with telnet scheme.

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]

Call super.build_url(), set default telnet port and initialize the login credentials.

can_get_content()[source]

Telnet URLs have no content.

Returns

False

Return type

bool

check_connection()[source]

Open a telnet connection and try to login. Expected login label is “login: “, expected password label is “Password: “.

local_check()[source]

Warn about empty host names. Else call super.local_check().

linkcheck.checker.telneturl.encode(s, encoding='iso-8859-1', errors='ignore')[source]

Encode telnet data like username and password.