ws.pageupdater module¶
- class ws.pageupdater.PageUpdater(api, interactive=False, dry_run=False, first=None, title=None, langnames=None)¶
Bases:
object
- force_interactive = False¶
- interactive_only_pages = ['ArchWiki:Sandbox']¶
- skip_pages = []¶
- skip_templates = {'Broken package link', 'Broken section link', 'Dead link'}¶
- apfilterredir = 'all'¶
- threads_update_page = 1¶
- classmethod set_argparser(argparser)¶
- classmethod from_argparser(args, api=None)¶
- add_checker(node_type, checker)¶
Register a new checker for the given node type.
- Parameters
node_type – the node type for which the checker will be registered. Must be a subtype of
mwparserfromhell.nodes.Node
.checker – the checker which will handle nodes of the given node type. Should be an instance of
ws.checkers.CheckerBase
.
- update_page(src_title, text)¶
Parse the content of the page and call various methods to update the links.
- process_page(page)¶
- Parameters
page (dict) – the
page
part of the API response (must include the page title, pageid, and the timestamp and content of the last revision)
- generate_pages()¶
- run()¶