上一页 1 ··· 55 56 57 58 59 60 61 62 63 ··· 66 下一页
摘要: 此工具用于抓取302等看不到的包。 设置: 步骤一 步骤二 重启fiddler软件,设置才有效。 设置谷歌浏览器,使浏览器的访问都经过fiddler。(fiddler就成了代理了)设置如下 隐藏图片的抓取过程 阅读全文
posted @ 2018-01-18 01:26 安迪9468 阅读(159) 评论(0) 推荐(0) 编辑
摘要: #coding:utf-8 import requests # url = 'http://www.baidu.com' # response = requests.get(url) # print (response.cookies) # print (type(response.cookies)) # 将cookjar转换成字典格式的cookies # dict_cookies = ... 阅读全文
posted @ 2018-01-18 00:29 安迪9468 阅读(115) 评论(0) 推荐(0) 编辑
摘要: (一)如何带cookies请求 方法一:headers中带cookies 方法二:get方法参数中带cookies (二)session的状态保持。 有了session后,第二次请求是,就不用再传cookies、headers了。 阅读全文
posted @ 2018-01-18 00:22 安迪9468 阅读(673) 评论(0) 推荐(0) 编辑
摘要: requests库的post请求 阅读全文
posted @ 2018-01-17 23:57 安迪9468 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 带headers的请求 带get传参的请求 get带有代理的请求: 阅读全文
posted @ 2018-01-17 23:13 安迪9468 阅读(1390) 评论(0) 推荐(0) 编辑
摘要: 现在新建*.py文件试试效果 阅读全文
posted @ 2018-01-17 14:28 安迪9468 阅读(465) 评论(0) 推荐(0) 编辑
摘要: pipelines.py settings.py 阅读全文
posted @ 2018-01-17 01:59 安迪9468 阅读(202) 评论(0) 推荐(0) 编辑
摘要: spider爬虫,适合meta传参的爬虫(列表页,详情页都有数据要爬取的时候) crawlspider爬虫,适合不用meta传参的爬虫 scrapy genspider -t crawl it it.com 链接提取器的使用 scrapy shell http://hr.tencent.com/po 阅读全文
posted @ 2018-01-17 01:49 安迪9468 阅读(285) 评论(0) 推荐(0) 编辑
摘要: scrapy 如何发送post请求。代码如上。 方法二:针对从首页重定向到登录页面的post登录 阅读全文
posted @ 2018-01-17 00:29 安迪9468 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 私有化 xx: 公有变量 _x 单前置下划线,对模块中的变量、函数、类进行私有化。类在使用from xxx import *时都不会被导入,但在模块内,可以访问。(注意:如果在XXX模块中,__all__=[……, " _x ", ……]中有但前置下划线变量、函数,则没有私有化,*号导入也可使用) 阅读全文
posted @ 2018-01-16 23:51 安迪9468 阅读(227) 评论(0) 推荐(0) 编辑
上一页 1 ··· 55 56 57 58 59 60 61 62 63 ··· 66 下一页