everyone. I am a rookie, so please try to talk to me like you talk to your baby or dog.
It is a basic price trakcer prgramm. I have attached a picutre of it and pulled out the error below.
I still believe ‘a-price-whole’ that I extracted from the website is the right choice. But correct me pls if I am wrong. It would be appreciated if anyone could help me solve the problem.
AttributeError: ‘NoneType’ object has no attribute ‘text’
line 18, in extract_price
price = float(soup.find(‘span’, class_=’a-price-whole’).text.split()[0].replace(‘,’,””))
line 47, in
if extract_price() <= my_price:
I still believe ‘a-price-whole’ that I extracted from the website is the right choice. But correct me pls if I am wrong. It would be appreciated if anyone could help me solve the problem.
user26632648 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.