Awesome-Python-Scripts icon indicating copy to clipboard operation
Awesome-Python-Scripts copied to clipboard

Bug in Amazon-price-tracker

Open rahulreghunath opened this issue 5 years ago • 0 comments
trafficstars

Hi,

I found a bug in Amazon-price-tracker script, which crashes the process if the given product is not available or out of stock.

The original error is

Traceback (most recent call last):
  File "price_tracker.py", line 120, in <module>
    print("The price of the product is expressed in " + (currency_used(URL)))
  File "price_tracker.py", line 46, in currency_used
    price = price_element.get_text()
AttributeError: 'NoneType' object has no attribute 'get_text'

rahulreghunath avatar Aug 23 '20 19:08 rahulreghunath