Seems2Legit / Rainbow-Six-Siege-Player-Stats-API

PHP API which allows you to search players and get their R6 stats
Other
99 stars 32 forks source link

Any idea why op stats & overall stats not updating lately? #88

Closed SwiftCODA closed 1 year ago

SwiftCODA commented 2 years ago

I've noticed that in getStats and getOperators, none of the values have been updated in 1-3 months. Any idea why? I know it's a Ubisoft issue but is there a new endpoint we should be using?

MBamb commented 2 years ago

They use new api routes. You can see this on their new r6 stats tracker website. For example, this would be the new route for overall stats: https://prod.datadev.ubisoft.com/v1/profiles/dd387689-ec46-4018-8ef6-f32987af760a/playerstats?spaceId=5172a557-50b5-4665-b7db-e3f2e8c5041d&view=lifetime&aggregation=summary&gameMode=ranked&platform=PC&teamRole=all

btw @SwiftCODA its me Fox ^^

SwiftCODA commented 2 years ago

Hey man, add my Discord again :) @SwiftCODA#3264

Your response really came in clutch, I appreciate it!

SwiftCODA commented 2 years ago

Been working with these endpoints a little bit and they have the stupidest limits on them. I honestly do not think they are usable on a large scale. My wrapper cycles through over 50 tickets and 6 IPs and when testing on a single device, I get constant 429 errors...

Is there any way around this that I haven't tried?

MBamb commented 2 years ago

I propably make way less requests than you. But I don't have a problem with this. I'm going to check it out tomorrow and make a few tests on my own

SwiftCODA commented 2 years ago

@MBamb I'm gonna look into it a bit more cause it's sometimes happening with a single request. I'm starting to learn that (I think) the 429 is returned for too many request of the same profile. So as long as you cache the profiles, it should be okay, but it's not for me for some reason. I'm using ClusterMaster in Node, I'm gonna see if that has anything to do with it, because from what I can see while debugging, only one request is made.

It's either that, or the fact that there are two synchronous requests for the same profile's "summary" and "operators". Will play around with it and let you know.

SwiftCODA commented 2 years ago

@MBamb I'm messing around with it right now and I am stumped. Look up a profile once.. ONCE. 429 error. Try new ticket/expiration/sessionId. 429 error. Try a different profileId. 429 error. Try a different IP (using proxies). 429 error.

And Ubisoft doesn't respond with any cooldown/limit headers to give any detail as to what they base their "too many requests" decision off of.

Here's my Postman request/response. Also tried the same things in a Node.JS app with the same results. I don't know what I could possibly be doing that's "too much" of anything... I cycle through several tokens, several IPs and only one profileId occasionally at a time while I'm testing.

Screen Shot 2022-06-12 at 10 49 37 PM
MBamb commented 2 years ago

@SwiftCODA So far it looks pretty similar to the requests that I make. I also monitored my apo the last week, but there where no errors for me. As I mentioned before, I don't have as many requests as you, but since you are experiencing them instantaneous, things seem to be weird. I'll take a look later and compare your posted request with mine. I have to say it is really frustrating how Ubisoft goes about the R6 api

MBamb commented 2 years ago

@SwiftCODA They killed the bombsite stats route today. They even updated their own stats site and removed bombsite stats. It really is a pain to work with ubisofts api

danielwerg commented 2 years ago

https://r6fix.ubi.com/projects/RAINBOW6-SIEGE-LIVE/issues/LIVE-35064

SwiftCODA commented 2 years ago

@MBamb I just created 12 Ubisoft accounts (really a pain to do now, you ned to submit a 6 digit code that they email you 🤮). I'm gonna reserve these accounts for using specifically the "new" endpoints, since the original ones seem to be limitless. I'll let you know if this works.

MBamb commented 2 years ago

@SwiftCODA do the old endpoints work for you? At least some of them seem to be broke for me

SwiftCODA commented 2 years ago

@MBamb From my experience, all the old endpoints WORK, just some don't show updated info anymore. I was referring to the ones like progression, user info, that kind of thing. The ones that you don't see on Ubi's stats site. Are there any you know of that just straight up don't work anymore?

MBamb commented 2 years ago

@SwiftCODA I'd have to check again. I know I had problems with some routes regarding their date request Params. But I've switched most to the new ones that ubi uses on their site except some like skill records. And the ones that don't update are basically useless for me at this point

SwiftCODA commented 2 years ago

@MBamb Oh yea, those date ones are weird, like the map stats. I think you can only go back about 90-100 days. I haven't worried about that endpoint too much as it's not crucial for my project but I'd like to get some lifetime / seasonal map stats eventually.

SamWinterhalder commented 2 years ago

Can I ask where you guys have been finding the API routes and the parameters that you can send along with it? I can't tell if I have been really stupid and missed some really obvious documentation...

MBamb commented 2 years ago

@SamWinterhalder I just get all the routes i need from the official Ubisoft stats page. Open developer tools in Chrome and check the network tab.

Gunale0926 commented 1 year ago

What about now?

SwiftCODA commented 1 year ago

They're still there. They have really annoying limits though. You can't use the same login token too many times or make too many requests from the same IP. To use these APIs commercially, you really need a well-structured implementation.