def get_regions(): return leaguepedia_parser.get_regions()
#!/usr/bin/env python import leaguepedia_parser as lp games = lp.get_regions() print(games)
import leaguepedia_parser as lp import pprint pp = pprint.PrettyPrinter(indent=4) # Joshua Prila # LCS Lock In Tournament, 2020 # Pick role and team name here # 0 = Top. 1 = Jungle. 2 = Mid. 3 = Bot. 4 = Support role = 1 teamName = 'Cloud9' regions = lp.get_regions() # print(regions) # ['', 'Africa', 'Asia', 'Brazil', 'China', 'CIS', 'Europe', 'International', 'Japan', 'Korea', 'LAN', 'LAS', 'Latin America', 'LMS', 'MENA', 'North America', 'Oceania', 'PCS', 'SEA', 'Turkey', 'Unknown', 'Vietnam', 'Wildcard'] tournaments = lp.get_tournaments("North America", year=2021) tourney = [] for x in tournaments: tourney.append(x["overviewPage"]) pick = "LCS/2021 Season/Lock In" tourneyIDX = tourney.index(pick) # TourneyIDX is idx of desired tournament games = lp.get_games(tourney[tourneyIDX]) game = lp.get_game_details(games[0]) games = lp.get_games(tourney[tourneyIDX]) # Picks
def test_regions(): regions = leaguepedia_parser.get_regions() assert all(region in regions for region in regions_names)