Build generator with relevant articles
Based on wiki search from template docs [errors](https://de.wikipedia.org/w/index.php?title=Spezial:Suche&search=hastemplate%3ATeam-Station+insource%3A%2FTeam-Station+%2A%5C%7C+%2A%5B12%5D%5B0-9%5D%7B3%7D+%2A%28%E2%80%90%7C-%7C%E2%80%91%7C%E2%80%92%7C%E2%80%94%7C%E2%80%95%7C%CB%97%29%2F&fulltext=1&profile=)
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user