"AttributeError: 'Nonetype' Objekt hat kein Attribut 'get_text'"

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: "AttributeError: 'Nonetype' Objekt hat kein Attribut 'get_text'"

by Anonymous » 06 May 2025, 10:42

Wann immer ich versuchte, diesen Code auszuführen: < /p>

Code: Select all

page = requests.get(URL, headers = headers)
soup = BeautifulSoup(page.content, 'html.parser')

title = soup.find(id="productTitle").get_text()
price = soup.find(id="priceblock_ourprice").get_text()
converted_price = price[0:7]

if (converted_price < '₹ 1,200'):
send_mail()
print(converted_price)
print(title.strip())
if(converted_price > '₹ 1,400'):
send_mail()
Es gibt mir einen Fehler -AttributeError: 'Nonetype' Objekt hat kein Attribut 'get_text' Früher funktionierte dieser Code gut.

Top