Я пытаюсь извлечь все "Интересные места" со страниц Википедии, используя красивый суп и Python / Pandas, и поместить их в информационный кадр. Например:
https://en.wikipedia.org/wiki/1st_arrondissement_of_Paris
url_Paris_01 = requests.get('https://en.wikipedia.org/wiki/1st_arrondissement_of_Paris').text
soup_Paris_01 = BeautifulSoup(url_Paris_01, "html.parser")
for headline in soup_Paris_01.find_all("span", {"class": "mw-headline"}):
print(headline.text)
Geography
Demography
Historical population
Immigration
Quarters
Economy
Education
Map
Cityscape
**Places of interest**
Bridges
Streets and squares
See also
References
External links
не работает
soup_Paris_01.find_all('li',attrs={"id":"Places_of_interest"})
Я вижу, что мои "Интересные места"у всех есть заголовок.
Достопримечательности