I try to get an HTML Element by the XPath, I tried it this way but it always returns an empty String. Can anybody tell me, how I get the Element by its X-Path ?
for x in list_href_einrichtungen:
url = 'https://pflegefinder.bkk-dachverband.de/' + x
source_code = requests.get(url)
plain_text = source_code.text
soup = BeautifulSoup(plain_text)
**doc = lxml.html.fromstring(source_code.content)
strasse = doc.xpath('div[3]/div[3]/table[1]/tbody/tr/td/div/div/div[1]/p[1]/text()[1]')**
name = soup.find('h2').text
uebergabeeinrichtung = Einrichtung("IK", name, 'Teststraße', '12345', 'Ort', "telefon",
'Telefax', 'email','internet')
list_einrichtungen.append(uebergabeeinrichtung)
print(name, strasse)