-
Notifications
You must be signed in to change notification settings - Fork 0
/
__init__.py
36 lines (32 loc) · 997 Bytes
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# -*- coding: utf-8 -*-
"""
match long ref:
<ref[^>]*>[^<>]+<\/ref>
short ref:
<ref[^>/]*\s*/\s*>
page_edit = page.can_edit()
if not page_edit: return
# ---
if page.isRedirect() : return
# target = page.get_redirect_target()
# ---
text = page.get_text()
ns = page.namespace()
links = page.page_links()
categories = page.get_categories(with_hidden=False)
langlinks = page.get_langlinks()
wiki_links = page.get_wiki_links_from_text()
refs = page.Get_tags(tag='ref')# for x in ref: name, contents = x.name, x.contents
words = page.get_words()
templates = page.get_templates()
save_page = page.save(newtext='', summary='', nocreate=1, minor='')
create = page.Create(text='', summary='')
# ---
back_links = page.page_backlinks()
text_html = page.get_text_html()
hidden_categories= page.get_hidden_categories()
flagged = page.is_flagged()
timestamp = page.get_timestamp()
user = page.get_user()
purge = page.purge()
"""