Skip to content

Commit 759c73a

Browse files
committed
Fix logging, tweaks
1 parent 570bfe1 commit 759c73a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

remove_blocked.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
site = pywikibot.Site(fam="wikipedia", code="en", user="TheSandBot")
66
pattern = r'(?:User talk:)([^/\n]+)'
77
for page in pywikibot.Category(site, "Wikipedia usernames with possible policy issues").articles():
8-
with open("log.txt", 'a+') as f:
9-
f.write(str(page.title()) + "\n")
108
if page.title() == "Template:Uw-corpname":
119
continue
1210
m = re.search(pattern, str(page.title()))
1311
user_raw = m.group(1)
1412
user = pywikibot.User(site, user_raw)
1513
if user.isBlocked():
14+
with open("block_removed_mar_9_2020.txt", 'a+') as f:
15+
f.write(str(page.title()) + "\n")
1616
page.text = page.text.replace("[[Category:Wikipedia usernames with possible policy issues|{{PAGENAME}}]]",
1717
"")
1818
page.save(

term_specific_search.py

Whitespace-only changes.

0 commit comments

Comments
 (0)