HTTPS URL から画像をダウンロードする必要があります。リモート HTTP URL から cURL を使用して画像をダウンロードできることはわかっていますが、HTTPS プロトコルでは失敗し、空白の画像が返されます。
それを行うための特別なトリックはありますか?画像をダウンロードする必要があるウェブサイトは amazon.com です
HTTPS URL から画像をダウンロードする必要があります。リモート HTTP URL から cURL を使用して画像をダウンロードできることはわかっていますが、HTTPS プロトコルでは失敗し、空白の画像が返されます。
それを行うための特別なトリックはありますか?画像をダウンロードする必要があるウェブサイトは amazon.com です
curl
HTTPS では問題なく動作します。マニュアルページから:
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