MiscellaneousStuff / tlol-py

TLoL (Python Module) - League of Legends Deep Learning AI (Research and Development)
MIT License
21 stars 4 forks source link

dowloader.py is outdated #1

Closed nubonics closed 2 years ago

nubonics commented 2 years ago

Issue

It seems that riot has patched this, or at least changed the way it allows us to download replays, or hopefully I am wrong.

for example, these two game_ids

These game id's are game id's of anywhere between plat2-challenger on the NA1 server.

I am unable to download the replays for either of these, as viewing the metadata url via the LCU explorer shows that the state is incompatible

url = f"https://127.0.0.1:{str(port)}/lol-replays/v1/metadata/{str(gameId)}"

when sending a GETrequest to the metadata endpoint, you will also probably get this response:

{
  "downloadProgress": 499155328,
  "gameId": 4291035149,
  "state": "incompatible"
}

Un-Related

nit-pick: why not use HTTPBasicAuth instead of using base64? nit-pick: why not use .cmdline() on the league process? [ it gives you access to a list of every argument that was used when starting the .exe file, suchas the remote-auth-port and the auth-token [ used for authentication to the league client ]

MiscellaneousStuff commented 2 years ago

Main Issue

Hello there thanks for you interest in this project.

When I run both of your game IDs through MATCH-V5 with the region set to the AMERICAS (including NA), of the League of Legends Developer API, I get this message:

Request URL: https://americas.api.riotgames.com/lol/match/v5/matches/4291035149

Response:

{
    "status": {
        "message": "Data not found - match file not found",
        "status_code": 404
    }
}

If the Riot API is unable to find the match ID, there is no way the client will be able to either. The game you are trying to download will also need to be from the most recent patch (currently patch 12.8) as Riot deletes old replays every single patch cycle. If you've found both of these game IDs using the U_GG_STATS.get_matches() function, you will also need to update the target_patch parameter to 12_8 so only downloadable matches from the current patch are returned in the results.

Nit-Picks

Thanks for taking the time to leave the feedback.

nubonics commented 2 years ago

Wrote my own downloader, code is untested, but should be nearly complete. Feel free to check it out at https://github.com/nubonics/LeagueReplayDownloader