from mwrogue.esports_client import EsportsClient from mwcleric.auth_credentials import AuthCredentials import time limit = -1 credentials = AuthCredentials(user_file="me") site = EsportsClient('lol', credentials=credentials) # Set wiki pages = site.pages_using('Infobox Player') # c = site.client.categories['Pages with script errors'] startat_page = 'HauHau' passed_startat = False lmt = 0 #for p in c: for p in pages: if lmt == limit: break if p.name == startat_page: passed_startat = True if not passed_startat: continue lmt += 1 print(p.name) site.touch(p)
print(f'Parsing mh {mh} on page {self.current_page.name}') try: result = get_riot_game(mh, add_names=True) except HTTPError: sleep(10) result = get_riot_game(mh, add_names=True) for param in template.params: param: Parameter if param.name.startswith('blue') or param.name.startswith('red'): # hax, sorry team = 'BLUE' if param.name.startswith('blue') else 'RED' player = int(param.name[-1]) - 1 w = param.value for tl in w.filter_templates(): tl: Template if not tl.name.matches('Scoreboard/Player'): continue primary = result['teams'][team]['players'][player][ 'primaryRuneTreeName'] tl.add('primary', primary, before='secondary') TemplateModifier( site, 'Scoreboard/Season 8', page_list=site.pages_using('Scoreboard/Player/Runes'), startat_page= 'Open Tour Benelux/2021 Season/Spring Split/Scoreboards/Week 2', summary=summary).run()
from mwcleric.auth_credentials import AuthCredentials from mwrogue.esports_client import EsportsClient limit = -1 # startat_page = 'Gamelord' template = 'Infobox Player' form = 'Infobox Player' credentials = AuthCredentials(user_file="bot") site = EsportsClient('lol', credentials=credentials) # Set wiki ######################################## result = site.pages_using(template, generator=False) pages = [] for p in result: pages.append(p) try: startat = pages.index(startat_page) except NameError as e: startat = -1 except ValueError as e: startat = -1 failures = [] lmt = 0 for page in pages: if lmt == limit: