使用Curl在Windows 7中获取Https网页 [英] Using Curl to get a Https webpage in Windows 7
问题描述
我只需要提取一个https页面,我目前使用curl在我的路径中的curl.exe应用程序,并用一个Perl文件调用它。但是,然后,我得到错误*协议https不支持或禁用libcurl。我一直在环顾四周,我找不到一套牢固的说明来使它工作。我安装了cygwin和OpenSSL-Win32,但有些东西告诉我,我要从头开始编译curl。我没有这方面的经验。
I just need to fetch an https page, and I'm using curl currently by having the curl.exe application in my Path and calling it with a Perl file. However, then I get the error "* Protocol https not supported or disabled in libcurl". I've been looking around and I can't find a solid set of instructions to get it to work. I have installed cygwin, and OpenSSL-Win32 but something tells me I'm going to have to compile curl from scratch. I have no experience with this. How do you do it?
推荐答案
我发现以下步骤运作良好
I found the below steps worked well
- 下载并解压缩64位 cURL with SSL 。
- 下载最新的证书授权中心公钥包来自mozilla.org。
- 将此文件从cacert.pem重命名为curl-ca-bundle.crt
- 他们在
PATH
环境中。
- Download and unzip 64-bit cURL with SSL.
- Download the latest bundle of Certficate Authority Public Keys from mozilla.org.
- Rename this file from cacert.pem to curl-ca-bundle.crt
- Make sure both of them are in the
PATH
environment.
测试
curl -L https://www.google.com
UPDATE
如果您开放尝试其他工具,我认为 httpie 也是一个不错的选择。
If you are open to try other tools, I think httpie is also a good alternative.
这篇关于使用Curl在Windows 7中获取Https网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!