mrtolkien / leaguepedia_parser

A parser for the Leaguepedia website, focused on gathering esports data.
MIT License
71 stars 18 forks source link

Why do I get different results from leguepedia_parser_demo.gif? #16

Closed ksumini closed 2 years ago

ksumini commented 2 years ago
import leaguepedia_parser

# Gets regions names
regions = leaguepedia_parser.get_regions()

# Gets tournaments in the region, by default only returns primary tournaments
tournaments = leaguepedia_parser.get_tournaments("Korea", year=2020)

# Gets all games for a tournament. Get the name from get_tournaments()
games = leaguepedia_parser.get_games("LCK/2020 Season/Spring Season")

# Gets picks and bans and other details from a game. Get the game object from get_games()
game = leaguepedia_parser.get_game_details(games[0])

# Gets the URL of the team’s logo
logo_url = leaguepedia_parser.get_team_logo('T1')

I tried this code but I can't get same results with you. In your demo, I can see dict results by when you using the usage code. But, when I tried, I just got this results. How can I get same results with u?

LolGame(sources=EmptyDataclass(), duration=2440, start='2020-02-05T06:34:00+00:00', creation=None, type=None, queue_id=None, patch='10.2', gameVersion=None, winner='RED', teams=LolGameTeams(BLUE=LolGameTeam(bans=[134, 163, 236, 7, 412], players=[LolGamePlayer(primaryRuneTreeId=None, secondaryRuneTreeId=None, championId=875, id=None, inGameName=None, profileIconId=None, role='TOP', sources=EmptyDataclass(), runes=[], summonerSpells=[], endOfGameStats=None, snapshots=[], itemsEvents=[], wardsEvents=[], skillsLevelUpEvents=[], largeMonstersKills=[], levelUpEvents=[], spellsUses=[], specialKills=[]), LolGamePlayer(primaryRuneTreeId=None, secondaryRuneTreeId=None, championId=79, id=None, inGameName=None, profileIconId=None, role='JGL', sources=EmptyDataclass(), runes=[], summonerSpells=[], endOfGameStats=None, snapshots=[], itemsEvents=[], wardsEvents=[], skillsLevelUpEvents=[], largeMonstersKills=[], levelUpEvents=[], spellsUses=[], specialKills=[]), LolGamePlayer(primaryRuneTreeId=None, secondaryRuneTreeId=None, championId=68, id=None, inGameName=None, profileIconId=None, role='MID', sources=EmptyDataclass(), runes=[], summonerSpells=[], endOfGameStats=None, snapshots=[], itemsEvents=[], wardsEvents=[], skillsLevelUpEvents=[], largeMonstersKills=[], levelUpEvents=[], spellsUses=[], specialKills=[]), LolGamePlayer(primaryRuneTreeId=None, secondaryRuneTreeId=None, championId=21, id=None, inGameName=None, profileIconId=None, role='BOT', sources=EmptyDataclass(), runes=[], summonerSpells=[], endOfGameStats=None, snapshots=[], itemsEvents=[], wardsEvents=[], skillsLevelUpEvents=[], largeMonstersKills=[], levelUpEvents=[], spellsUses=[], specialKills=[]), LolGamePlayer(primaryRuneTreeId=None, secondaryRuneTreeId=None, championId=89, id=None, inGameName=None, profileIconId=None, role='SUP', sources=EmptyDataclass(), runes=[], summonerSpells=[], endOfGameStats=None, snapshots=[], itemsEvents=[], wardsEvents=[], skillsLevelUpEvents=[], largeMonstersKills=[], levelUpEvents=[], spellsUses=[], specialKills=[])], endOfGameStats=LolGameTeamEndOfGameStats(turretKills=4, inhibitorKills=None, firstTurret=None, firstInhibitor=None, riftHeraldKills=2, dragonKills=3, baronKills=1, firstRiftHerald=None, firstDragon=None, firstBaron=None), epicMonstersKills=[], buildingsKills=[], sources=EmptyDataclass(), earlySurrendered=None), RED=LolGameTeam(bans=[421, 60, 84, 61, 111], players=[LolGamePlayer(primaryRuneTreeId=None, secondaryRuneTreeId=None, championId=82, id=None, inGameName=None, profileIconId=None, role='TOP', sources=EmptyDataclass(), runes=[], summonerSpells=[], endOfGameStats=None, snapshots=[], itemsEvents=[], wardsEvents=[], skillsLevelUpEvents=[], largeMonstersKills=[], levelUpEvents=[], spellsUses=[], specialKills=[]), LolGamePlayer(primaryRuneTreeId=None, secondaryRuneTreeId=None, championId=64, id=None, inGameName=None, profileIconId=None, role='JGL', sources=EmptyDataclass(), runes=[], summonerSpells=[], endOfGameStats=None, snapshots=[], itemsEvents=[], wardsEvents=[], skillsLevelUpEvents=[], largeMonstersKills=[], levelUpEvents=[], spellsUses=[], specialKills=[]), LolGamePlayer(primaryRuneTreeId=None, secondaryRuneTreeId=None, championId=13, id=None, inGameName=None, profileIconId=None, role='MID', sources=EmptyDataclass(), runes=[], summonerSpells=[], endOfGameStats=None, snapshots=[], itemsEvents=[], wardsEvents=[], skillsLevelUpEvents=[], largeMonstersKills=[], levelUpEvents=[], spellsUses=[], specialKills=[]), LolGamePlayer(primaryRuneTreeId=None, secondaryRuneTreeId=None, championId=523, id=None, inGameName=None, profileIconId=None, role='BOT', sources=EmptyDataclass(), runes=[], summonerSpells=[], endOfGameStats=None, snapshots=[], itemsEvents=[], wardsEvents=[], skillsLevelUpEvents=[], largeMonstersKills=[], levelUpEvents=[], spellsUses=[], specialKills=[]), LolGamePlayer(primaryRuneTreeId=None, secondaryRuneTreeId=None, championId=201, id=None, inGameName=None, profileIconId=None, role='SUP', sources=EmptyDataclass(), runes=[], summonerSpells=[], endOfGameStats=None, snapshots=[], itemsEvents=[], wardsEvents=[], skillsLevelUpEvents=[], largeMonstersKills=[], levelUpEvents=[], spellsUses=[], specialKills=[])], endOfGameStats=LolGameTeamEndOfGameStats(turretKills=8, inhibitorKills=None, firstTurret=None, firstInhibitor=None, riftHeraldKills=0, dragonKills=3, baronKills=1, firstRiftHerald=None, firstDragon=None, firstBaron=None), epicMonstersKills=[], buildingsKills=[], sources=EmptyDataclass(), earlySurrendered=None)), kills=[], lobbyName=None, gameInSeries=1, vod='https://youtu.be/de8GaP0MKx8?t=2692', picksBans=[LolPickBan(championId=134, isBan=True, team='BLUE'), LolPickBan(championId=421, isBan=True, team='RED'), LolPickBan(championId=163, isBan=True, team='BLUE'), LolPickBan(championId=60, isBan=True, team='RED'), LolPickBan(championId=236, isBan=True, team='BLUE'), LolPickBan(championId=84, isBan=True, team='RED'), LolPickBan(championId=875, isBan=False, team='BLUE'), LolPickBan(championId=82, isBan=False, team='RED'), LolPickBan(championId=523, isBan=False, team='RED'), LolPickBan(championId=21, isBan=False, team='BLUE'), LolPickBan(championId=79, isBan=False, team='BLUE'), LolPickBan(championId=64, isBan=False, team='RED'), LolPickBan(championId=61, isBan=True, team='RED'), LolPickBan(championId=7, isBan=True, team='BLUE'), LolPickBan(championId=111, isBan=True, team='RED'), LolPickBan(championId=412, isBan=True, team='BLUE'), LolPickBan(championId=201, isBan=False, team='RED'), LolPickBan(championId=89, isBan=False, team='BLUE'), LolPickBan(championId=68, isBan=False, team='BLUE'), LolPickBan(championId=13, isBan=False, team='RED')], pauses=[])

mrtolkien commented 2 years ago

Because data is not static and changed since I made the gif.