Question Details

No question body available.

Tags

python selenium-webdriver web-scraping

Answers (1)

Accepted Answer Available
Accepted Answer
June 17, 2026 Score: 2 Rep: 151,715 Quality: High Completeness: 60%

Problem is because name is not inside but after (and span has empty text)

Restaurant Name

You may need to use .nextsibling (in older versions .nextSibling)

name = divs.find("span", class="a5H0ec").nextsibling

Eventually you should search

name = divs.find("h1", class="DUwDvf lfPIob")

By the way:

if you get

then you can use

print(name.encode_contents())

to see inner HTML and empty