@@ -0,0 +1,1053 @@
+import sys%0A%0Aimport pywikibot%0A%0Areason = %22%5B%5B:m:Requests for comment/Large-scale errors at Malagasy Wiktionary/mg%7CFamafana ambongadiny vokatry ny fanadihadiana momba ny Wikibolana malagasy%5D%5D%22%0Acount = 1%0A%0Asite = pywikibot.Site('mg', 'wiktionary')%0Abots = set(%5Bi%5B'name'%5D for i in s.botusers()%5D)%0A%0Adef is_edited_by_bot_only(page: pywikibot.Page) -%3E bool:%0A    contributors = set(page.contributingUsers())%0A    for contributor in contributors:%0A        if contributor not in bots:%0A            return False%0A    return True%0A%0Awith open(sys.argv%5B1%5D, 'r') as f:%0A    for line in f:%0A        count += 1%0A        if count %3C= 1016314:%0A            continue%0A        page = pywikibot.Page(pywikibot.Site('mg', 'wiktionary'), line)%0A        if page.exists() and not page.isRedirectPage():%0A            content = page.get()%0A            if '%7B%7B=mg=%7D%7D' not in content:%0A                print(count, line%5B:-1%5D)%0A                try:%0A                    if is_edited_by_bot_only(page):%0A                        page.delete(reason)%0A                except Exception:%0A                    pass%0A%0A%0A

add batch deletion for rfc