qiuwenbot package¶
Qiuwen bot.
Subpackages¶
- qiuwenbot.entrypoints package
- qiuwenbot.filter package
- Submodules
- qiuwenbot.filter.clean_refs module
- qiuwenbot.filter.common module
- qiuwenbot.filter.deprecated_tags module
- qiuwenbot.filter.expired_templates module
- qiuwenbot.filter.filter module
- qiuwenbot.filter.gov module
- qiuwenbot.filter.history module
- qiuwenbot.filter.hk module
- qiuwenbot.filter.roc_flag module
- qiuwenbot.filter.roc_year module
- qiuwenbot.filter.tw module
- qiuwenbot.filter.wg module
- qiuwenbot.task package
Submodules¶
qiuwenbot.argparse module¶
qiuwenbot.bot module¶
qiuwenbot.qwfamily module¶
- class qiuwenbot.qwfamily.QiuwenFamily[source]¶
Bases:
Family
Qiuwen faimily.
- Attributes:
- interwiki_forward
obsolete
Old codes that are not part of the family.
- shared_urlshortner_wiki
Methods
apipath
(code)Return path to api.php.
base_url
(code, uri[, protocol])Prefix uri with port and hostname.
category_redirects
(code[, fallback])Return list of category redirect templates.
dbName
(code)Return the name of the MySQL database.
disambig
(code[, fallback])Return list of disambiguation templates.
encoding
(code)Return the encoding for a specific language wiki.
encodings
(code)Return list of historical encodings for a specific language wiki.
eventstreams_host
(code)Hostname for EventStreams.
eventstreams_path
(code)Return path for EventStreams.
from_url
(url)Return whether this family matches the given url.
get_address
(code, title)Return the path to title using index.php with redirects disabled.
get_archived_page_templates
(code)Return tuple of archived page templates.
get_edit_restricted_templates
(code)Return tuple of edit restricted templates.
hostname
(code)The hostname to use for standard http connections.
interface
(code)Return interface to use for code.
isPublic
()Check the wiki require logging in before viewing it.
linktrail
(code)Return regex for trailing chars displayed as part of a link.
load
([fam])Import the named family.
maximum_GET_length
(code)Return the maximum URL length for GET instead of POST.
path
(code)Return path to index.php.
post_get_convert
(site, getText)Do a conversion on the retrieved text from the Wiki.
pre_put_convert
(site, putText)Do a conversion on the text to insert on the Wiki.
protocol
(code)The protocol to use to connect to the site.
querypath
(code)Return path to query.php.
scriptpath
(code)The prefix used to locate scripts on this wiki.
shared_image_repository
(code)Return the shared image repository, if any.
ssl_hostname
(code)The hostname to use for SSL connections.
ssl_pathprefix
(code)The path prefix for secure HTTP access.
verify_SSL_certificate
(code)Return whether a HTTPS certificate should be verified.
- instance = Family("qiuwen")¶
- protocol(code)[source]¶
The protocol to use to connect to the site.
May be overridden to return ‘http’. Other protocols are not supported.
Changed in version 8.2:
https
is returned instead ofhttp
.- Parameters:
code – language code
- Returns:
protocol that this family uses
- scriptpath(code)[source]¶
The prefix used to locate scripts on this wiki.
This is the value displayed when you enter {{SCRIPTPATH}} on a wiki page (often displayed at [[Help:Variables]] if the wiki has copied the master help page correctly).
The default value is the one used on Wikimedia Foundation wikis, but needs to be overridden in the family file for any wiki that uses a different value.
- Parameters:
code – Site code
- Raises:
KeyError – code is not recognised
- Returns:
URL path without ending ‘/’
qiuwenbot.qwlogger module¶
qiuwenbot.user-config module¶
qiuwenbot.utils module¶
- qiuwenbot.utils.archieve_page(page: Page, site: Site) Page [source]¶
Archieve a page.
- Parameters:
- page: pywikibot.Page
page to archieve
- site: pywikibot.Site
qiuwen site
- Returns:
- pywikibot.Page
page with old title
- qiuwenbot.utils.devide_parameters(params: str) Dict[str, str] [source]¶
Devide parameters and remove subtemplate in it.
- Parameters:
- paramsstr
parameter string
- Returns:
- Dict[str, str]
dict of params