【发布时间】:2021-06-04 18:59:12
【问题描述】:
我正在与BeautifulSoup 合作进行网络抓取项目。我有一个标签:
<span class="sal "><em class="iconRup"></em>40.0 Lacs</span>
我想从中检索40.0 Lacs。
我尝试使用:
salary = soup.find('span', class_ = 'sal')
print(salary.string())
但这给出了一个 None object 。我该如何继续?
【问题讨论】:
标签: python-3.x web-scraping beautifulsoup