philippnormann / nvidia-sniper

🎯 Autonomously buy Nvidia Founders Edition GPUs as soon as they become available.
396 stars 99 forks source link

Checking Availability via API error #35

Closed AdmiralJunkie closed 4 years ago

AdmiralJunkie commented 4 years ago

The below has started to show this evening. Selenium seems to work fine:

2020-10-01 21:32:16,581 nvidia-sniper: Checking en-gb availability for GeForce RTX 3080 using selenium... 2020-10-01 21:32:23,142 nvidia-sniper: GPU currently not available 2020-10-01 21:32:23,142 nvidia-sniper: Checking en-gb availability for GeForce RTX 3080 using API... 2020-10-01 21:32:42,781 nvidia-sniper: Failed to get inventory status for 5438792800 Traceback (most recent call last): File "C:\nvidia-sniper\sniper__main__.py", line 49, in checkout_api inventory = await api.get_inventory_status(session, dr_locale, api_currency, dr_id) File "C:\nvidia-sniper\sniper\api.py", line 22, in get_inventory_status json_resp = await response.json() File "C:\Users\.virtualenvs\nvidia-sniper-Fu40Ck5x\lib\site-packages\aiohttp\client_reqrep.py", line 1026, in json raise ContentTypeError( aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html', url=URL('https://api-prod.nvidia.com/direct-sales-shop/DR/products/en_gb/GBP/5438792800')

Shiftone commented 4 years ago

That just means that the API is down at Nvidia's end. You can ignore it - your sniper is working fine. The API came back up today at about 18:37 and stock hit the site at 19:06. So worth keeping an eye for the API coming back up as it could be an indicator of an imminent restock.

Edit - times quoted BST on en_gb

@philippnormann Just wanted to say thank you for this tool - it helped me secure a 3080 this evening. I wonder if it is worth having the script send a notification when the API goes up or down as it may preceded a restock.