【发布时间】:2018-07-03 00:31:24
【问题描述】:
这是我的代码的输出
<h1 class="it-ttl" id="itemTitle" itemprop="name"><span class="g-hdn">Details about </span>item name goes here</h1>
我只想获取项目名称,没有“详细信息”部分。
我的 Python 代码选择特定的 div id 是
for content in soup.select('#itemTitle'):
print(content.text)
【问题讨论】:
标签: python python-3.x beautifulsoup