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
update_page(src_title, text)

Parse the content of the page and call various methods to update the links.

Parameters
  • src_title (str) – title of the page

  • text (str) – content of the page

Returns

a (text, edit_summary) tuple, where text is the updated content and edit_summary is the description of performed changes

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()