![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
爬虫
那个邱先森
这个作者很懒,什么都没留下…
展开
-
Python爬虫入门【2】几种简单的防爬方法
Python爬虫入门【2】headers随机间隔IP代理池 记录一下常用的几种反爬方法。 headers 具体应该说是headers中的User-Agent,通过构建agent池来模拟不同浏览器访问,以达到反爬的作用。简单方法如下 user_agent_list = [ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36原创 2021-03-28 17:36:03 · 411 阅读 · 0 评论 -
Python爬虫入门【1】
Python爬虫入门1爬虫基础工具抓取页面 爬虫基础 工具 anaconda + juypter 是的,就是这么简单粗暴,anaconda 去清华大学镜像站下载,速度max 抓取页面 from bs4 import BeautifulSoup import requests url = 'www.sohu.com' headers={'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, lik原创 2021-03-08 23:38:00 · 125 阅读 · 1 评论 -
python 获取二进制图片数据及判断得到图片类型
只要一个包 imghdr import imghdr imgtype = imghdr.what('/tmp/bass.gif') imgtype = imghdr.what(None, data) 完美解决原创 2020-02-23 19:58:46 · 2503 阅读 · 0 评论