0

(sorry if im asking in a bad way but this is my first question on this site)

I really dont understand why I dont get anything out of find/find_all I used similar code on another url (also techpilot) and it works perfectly there. thank you in advance

from bs4 import BeautifulSoup
from urllib.request import urlopen

url = "https://www.techpilot.de/zulieferer-suchen?laserschneiden%202d%20(laserstrahlschneiden)"
page = urlopen(url)
html = page.read().decode("utf-8")
soup = BeautifulSoup(html, "html.parser")

cclass=soup.find("div",class_="fancyCompLabel")
print(cclass)
Aquitter
  • 45
  • 1
  • 7
  • Does this answer your question? [HTML tag appears empty when parsing it with BeautifulSoup but has content when opened in browser](https://stackoverflow.com/questions/33058551/html-tag-appears-empty-when-parsing-it-with-beautifulsoup-but-has-content-when-o) – He3lixxx Jun 22 '21 at 17:58

1 Answers1

0

It seems that the current version of the referenced web page simply has no elements with that class name.

In fact, there is even no such substring in the response:

>>> import requests
>>> resp = requests.get('https://www.techpilot.de/zulieferer-suchen?laserschneiden%202d%20(laserstrahlschneiden)')
>>> 'fancyCompLabel' in resp.text
False

Vytas
  • 754
  • 5
  • 14