Skip to content

Commit 570bfe1

Browse files
committed
Edge case handling
1 parent b956ec1 commit 570bfe1

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

check_time_of_last_commit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
pattern = r'(?:User talk:)([^/\n]+)'
88
for page in pywikibot.Category(site, "Wikipedia usernames with possible policy issues").articles():
99
print(str(page.latest_revision.timestamp) +" " + page.title())
10-
if page.title() == "User:Maxim/rmuaa.js":
10+
if page.title() == "Template:Uw-corpname":
1111
continue
1212
m = re.search(pattern, str(page.title()))
1313
user_raw = m.group(1)

remove_blocked.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
for page in pywikibot.Category(site, "Wikipedia usernames with possible policy issues").articles():
88
with open("log.txt", 'a+') as f:
99
f.write(str(page.title()) + "\n")
10-
if page.title() == "User:Maxim/rmuaa.js":
10+
if page.title() == "Template:Uw-corpname":
1111
continue
1212
m = re.search(pattern, str(page.title()))
1313
user_raw = m.group(1)
1414
user = pywikibot.User(site, user_raw)
1515
if user.isBlocked():
16-
# TODO: remove
1716
page.text = page.text.replace("[[Category:Wikipedia usernames with possible policy issues|{{PAGENAME}}]]",
1817
"")
1918
page.save(

0 commit comments

Comments
 (0)