NeweggBot
NeweggBot copied to clipboard
Newegg Canada Item added to cart but still says "Card not in Stock"
First of all really appreciate you building this tool!
I am trying to use this on Newegg Canada to get an RX 6000s card this Wednesday. I followed the instruction and downloaded the Canada branch. I used a dummy item and the script runs fine adding the item into cart but it will not check out. Please see the screenshot for reference.

This could be due to a change by Newegg in the HTML element for the cart total. Check this issue thread for a possible solution.
TL;DR: Try changing the first part of the check_cart method from:
try {
...
var element = await page.$('span.amount')
var text = await page.evaluate(element => element.textContent, element);
...
}
...
to:
const amountElementName = ".summary-content-total"
try {
await page.waitForSelector(amountElementName, { timeout: 1000 })
var amountElement = await page.$(amountElementName)
var text = await page.evaluate(element => element.textContent, amountElement)
....
}
....