摘要: BeautifulSoup 一个灵活又方便的网页解析库,处理高效,支持多种解析器。利用它就不用编写正则表达式也能方便的实现网页信息的抓取。 Beautiful Soup支持多种解析器, Python有默认的解析器,推荐安装lxml 解析器,效率高,速度快。 用法 标签选择器 print(soup.t 阅读全文
posted @ 2018-12-26 15:01 才华充电中 阅读(206) 评论(0) 推荐(0) 编辑
摘要: requests requests是python实现的简单易用的HTTP库,使用起来比urllib简洁很多 一、用法 1、各种请求方式 import requests requests.get('http://httpbin.org/get') requests.post('http://httpb 阅读全文
posted @ 2018-12-26 14:27 才华充电中 阅读(304) 评论(0) 推荐(0) 编辑