在使用bs4 的时候爆出了这样一个错
译为: 'Response' 类型的对象没有 len()
错误代码为:
soup=BeautifulSoup(res,features='html.parser') car_t=soup.find(name='div',attrs={'class':"brand-list-item"}) print(car_t)
将响应的res 改为res.text即可
在使用bs4 的时候爆出了这样一个错
译为: 'Response' 类型的对象没有 len()
错误代码为:
soup=BeautifulSoup(res,features='html.parser') car_t=soup.find(name='div',attrs={'class':"brand-list-item"}) print(car_t)
将响应的res 改为res.text即可