I'm trying to restaurant names from Tripadvisor with Python 3 & lxml. The text i'm trying to retrieve is in the following element and is named 'Al Fresco's in this case.
<a target="_blank" href="/Restaurant_Review-g293925-d8327527-Reviews-
from lxml import html
page = requests.get('https://www.tripadvisor.nl/Restaurants-g293925-
tree = html.fromstring(page.content)
#This will create a list of Names:
Name = tree.xpath('//*[@id="eatery_8327527"]/div/div/div/a/text()')
print ('Name: ', Name)
Without having a look at the actual page your Xpath is probably too strict. Try something like this:
If that yields too many results try adding the parent in front.
Hope that helps.
After having a look at the actual page, this i probably what you are looking for: