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 ...
随机推荐
- 8VC Venture Cup 2016 - Final Round (Div. 2 Edition) C. XOR Equation 数学
C. XOR Equation 题目连接: http://www.codeforces.com/contest/635/problem/C Description Two positive integ ...
- 修改ORACLE实例名
修改数据库的SID 举例说明,我的数据库的SID叫testdb,现在要改成oral.更改ORACLE数据库的sid,涉及到的用东西比较多,但是大概来说就以下六步. 1.停止所有的Oracle服务. ...
- iOS GCD NSOperation NSThread等多线程各种举例详解
废话就不多说,直接上干货.如下图列举了很多多线程的知识点,每个按钮都写有对应的详细例子,并对运行结果进行分析,绝对拿实践结果来说话.如果各位道友发现错误之处还请指正.附上demo下载地址
- Maven命名规范收集
一.基本命名规范: groupId:定义当前Maven项目隶属的实际项目,例如org.sonatype.nexus,此id前半部分org.sonatype代表此项目隶属的组织或公司,后部分代表项目的名 ...
- python多线程以及同步队列(转)
转自:http://www.w3cschool.cc/python/python-multithreading.html 多线程类似于同时执行多个不同程序,多线程运行有如下优点: 使用线程可以把占据长 ...
- 实现自动解析properties文件并装配到Bean
主要实现了,配置的属性就装配, 没有配置的属性不装配 思路: 1 . 通过反射获取类内部所有方法名称 2 . 获取perperties 的key集合 3 . 处理字符串,比较两个匹配,如果匹配成功就 ...
- 【JSP EL】使用EL表达式比较 动态选中 select中的option
<option value="${k.key }" ${KPIThis.parent.parent.thisId == k.key ? "selected" ...
- Code Review: 超越“审、查、评”的代码回顾
http://news.cnblogs.com/n/532148/ 文/TWInsights-伍斌 Code Review 应该是软件开发团队“共同学习.识别模式和每日持续”的过程,而不是带有“审.查 ...
- Oracle 11gR2 RAC的两个bug
Oracle 11.2.0.2 bug还是不少的.很多库迁到Oracle 11.2.0.2后都遇到了问题.现在正在跟的两个Oracle 11.2.0.2上的问题:1.ORA-00600: inte ...
- matlab中cell array的理解
1. matlab中有一个函数iscell() 用于判断一个数组是不是cell array 参考:MATLAB Function Reference iscell Determine whether ...