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

Using api.nvidia.com to check for stock and auto add to cart (3090 FE approach) #4

Closed
fuckingrobot opened this issue Sep 18, 2020 · 12 comments

Comments

@fuckingrobot
Copy link
Contributor

fuckingrobot commented Sep 18, 2020

I'm working in Ruby, but here's the basic approach...

Check api.nvidia.com at a random interval:

https://api.nvidia.partners/edge/product/search?page=1&limit=9&locale=en-us&category=GPU&gpu=RTX%203090&manufacturer=NVIDIA&manufacturer_filter=NVIDIA~1,ASUS~1,EVGA~3,GIGABYTE~2,MSI~1,PNY~0,ZOTAC~0

I believe product is in stock when digitialRiverID has a value.

When that happens, open this link to automatically add to cart:

https://store.nvidia.com/store/nvidia/en_US/buy/productID.${digitialRiverID}/clearCart.yes/nextPage.QuickBuyCartPage

I expect one of you to sell me a card at price if you get multiple before me 😂

NOTE: I've include a link for 3090 on api.nvidia.com, read carefully and you should be able to modify this for future launches in combination with the filters on nvidia.com.

@thegutuproject
Copy link
Contributor

Unfortunately, this would only work if you intend to purchase the FE models, no? @fuckingrobot

@fuckingrobot
Copy link
Contributor Author

Correct. @thegutuproject most 3rd party realtors have already published 3090 models to their sites so the IDs are already known.

@FireRx
Copy link

FireRx commented Sep 18, 2020

Robot, is this already in the current Build for the 3090 on the latest update?

@JChamblee99
Copy link

JChamblee99 commented Sep 18, 2020

So, it seems like they just removed that QuickBuyCartPage feature (Currently just resulting in errors)... If they do something with their internal catalog, there's at least an alternative for finding the ID and inventory status.

ErikSwan mentioned in the old gist page that Digital River has a catalog page.
Enumerating the catalog for the 3090 ID: Digital River catalog
Once the ID is available, Digital River's inventory status can be queried: 3080 inventory status

If they rotate their Digital River API keys, they can probably be pulled from the /ecommerce/scripts.*.bundle.js that gets referenced in the shop or when the API key gets rate-limited on checkout.
The link to the current script here.

@fuckingrobot
Copy link
Contributor Author

@FireRx no. I'm watching the space and will advise how to approach later if someone doesn't run with this first (I have a personal ruby implementation already). As we're seeing, this is a bit of a cat and mouse game, I want to see how Nvidia reacts before investing too much more time.

@JChamblee99 thanks for sharing more info. You're probably right that the card will show up in the DR catalog BEFORE it shows up on api.nvidia.com. That said, I suspect it will show up only a few minutes beforehand though so people shouldn't count on getting a merged update downloaded and built in time for 6am PT launch.

Nvidia's site needs the DR ID to work, so I believe our best bet is to count on it getting populated in the digitialRiverID field (MISSPELLING IN OFFICIAL API RESPONSE) via an API call like I constructed.

If they rotate their Digital River API keys, they can probably be pulled from the /ecommerce/scripts.*.bundle.js that gets referenced in the shop or when the API key gets rate-limited on checkout.

For what it's worth, their DR API key has not be rotated (long term) in the past few years.

@FireRx
Copy link

FireRx commented Sep 18, 2020

yeah the snatcher just goes into a loop now Will monitor. and thank you guys

@FireRx
Copy link

FireRx commented Sep 19, 2020 via email

@geman220
Copy link
Contributor

geman220 commented Sep 21, 2020

Are we good to close this with #162 @fuckingrobot ?

@fuckingrobot
Copy link
Contributor Author

@geman220 no, this only gets closed if we start pulling DR IDs via API instead of hardcoding them. If we don't have 3090 IDs by Wednesday, I may spend some time on this. You can see a python implementation on Hari's bot.

https://github.com/Hari-Nagarajan/nvidia-bot/blob/master/stores/nvidia.py#L255

@zkirkpp
Copy link

zkirkpp commented Sep 25, 2020

Can this be run on an Android phone?

@jef
Copy link
Owner

jef commented Sep 26, 2020

API has changed quite a bit and is still down. We have updated the API to use new endpoints and this may no longer be possible/relevant as of now. We should open up a new ticket that states that we want to get new item IDs before they're announced if we want to work on something like this.

Thanks!

@xninjax
Copy link
Contributor

xninjax commented Sep 26, 2020

API has changed quite a bit and is still down. We have updated the API to use new endpoints and this may no longer be possible/relevant as of now. We should open up a new ticket that states that we want to get new item IDs before they're announced if we want to work on something like this.

Thanks!

Good to know, since using new nvidia-api, I am only getting 504 bad gateway results (confirmed from another browser and ip). Was going to put an issue up with the new api coding, but I didn't think this was a coding problem.

  • Might be helpful to put an nvidia-api status/comment about this somewhere, perhaps in the FAQ's?
    EDIT: I see this is already noted that API is in progress in readme. I overlooked that.

Jason

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

No branches or pull requests

8 participants