From 06a98b0c19128c281abbc66b82a9f0a6ad1ab901 Mon Sep 17 00:00:00 2001 From: klea Date: Mon, 1 Jun 2026 12:41:23 +0000 Subject: wikibot-m(ab): Remove from import They are considered harmful. --- wikibot-manual/archivebot.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wikibot-manual/archivebot.py b/wikibot-manual/archivebot.py index bed2bef..187fb3c 100644 --- a/wikibot-manual/archivebot.py +++ b/wikibot-manual/archivebot.py @@ -28,7 +28,7 @@ import urllib.request import pywikibot import pywikibot.pagegenerators as pagegenerators -from archiveteamfun import * +import archiveteamfun #{{ stubbed out changes call, only valid if the page is only edited by the bot. @@ -230,7 +230,7 @@ def main(): for entry in sectionentries[section]: viewerplain = '' viewerdetailsplain = '' - viewer = [getArchiveDetails(url=entry.url)] + viewer = [archiveteamfun.getArchiveDetails(url=entry.url)] if viewer[0][0]: viewerplain = "{{saved}}" viewerdetailsplain = viewer[0][1] @@ -267,7 +267,7 @@ Do not edit this table, it is automatically updated by bot. There is a [[{{FULLP |- ! Tool !! Domain !! Job !! Date !! Size !! Objects %s |} -""" % (sectionsaved, sectionnotsaved, convertsize(b=sectionjobsize), notesheader, rowsplain) +""" % (sectionsaved, sectionnotsaved, archiveteamfun.convertsize(b=sectionjobsize), notesheader, rowsplain) newtext.append(output) newtext.append('') @@ -279,13 +279,13 @@ Do not edit this table, it is automatically updated by bot. There is a [[{{FULLP # Replace total statistics if necessary if '' in newtext: - newtext = re.sub(r'.*?', "'''Statistics''': {{saved}} (%s)){{·}} {{notsaved}} (%s){{·}} Total size (%s)" % (totalsaved, totalnotsaved, convertsize(b = totaljobsize)), newtext) + newtext = re.sub(r'.*?', "'''Statistics''': {{saved}} (%s)){{·}} {{notsaved}} (%s){{·}} Total size (%s)" % (totalsaved, totalnotsaved, archiveteamfun.convertsize(b = totaljobsize)), newtext) if wtext != newtext: pywikibot.showDiff(wtext, newtext) page.text = newtext try: - page.save("BOT - Updating page: {{saved}} (%s), {{notsaved}} (%s), Total size (%s)" % (totalsaved, totalnotsaved, convertsize(b=totaljobsize))) + page.save("BOT - Updating page: {{saved}} (%s), {{notsaved}} (%s), Total size (%s)" % (totalsaved, totalnotsaved, archiveteamfun.convertsize(b=totaljobsize))) except: print("Error while saving...") else: -- cgit v1.3.1-10-gc9f91