valhallasw created this task.
Herald added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
    def callback(self, item):
        """Callback funktion for 'private' revert bot."""
        if 'top' in item:
            page = pywikibot.Page(self.site, item['title'])
            text = page.get(get_redirect=True)
            pattern = re.compile(r'\[\[.+?:.+?\..+?\]\]', re.UNICODE)
            return pattern.search(text) >= 0
  
  i.e. this is only triggered if there is at least one wikilink in the form 
[[A:B.C]] in the text. I don't think that's generally a useful filter, so def 
main() should probably use BaseRevertBot rather than myRevertBot.

TASK DETAIL
  https://phabricator.wikimedia.org/T129526

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: valhallasw
Cc: Aklapper, valhallasw, pywikibot-bugs-list, jayvdb



_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to