python error: curl: (1) Protocol "'https" not supported or disabled in libcurl
python 调用curl访问一个网页时,出现error: curl: (1) Protocol "'https" not supported or disabled in libcurl
控制台直接curl xxx是ok的
output = subprocess.check_output(["curl","https://stackoverflow.com/questions/6884669/curl-1-protocol-https-not-supported-or-disabled-in-libcurl"]) # error
print(output)
这边有一个解决方案,但是对此并没有解决问题,原来是双引号的问题,换成但引号就解决问题了,一直以为但引号双引号都能表示字符串,具体为什么还不是很清楚,但是能解决问题了,需要深入再去了解下,如知请告诉我下
output = subprocess.check_output(["curl",‘https://stackoverflow.com/questions/6884669/curl-1-protocol-https-not-supported-or-disabled-in-libcurl’]) # ok
print(output)
看demo也是单引号,curl支持但引号吗? 测试了下 pycurl都支持 但引号双引号一样
import pycurl
c = pycurl.Curl()
c.setopt(c.URL, 'https://www.taobao.com')
c.perform()
另外该error:
可能其他原因:
1、curl 不支持https 可以用curl -V 查看
对应解决方法是重新安装curl 可参考:http://www.codeweblog.com/curl%e4%b8%8d%e6%94%af%e6%8c%81https%e5%8d%8f%e8%ae%ae%e9%97%ae%e9%a2%98%e8%a7%a3%e5%86%b3/
wget http://archive.ubuntu.com/ubuntu/pool/main/c/curl/curl_7.35.0.orig.tar.gz
tar -xzvf curl_7.35.0.orig.tar.gz
cd curl_7.35.0.orig
./configure
make
sudo make install
2、引号内有空格 “ https”
python error: curl: (1) Protocol "'https" not supported or disabled in libcurl的更多相关文章
- windows下curl报错:curl : (1) Protocol https not supported or disabled in libcurl
如果命令语句中有单引号,改为英文双引号试一下
- Protocol https not supported or disabled in libcurl
最后用PHP Curl 模拟访问HTTPS ,总是得到 Protocol https not supported or disabled in libcurl 错误,奇怪了,找了很多资料,有人说没有开 ...
- curl Protocol 'http not supported or disabled in libcurl
C:\Documents and Settings\ganiks.liu\Desktop\curl-7.37.0-win32\bin>curl -V curl 7.37.0 (i386-pc-w ...
- 血的教训:Protocol http not supported or disabled in libcurl
报错显示:http not supported or disabled in libcurl 查看配置 curl -V ---------------------------------------- ...
- protocol http not supported or disabled in libcurl apt-get
ubuntu 14.04 碰到了这个莫名其妙的问题.谷歌了一把,解决方案如下:http://askubuntu.com/questions/683857/curl-1-protocol-https-n ...
- php中curl不支持https的解决办法
在php程序中使用curl去访问https站点时,报错:Protocol https not supported or disabled in libcurl 该错误信息表示php当时编译时使用的cu ...
- git clone 报错 fatal: protocol 'https' is not supported 解决办法
版本:git 2.22.0 系统:win7旗舰版 先把https去掉 再把https加上 神奇的事情出现了,这样就可以了. 很多人都说这样解决了,原因不知道. Administrator@BWE8QX ...
- Linux中Curl命令couldn't connect to host解决方案 php操作Curl(http,https)无法获取远程数据解决方案
本人在做百度账户第三方登录接口,获取百度token,利用php操作curl post方式发送请求token,出现couldn't connect to host错误.经过调试测试,最后终于成功.回头写 ...
- npm install Error:EPROTO: protocol error, symlink '../mime/cli.js' -> '/vagrant/src/nodejs/node_modules/express/node_modules/send/node_modules/.bin/mime'
我在ubuntu上使用npm安装依赖是出现下面错误: npm ERR! Linux 3.13.0-101-genericnpm ERR! argv "/usr/bin/nodejs" ...
随机推荐
- python 学习源
入门 w3cschool https://www.w3cschool.cn/python/ 菜鸟教程(支持在线编程) http://www.runoob.com/python/python-tutor ...
- Python全栈day13(作业讲解字典嵌套实现用户输入地址信息添加及查看)
要求: 列出字典对应节点名称,根据用户输入可以添加节点,查看节点等功能,这里以地址省-市-县等作为列子,此题熟悉字典嵌套功能 vim day13-16.py db = {} path = [] whi ...
- C#批量入库
public static void BulkCopyToDB(DataTable dt, string conn, string tableName, out string msg) { msg = ...
- ondrag事件
ondragstart 事件在用户开始拖动元素或选择的文本时触发. 拖放是 HTML5 中非常常见的功能. 更多信息可以查看我们 HTML 教程中的 HTML5 拖放. 注意: 为了让元素可拖动,需要 ...
- Googlebot (Google Web search)
w推测“域名解析过程中,Google crawlers中首先是Googlebo中的Google Web search上阵”. +-----+----------------+------------- ...
- A TCP connection is distinguished by four values
4个值唯一地定义一条TCP连接. HTTP The Definitive Guide A computer might have several TCP connections open at any ...
- web容器与web服务器
apache.nginx 这类是web服务器tomcat.jboss.Kestrel(asp.net core) 这类是web容器而iis.jexus 两者都是 apache.nginx 是不能直接跑 ...
- app瘦身和包压缩技术有什么区别?
APP瘦身 针对app文件中的文件进行优化,利用素材的拉伸,祛除不必要的文件,优化png, jpg素材,压缩音视频素材等方式实现app文件的减小. 包压缩技术 所谓包压缩,顾名思义就是将手游的安装包体 ...
- CentOS7安装MySQL 5.7
1.源码包下载 wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-boost-5.7.20.tar.gz 2.编译安装 安装依赖包: y ...
- Python 有什么奇技淫巧?
知乎上有一个问题:Python 有什么奇技淫巧?其中有各种不按套路出牌的招数,也不乏一些惊为天人的"奇技淫巧",会让你大呼:居然还有这种操作??? 本文就是对日常使用过的或者觉得很 ...