使用 beautifulsoup 提取网站中的文本

问题描述 投票:0回答:0

我需要根据所附图像提取 md-card 容器中的上下文。 我只需要将摘录作为文本或任何格式。 我试过使用 bs 但它不起作用。 请建议一种方法来完成这项工作。 谢谢。

enter image description here

导入请求 从 bs4 导入 BeautifulSoup

 page = requests.get('https://www.plugshare.com/location/81189')
 soup = BeautifulSoup(page.content, 'html.parser') 
 #x = soup.find_all('div')
 x = soup.find_all('md-card')
 #print(page.status_code)

 print(x)
python selenium-webdriver web-scraping beautifulsoup screen-scraping
© www.soinside.com 2019 - 2024. All rights reserved.