花费 9 ms
find 和 find_all 用法

soup = BeautifulSoup(requests.get(url).text, 'html.parser') soup.find('span', class_='item_hot_topi ...

Fri Nov 09 00:11:00 CST 2018 0 1690
获取,标签里面属性的值的方法

获取,标签里面属性的值的方法,(下面是获取a标签里面属性source-data-lazy-img的值 ) soup2 = BeautifulSoup(span.encode('utf-8'), 'h ...

Tue May 28 10:59:00 CST 2019 0 1052
使用beautifulsoup与requests爬取数据

1、安装需要的库 bs4 beautifulSoup requests lxml如果使用mongodb存取数据,安装一下pymongo插件 2、常见问题 1> lxml安装问题 如果遇 ...

Tue Jan 03 07:27:00 CST 2017 0 3049

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM