You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 13, 2021. It is now read-only.
The array index on line 76 of bestbuy.py causes an error when the product-data-value body-copy is not defined on the browser page. It seems there's some inconsistency with BestBuy's pages.
Error:
[2020-04-28 20:59:13][TASK 8] Error Loading Product Page (line 76 IndexError list index out of range)
I know I'm late but try changing line 76 to this self.sku_id = doc.xpath('//div[@class="sku product-data"]//span[@class="product-data-value body-copy"]/text()')[0].strip()
@echocli Are you located outside of the US? If so, figure out how to use a US proxy. The problem is that the HTML that is returned by the request is actually the page you see when you visit bestbuy.COM if you live in Canada. BestBuy.com sees that you have a Canadian IP and shows you a different page than expected. A US proxy should avoid this.
Summary:
The array index on line 76 of bestbuy.py causes an error when the product-data-value body-copy is not defined on the browser page. It seems there's some inconsistency with BestBuy's pages.
Error:
[2020-04-28 20:59:13][TASK 8] Error Loading Product Page (line 76 IndexError list index out of range)
Example Page:
https://www.bestbuy.com/site/combo/nintendo-switch-consoles/50fd30b0-690e-4cee-b87e-8f09ad1f85d7
Offending Line:
self.sku_id = doc.xpath('//span[@class="product-data-value body-copy"]/text()')[1].strip()
Offending Line Link:
https://github.com/natewong1313/bird-bot/blob/master/sites/bestbuy.py#L76
The text was updated successfully, but these errors were encountered: