摘要: 实例1:京东商品页面的爬取 import requests url="https://item.jd.com/2967929.html" try: r=requests.get(url) r.raise_for_status() r.encoding=r.apparent_encoding prin 阅读全文
posted @ 2017-12-19 20:32 扬帆_一点零 阅读(209) 评论(0) 推荐(0)
摘要: 1、安装 Win 平台:“以管理员身份运行” cmd,执行 pip install requests 小测: >>>import requests >>>r=requests.get("http://www.baidu.com") >>>print(r.status_code) 200 >>>r.t 阅读全文
posted @ 2017-12-19 19:46 扬帆_一点零 阅读(386) 评论(0) 推荐(0)