【发布时间】:2018-10-24 21:30:44
【问题描述】:
我想提取图形附近的描述(从“雕像模型”到“保持调谐:)”的描述)并通过 BeautifulSoup 将其存储到变量information 中。我该怎么做?
这是我的代码,但我不知道如何继续:
from bs4 import BeautifulSoup
response = requests.get('https://www.myminifactory.com/object/3d-print-the-little-prince-4707')
soup = BeautifulSoup(response.text, "lxml")
information =
【问题讨论】:
-
将
soup.select与 css 选择器一起使用 - 你就快到了! -
类似
soup.find_all('div', class_='text-auto-link')。
标签: python html web-scraping beautifulsoup extract