curl
を使用して、WikipediaやWikiquoteのようなWikiMediaサイトからコンテンツをダウンロードすることはできません。WikiMediaサイトでの「curl」の問題
私は私が手にしてみてください:
~$ /usr/bin/curl -v "http://en.wikipedia.org/wiki/Celsius"
* Trying 2620:0:863:ed1a::1...
* TCP_NODELAY set
* Connected to en.wikipedia.org (2620:0:863:ed1a::1) port 80 (#0)
> GET /wiki/Celsius HTTP/1.1
> Host: en.wikipedia.org
> User-Agent: curl/7.52.1
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Date: Fri, 19 May 2017 22:09:49 GMT
< Server: Varnish
< X-Varnish: 350654144
< X-Cache: cp4017 int
< X-Cache-Status: int
< Set-Cookie: WMF-Last-Access=19-May-2017;Path=/;HttpOnly;secure;Expires=Tue, 20 Jun 2017 12:00:00 GMT
< Set-Cookie: WMF-Last-Access-Global=19-May-2017;Path=/;Domain=.wikipedia.org;HttpOnly;secure;Expires=Tue, 20 Jun 2017 12:00:00 GMT
< X-Client-IP: 2605:a601:1127:7d00:35a2:5040:e002:9949
< Location: https://en.wikipedia.org/wiki/Celsius
< Content-Length: 0
< Connection: keep-alive
<
* Curl_http_done: called premature == 0
* Connection #0 to host en.wikipedia.org left intact
と実際の内容。同じURLはwget
で正常にダウンロードされます。 curl
で他のウェブサイトをダウンロードすることもできます。 curl
とこれを引き起こしているWikiMediaサイト(wikipedia、wikiquote、...)の組み合わせはonluです。
私はUnuntu-MATE 17.04を使用しています。私のカールのバージョンは次のとおりです:
/usr/bin/curl --version
curl 7.52.1 (x86_64-pc-linux-gnu) libcurl/7.52.1 OpenSSL/1.0.2g zlib/1.2.11 libidn2/0.16 libpsl/0.17.0 (+libidn2/0.16) librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy PSL
何か問題が起こっている可能性がありますか?
ウィキペディアは[ほぼ2年前](https://blog.wikimedia.o)ですrg/2015/06/12/secure-ウィキメディアサイト - https /)。 – Tgr