【发布时间】:2018-12-05 04:48:41
【问题描述】:
我正在尝试webscrape 并获得下面 html 中列出的保险金额。
保险 保险使用了下面的代码,但它没有获取任何东西。有人可以帮忙吗?我对 python 还很陌生...
import requests
from bs4 import BeautifulSoup
r = requests.get('https://www.kbb.com/ford/escape/2017/s/?vehicleid=415933&intent=buy-new')
html_soup = BeautifulSoup(r.content, 'lxml')
test2 = html_soup.find_all('div',attrs={"class":"col-base-6"})
print(test2)
【问题讨论】:
标签: html beautifulsoup