Jonathan Golder 6 years ago
parent
commit
b114cee46d
  1. 9
      teamstation.py

9
teamstation.py

@ -42,6 +42,8 @@ class TeamstationBot( CurrentPageBot ): # sets 'current_page' on each treat()
(https://de.wikipedia.org/wiki/Vorlage:Team-Station).
"""
wrong_dash_search = r"hastemplate:Team-Station insource:/Team-Station *\| *[12][0-9]{3} *(‐|-|‑|‒|—|―|˗)/"
def __init__( self, genFactory, **kwargs ):
"""
Constructor
@ -68,6 +70,13 @@ class TeamstationBot( CurrentPageBot ): # sets 'current_page' on each treat()
Builds generator
"""
# Search articles with wrong dash symbols used in time span
self.genFactory.gens.append(
pywikibot.pagegenerators.SearchPageGenerator(
type(self).wrong_dash_search, namespaces=[0]
)
)
# Use this to create the generator the bot should work on
self.gen = self.genFactory.getCombinedGenerator()

Loading…
Cancel
Save