requests.exceptions.MissingSchema: Invalid URL 'xxxxxxxxxxxxx': No schema supplied. Perhaps you meant xxxxxxxxxxxxx
import requests
session = requests.session()
carProposalUrl = "www.caaaa.com.cn/aaaa/aaaaa/carProposalproposal.do"
carProposalHeaders ={
"Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"Accept-Encoding":"gzip, deflate, br",
"Accept-Language":"zh-CN,zh;q=0.8",
"User-Agent":"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.7 Safari/537.36",
"Referer": "http://www.chinalife-p.com.cn/view/default/modal/insuranceCar.html",
"Upgrade-Insecure-Requests":"",
"Connection":"keep-alive",
"Host":"www.chinalife.com.cn"","
} carProposalUrlParams = {
"proposalArea": "",
}
carProposal = session.get(carProposalUrl, params=carProposalUrlParams, headers=carProposalHeaders).text print carProposal
requests.exceptions.MissingSchema: Invalid URL 'xxxxxxxxxxxxx': No schema supplied. Perhaps you meant xxxxxxxxxxxxx
在爬虫的时候遇到这个问题,然后是各种百度,还是不能发现原因,最后向老司机请教后,原来在carProposalUrl = "www.caaaa.com.cn/aaaa/aaaaa/carProposalproposal.do"中的www.前加 http:// 即可
requests.exceptions.MissingSchema: Invalid URL 'xxxxxxxxxxxxx': No schema supplied. Perhaps you meant xxxxxxxxxxxxx的更多相关文章
- requests.exceptions.MissingSchema
requests.exceptions.MissingSchema: Invalid URL '//p9.pstatp.com/list/pgc-image/1538380201743a84869e0 ...
- requests.exceptions.SSLError……Max retries exceeded with url错误求助!!!
import requests head = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Appl ...
- requests 处理异常错误 requests.exceptions.ConnectionError HTTPSConnectionPool [Errno 10060]
使用python requests模块调用vmallarg.vmall.com接口API时报如下错误: requests.exceptions.ConnectionError: HTTPSConnec ...
- python使用requests时报错requests.exceptions.SSLError: HTTPSConnectionPool
报错信息 Traceback (most recent call last): File "<stdin>", line 1, in <module> Fi ...
- pycharm fiddler requests.exceptions.SSLError
一.SSL问题1.不启用fiddler,直接发https请求,不会有SSL问题(也就是说不想看到SSL问题,关掉fiddler就行) 2.启动fiddler抓包,会出现这个错误:requests.ex ...
- python requests.exceptions.ConnectionError
今天遇到一个奇葩问题, 1.r.request.post(url) 2..print r. status_code 居然第一步就报错了,原因是url不正确,按道理应该可以走到第二步然后输入404的 i ...
- Python中request的post请求报requests.exceptions.SSLError:
今天发送一个post请求,提示错误 requests.exceptions.SSLError: HTTPSConnectionPool(host='user.zaful.com', port=443) ...
- 解决python爬虫requests.exceptions.SSLError: HTTPSConnectionPool(host='XXX', port=443)问题
爬虫时报错如下: requests.exceptions.SSLError: HTTPSConnectionPool(host='某某某网站', port=443): Max retries exce ...
- 报错requests.exceptions.InvalidSchema: No connection adapters were found for
刚开始学习,使用requests时,敲了点demo import requests params = { "name": "name", "passw ...
随机推荐
- Distinctive Image Features from Scale-Invariant Keypoints(个人翻译+笔记)-介绍
Distinctive Image Features from Scale-Invariant Keypoints,这篇论文是图像识别领域SIFT算法最为经典的一篇论文,导师给布置的第一篇任务就是它. ...
- win7 64位 php环境开启curl服务Call to undefined function
无法使用curl_init(),一般情况问题可能出在没有去加载php的扩展文件php_curl.dll(windows操作系统),但是检查了一下系统配置,发现,环境下已经将php.ini文件里 ;ex ...
- Java字符串格式化输入({0}/%s)
用法: System.out.println(MessageFormat.format("{0}{1}",1,2)); System.out.println(String.form ...
- Android网络通信框架LiteHttp2.0 开篇简介和大纲目录
本帖最后由 移动天宇 于 2015-10-26 10:42 编辑 LiteHttp2.0很多东东焕然一新,旧的能力也得到增强,没有使用的同学来了解一下吧. Android网络框架为什么可以选用lite ...
- express结合jade模板渲染HTML
在线html转jade工具>> 注意:以下是在Windwo环境下 运行: npm install jade 然后你的目录node_modules下将增加jade文件夹 app.js var ...
- 网页中输出漂亮格式的Php数组神器
写网页的时候经常需要在页面中打印数组,但格式特别难看,看看一个html神器吧<pre>标签,能非常标准的显示数组格式 使用的时候只需要这样打印你的数组就OK了,太好用了,神器! 只需要两句 ...
- ubuntu安装elasticSearch及插件
原文地址:http://www.niu12.com/article/18 前提 1.安装好Java1.8以上环境并配置好JAVA_HOME(elasticsearch运行环境) 2.node环境6.5 ...
- Ceph源码解析:读写流程
转载注明出处,整理也是需要功夫的,http://www.cnblogs.com/chenxianpao/p/5572859.html 一.OSD模块简介 1.1 消息封装:在OSD上发送和接收信息. ...
- pyPdf - 用Python方便的处理PDF文档
pyPdf库 ( http://pybrary.net/pyPdf/ ) ,操作起来相当直接易懂,把代码贴在这儿,做个记录. 1 from pyPdf import PdfFileWriter, P ...
- gdc skin
https://www.gdcvault.com/play/1024410/Achieving-High-Quality-Low-Cost 这篇是教美术怎么用做地形那种方法 复用贴图 做skin的 做 ...