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

Half wrong container class name for the Nvidia store #322

Closed
cyandura opened this issue Sep 26, 2020 · 6 comments · Fixed by #333
Closed

Half wrong container class name for the Nvidia store #322

cyandura opened this issue Sep 26, 2020 · 6 comments · Fixed by #333
Assignees

Comments

@cyandura
Copy link

Description

There are two urls that you are using to hit Nvidia's store(3080 used as an example):
URL 1: https://www.nvidia.com/en-us/shop/geforce/gpu/?page=1&limit=9&locale=en-us&category=GPU&gpu=RTX%203080
URL 2: https://www.nvidia.com/en-us/geforce/graphics-cards/30-series/rtx-3080

I noticed that by changing the inStock text to 'out of stock' to test an alert, and removing URL 1. It doesn't trip an alert.
This is because the container class name currently used, .main-container, doesn't exist on URL 2.

Possible solution

The easy fix is to change it to general-container. I Found that this trips an alert on both URLs.

Side Note/Warning

However I do want to point out that when cards were available this past Wednesday, Nvidia made big changes to their site. I had URL 1 refreshing the whole time and i noticed that the listing for the 3080 never showed a button with Add to Cart, but rather Check Availability. Clicking that redirected you to URL 2. That was just my observation, correct me if i'm wrong.

The only reason i brought this issue up is because I believe URL 2 is more reliable, However Nvidia added an antibot measure on URL 2 where they delay the visibility of the out of stock button by about 10-15 seconds(not sure if you noticed that). No worries, because I tested this and you guys had that all figured out with Puppeteer's networkidle0

@jef
Copy link
Owner

jef commented Sep 26, 2020

This is because the container class name currently used, .main-container, doesn't exist on URL 2.

Ah! Good find.

However Nvidia added an antibot measure on URL 2 where they delay the visibility of the out of stock button by about 10-15 seconds

Wow, thanks for the digging. Didn't notice that!


This may help with multiple containers: #268. I suppose we can wait for both of the links involved, but will need to update the container list for this as well!

That being said, nvidia-api is available (when the site isn't down) and should be good to use. Until they change it again 😄

@jef
Copy link
Owner

jef commented Sep 26, 2020

#270 also fixes this. We can just add it in.

@jef
Copy link
Owner

jef commented Sep 26, 2020

@andrewmackrodt I'll make a PR to set this up.

@jef
Copy link
Owner

jef commented Sep 26, 2020

I'm just going to use .inner for now since it's broader for the other page since I can't see what "Add to Cart" will really be when it goes live again.

@andrewmackrodt
Copy link
Contributor

However Nvidia added an antibot measure on URL 2 where they delay the visibility of the out of stock button by about 10-15 seconds

I don't think Nvidia's store is quite as advanced as this. Their stock availability API was down for ~18 hours after the news broke yesterday that they were leaking customer data in the checkout form. This ~15 second delay is the amount of time CloudFlare will wait before not being able to contact their servers and simply returning a 504 Gateway Error. The nvidia-api implementation uses the same endpoint as this.

@cyandura
Copy link
Author

@andrewmackrodt I think you are right about that, It seems to come up a lot faster now. I was getting very consist delays yesterday but today seems to be a different story.

@jef jef closed this as completed in #333 Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants