linkcheck

Main package for link checking.

Functions

drop_privileges()

Make sure to drop root privileges on POSIX systems.

get_install_data()

Return absolute path of LinkChecker data installation directory.

get_link_pat(arg[, strict])

Get a link pattern matcher for intern/extern links.

init_i18n([loc])

Initialize i18n with the configured locale dir.

module_path()

Return absolute directory of system executable.

print_threadstacks(sig, frame)

Print stack traces of all running threads.

Exceptions

LinkCheckerError

Exception to be raised on linkchecker-specific check errors.

LinkCheckerInterrupt

Used for testing.

exception linkcheck.LinkCheckerError[source]

Bases: Exception

Exception to be raised on linkchecker-specific check errors.

exception linkcheck.LinkCheckerInterrupt[source]

Bases: Exception

Used for testing.

linkcheck.drop_privileges()[source]

Make sure to drop root privileges on POSIX systems.

linkcheck.get_install_data()[source]

Return absolute path of LinkChecker data installation directory.

Get a link pattern matcher for intern/extern links. Returns a compiled pattern and a negate and strict option.

Parameters
  • arg (string) – pattern from config

  • strict (bool) – if pattern is to be handled strict

Returns

dictionary with keys ‘pattern’, ‘negate’ and ‘strict’

Return type

dict

Raises

re.error on invalid regular expressions

linkcheck.init_i18n(loc=None)[source]

Initialize i18n with the configured locale dir. The environment variable LOCPATH can also specify a locale dir.

Returns

None

linkcheck.module_path()[source]

Return absolute directory of system executable.

linkcheck.print_threadstacks(sig, frame)[source]

Print stack traces of all running threads.

Modules

linkcheck.ansicolor

ANSI Color definitions and functions.

linkcheck.better_exchook2

linkcheck.bookmarks

linkcheck.cache

Store and provide cached data during checking in a thread-safe manner.

linkcheck.checker

Main functions for link checking.

linkcheck.cmdline

Utility functions suitable for command line clients.

linkcheck.configuration

Store metadata and options.

linkcheck.containers

Special container classes.

linkcheck.cookies

Parsing of cookies.

linkcheck.decorators

Simple decorators (usable in Python >= 2.4).

linkcheck.director

Management of checking a queue of links with several threads.

linkcheck.dummy

Dummy objects.

linkcheck.fileutil

File and path utilities.

linkcheck.ftpparse

Python implementation of a part of Dan Bernstein’s ftpparse library.

linkcheck.htmlutil

HTML utils

linkcheck.httputil

linkcheck.i18n

Application internationalization support.

linkcheck.lc_cgi

Functions used by the WSGI script.

linkcheck.loader

Functions to load plugin modules.

linkcheck.lock

Locking utility class.

linkcheck.log

Logging and debug functions.

linkcheck.logconf

Logging configuration

linkcheck.logger

Output logging support for different formats.

linkcheck.memoryutil

Memory utilities.

linkcheck.mimeutil

File and path utilities.

linkcheck.network

linkcheck.parser

Main functions for link parsing

linkcheck.plugins

Module for plugin management.

linkcheck.robotparser2

Robots.txt parser.

linkcheck.socketutil

linkcheck.strformat

Various string utility functions.

linkcheck.threader

Support for managing threads.

linkcheck.trace

linkcheck.url

Functions for parsing and matching URL strings.