Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download more histories by querying specific battle type #9

Merged
merged 3 commits into from
Sep 13, 2022

Conversation

bhiaibogf
Copy link
Contributor

I found that you can get 50 recent battles stats for every specific game mode (regular, bankara and private). So you can get up to 150 battle stas by querying them separately.

@frozenpandaman
Copy link
Owner

Haha, I had my own excited realization about this too. :)
image

I had just tried to get something out fast ASAP after launch – and it does take a while to play 50 battles and/or work 50 Salmon Run jobs, so I figured people running the export command at least once every 50 wasn't that big of an ask.

But this is great to have, thank you!! I'll take more of a look later today when I can. The 'export as local file' feature is pretty temporary, and not a functionality I really expect anyone to use once stat.ink supports Splatoon 3, so hopefully this will support s3s running with -r, and bare with no flags as well (note: the I/O here will have to change as well…)

In fact, do we need to query LatestBattleHistoriesQuery at all? I don't think so, right? For the most data possible, I guess we should query RegularBattleHistoriesQuery and BankaraBattleHistoriesQuery and PrivateBattleHistoriesQuery, combine them, and then use that as our "master list" of "recent battles". (It is SO annoying each battle required a new request though, unlike SplatNet 2 which just had the handy results.json with all 50 recent battle details in one file…)

@frozenpandaman
Copy link
Owner

frozenpandaman commented Sep 12, 2022

Definitely very good to query these pages though since right now (by querying the 'latest' page only) I think none of this info I've highlighted in green is getting saved:
image

🙃

edit: oh well the 5/3 win-loss record is captured i guess, or calculable haha, nvm there

@bhiaibogf
Copy link
Contributor Author

I had just tried to get something out fast ASAP after launch – and it does take a while to play 50 battles and/or work 50 Salmon Run jobs, so I figured people running the export command at least once every 50 wasn't that big of an ask.

Booyah! Thanks a lot for your rapid implement. But unfortunately, I have played more than 50 battles befor I found this rope. Thus, I wrote this code to download more histories.

But this is great to have, thank you!! I'll take more of a look later today when I can. The 'export as local file' feature is pretty temporary, and not a functionality I really expect anyone to use once stat.ink supports Splatoon 3, so hopefully this will support s3s running with -r, and bare with no flags as well (note: the I/O here will have to change as well…)

In fact, do we need to query LatestBattleHistoriesQuery at all? I don't think so, right? For the most data possible, I guess we should query RegularBattleHistoriesQuery and BankaraBattleHistoriesQuery and PrivateBattleHistoriesQuery, combine them, and then use that as our "master list" of "recent battles". (It is SO annoying each battle required a new request though, unlike SplatNet 2 which just had the handy results.json with all 50 recent battle details in one file…)

Yeap, I agree with you. You may delete the code about LatestBattleHistoriesQuery and the argument specific I added in function fetch_json. And then it should work well with only '-r' flag.

Definitely very good to query these pages though since right now (by querying the 'latest' page only) I think none of this info I've highlighted in green is getting saved: image

🙃

Yeah, you could easily get this information now by using BankaraBattleHistoriesQuery, which names as "bankaraMatchChallenge" in json file.

@frozenpandaman
Copy link
Owner

I did some code cleanup (especially of the try/except statements), made the optional variables & calls to fetch_json() a little more easy to figure out, and bumped the version number. Also added a TODO comment saying that the I/O for the bare s3s.py command with no flags will need to be changed or improved since you can actually (attempt to) upload more than 50 battles now – in theory up to 150, if you've played 50 new ones of each type!

@frozenpandaman frozenpandaman merged commit b1b8bc5 into frozenpandaman:master Sep 13, 2022
@frozenpandaman
Copy link
Owner

Re: the reverted .gitignore file, see #5 (comment)

(Ugh, didn't know to cherry-pick/ignore that commit, so now there's a bit of a messy file history, oh well…)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants