Closed Jackywathy closed 3 years ago
a bit of digging later, seems like they're using graphQL to store the operator and querying it via client side javascript. I've managed to extract a raw json file containing the information - search for an operator name like maverick in the source and one of the results is giant blob of javascript which the json file is contained in.
Hey, can you please explain the steps you took to extract the .json file? Maybe we can find the other .json files like that too, for the rewards, seasons, and ranks
i went on the ubisoft stat tracking website (https://www.ubisoft.com/en-us/game/rainbow-six/siege/stats), then searched the html for operator
. There was an inline script function starting with window__PRELOADED_STATE__ = blah
which was the json (well technically javascipt object) with all the information. I've been able extract rank, operator + loadout and maps definitions. I've attached them below, but maybe you can make sense of the other fields that I have missed. There's also some variables that change per-account, so see if you get anything different.
From now on i think we should rely on our own definitions rather than using the r6hash.tk website which seems to have gone down - I think the owner of that domain forgot/don't want to re-register it. So far I've been working on operator and loadout definitions, which (fingers crossed) will be completed by tonight or tomorrow.
WIP here, have gotten get_operator to work with a new definitions system https://github.com/Jackywathy/RainbowSixSiege-Python-API/tree/bugfix/definition-hashes
Fixed most of the definitions issues here https://github.com/Jackywathy/RainbowSixSiege-Python-API/tree/bugfix/definition-hashes. All basic functions like kills, deaths etc as well as operator unique abilities are supported (minus aruni's gate stats). Going to clean it up a little before I send a pull request.
There's a chunk of code dedicated to getting
definition hashes
that relies on a website called r6unhash.tk https://github.com/billy-yoyo/RainbowSixSiege-Python-API/blob/32da4403cfd529a39c41f21fe4e71443c4b4a487/r6sapi/auth.py#L399. This service seems to have gone down, and now get operator / rank hangs for ages or errors out. Need a bit of help understanding what is going on there and how we can replace it to get the library working again.