1

HTTPS URL から画像をダウンロードする必要があります。リモート HTTP URL から cURL を使用して画像をダウンロードできることはわかっていますが、HTTPS プロトコルでは失敗し、空白の画像が返されます。

それを行うための特別なトリックはありますか?画像をダウンロードする必要があるウェブサイトは amazon.com です

4

1 に答える 1

1

curlHTTPS では問題なく動作します。マニュアルページから:

   curl  is  a  tool to transfer data from or to a server, using one of the
   supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP,  HTTPS,  IMAP,
   IMAPS,  LDAP,  LDAPS,  POP3,  POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS,
   TELNET and TFTP).  The command is designed to work without user interac-
   tion.

証明書の検証の問題が発生している可能性があります。curlこれらを無視するように指示でき-kます。オプションを参照してください。

   -k, --insecure
          (SSL)  This  option  explicitly allows curl to perform "insecure"
          SSL connections and transfers. All SSL connections are  attempted
          to be made secure by using the CA certificate bundle installed by
          default. This makes all connections  considered  "insecure"  fail
          unless -k, --insecure is used.

          See     this     online    resource    for    further    details:
          http://curl.haxx.se/docs/sslcerts.html
于 2013-11-07T00:16:13.063 に答える