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" ...
随机推荐
- c#基础 第五讲
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threa ...
- 查看嵌入式设备的CPU频率
对于有多个核心的CPU,查看CPU 频率的方法是: cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq 上面的这个是查看核心0的cpu的 ...
- nodejs(二)
nodejs第二章节 回调函数 Node.js 异步编程的直接体现就是回调 异步编程依托于回调来实现 例子1:http服务器回调 var http = require(“http”);//引入一个ht ...
- Java 之设计模式(总述)
1. 面向对象设计原则 单一职责原则: 一个类只负责一个功能领域中的相应职责 开闭原则: 软件实体应对扩展开放,而对修改关闭; 里氏代换原则: 所有引用基类对象的地方能够透明地使用其子类的对象; 依赖 ...
- 剑指Offer——二叉搜索树的后序遍历序列
题目描述: 输入一个整数数组,判断该数组是不是某二叉搜索树的后序遍历的结果.如果是则输出Yes,否则输出No.假设输入的数组的任意两个数字都互不相同. 分析: 二叉查找树(Binary Search ...
- 【我的Android进阶之旅】推荐一款视频转换GIF图片格式的转换工具(Video to GIF)
一.背景 最近想把一些Android Demo的运行效果图获取下来,但是一直使用真机进行调试,在电脑上不好截取一段gif动画.而之前使用模拟器的时候可以使用 GifCam 工具进行屏幕动画截取.Gif ...
- IIS7.5 错误代码0x8007007e HTTP 错误 500.19
目录 问题案例 解决问题 参考资料 问题案例 今天在win2008+IIS7.5的环境中部署WCF服务后,一直出现无法打开的页面.具体错误信息如下: HTTP 错误 500.19 - Internal ...
- 压力测试工具sysbench
sysbench是一个模块化.跨平台.多线程基准测试工具,主要用于测试不同系统参数下的数据库负载情况,本文主要介绍0.4版本的使用.sysbench主要用于以下性能测试: 文件I/O性能 调度 内存分 ...
- C# 获取计算机cpu 硬盘 网卡信息
/// <summary>/// 机器码 /// </summary> public class MachineCode { ...
- 关于cgi、FastCGI、php-fpm、php-cgi(复制)
首先,CGI是干嘛的?CGI是为了保证web server传递过来的数据是标准格式的,方便CGI程序的编写者. web server(比如说nginx)只是内容的分发者.比如,如果请求/index.h ...