2018年3月29日

网络爬虫基础练习

摘要: import requests from bs4 import BeautifulSoup res = requests.get('http://news.qq.com/') res.encoding = 'UTF-8' soup = BeautifulSoup(res.text, 'html.parser') # 取出h1标签的文本 for h1 in soup.find_all('h1')... 阅读全文

posted @ 2018-03-29 20:41 182冯志坚 阅读(95) 评论(0) 推荐(0) 编辑

导航