python
lupo_guo
这个作者很懒,什么都没留下…
展开
-
网络图片爬取和ip获取
网络图片的爬取和存储 import requests path = "F:/photo.jpg" url = "https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=d&word=%E9%98%BF%E5%B0%94%E5%8D%91%E6%96%AF%E5%B1%B1&step_word=&h...原创 2020-02-06 22:08:49 · 600 阅读 · 0 评论 -
网络爬虫
网络爬虫 网络爬虫的尺寸: Requests库:小规模,数据量小,爬取速度不敏感,爬网页 Scrapy库:中规模,数据规模较大,爬取速度敏感,爬网站 定制开发:爬取全网,如google,baidu Robots协议 Robots Exclusion Standard网络爬虫排除标准 案例: https://www.jd.com/robots.txt User-agent: * //对于任何网...原创 2020-02-06 18:50:41 · 148 阅读 · 0 评论 -
爬取网页的通用代码框架
通用代码: import requests def getHTMLText(url): try: r = requests.get(url,timeout=30) r.raise_for_status() r.encoding = r.apparent_encoding #使得解码正确 return r.text #返回网页内容 except: return"产生异...原创 2020-02-05 22:46:59 · 167 阅读 · 0 评论 -
request使用
Python 网络爬虫与信息提取: 1.requests库入门 2.网络爬虫的盗亦有道 3.requests库爬取实例 Requests的使用: import requests r = requests.get(url) 例:r = requests.get(“http://baidu.com”) r = requests.get(url,params=None,**kwargs) 其中url代表...原创 2020-02-05 22:16:27 · 95 阅读 · 0 评论 -
常用Python IDE工具(Intergrated developed environment ):
常用Python IDE工具(Intergrated developed environment ): 文本工具类IDE: 1.IDLE: python自带,常用于300行以下,分为交互式和文本式 2.Sublime text:为程序员准备 3.Notepad++ 集成工具类IDE: Pycharm:分社区免费版和收费版,最简单,集成度高。 Wing:收费IDE,调试方便 PyDev:基于Ec...原创 2020-02-05 20:15:49 · 480 阅读 · 0 评论