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" ...
随机推荐
- nginx的简单使用和使用nginx在windows上搭建tomcat集群
nginx是一款轻量级的web服务器,常用的作用为服务器/反向代理服务器以及电子邮件(IMAP/POP3)代理服务器 1.为什么我们要使用Nginx? 反向代理: 反向代理(Reverse Proxy ...
- 170327、Java微信支付中的扫码支付
微信支付现在已经变得越来越流行了,随之也出现了很多以可以快速接入微信支付为噱头的产品,不过方便之余也使得我们做东西慢慢依赖第三方,丧失了独立思考的能力,这次打算分享下我之前开发过的微信支付. 一 H5 ...
- Java switch 详解
switch 语句由一个控制表达式和多个case标签组成. switch 控制表达式支持的类型有byte.short.char.int.enum(Java 5).String(Java 7). swi ...
- Error : .onLoad failed in loadNamespace() for 'rJava', details: call: inDL(x, as.logical(local), as.logical(now), ...) error: 无法载入共享目标对象‘D:/Program Files/R/R-3.2.2/library/rJava/libs/x64/rJava.dll
Error : .onLoad failed in loadNamespace() for 'rJava', details: call: inDL(x, as.logical(local), as. ...
- varints
Protocol Buffer技术详解(数据编码) - Stephen_Liu - 博客园 https://www.cnblogs.com/stephen-liu74/archive/2013/01/ ...
- Macbook pro 13" Installs Ubuntu 18.04
最新版的 MacBook对Ubuntu的支持(或者反过来?)不是很好,但是除了Suspend和resume功能没找到方法使用外,其他都还好,可用. 1.mac在OSX中先安装refind引导,如果开启 ...
- Incorrect string value: '\xF0\x9F\x98\x84\xF0\x9F 表情插入mysql 报错
导致报错的问题是 emoji表情是4位 mysql 5.5.3版本以下数据库(utf8格式为3位),不支持.需要更新mysql5.5.3及以上的版本数据库并设置默认或者表或者字段的格式为 utf8mb ...
- IPython的基本功能(转)
原文:http://kochiya.me/www/posts/Ipython!.html 前几天偶然在公司内网上拖了一本 Learning IPython for Interactive Comput ...
- 解决iOS xcode打包unknown error -1=ffffffffffffffff错误
# 网上很多文档说重启机器,清除缓存什么的,纯属扯淡,都是相互复制粘贴,经测验在stackoverflow找到以下解决方法,亲测可用security unlock-keychain -p " ...
- notepad插件:url变成可以点击的连接