thispersondoesnotexist.com的curl失败,结果为空



我正在尝试使用卷曲来获取生成的图像,但是当我运行

curl https://thispersondoesnotexist.com/ > image.jpg

我得到错误

curl: (92) HTTP/2 stream 0 was not closed cleanly: INTERNAL_ERROR (err 2)

和0字节下载。

添加-HTTP1.1标志无济于事:

 curl --http1.1 https://thispersondoesnotexist.com > imagex.jpg
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current   Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (52) Empty reply from server

查看网站,我无法弄清楚它实际将图像转移到浏览器中 - 我在调试器中看到了图像,但是它似乎不是我可以实际写的输出。

我不是要经营一个巨魔农场或任何东西,这只是一个为面部分析生成一些随机图片的项目。

看起来他们拒绝卷曲作为用户代理,因此请转到Chrome,Open Network面板和重新加载以查看请求。这是我的外观:

curl 'https://thispersondoesnotexist.com/image' -H 'authority: thispersondoesnotexist.com' -H 'cache-control: max-age=0' -H 'dnt: 1' -H 'upgrade-insecure-requests: 1' -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36' -H 'sec-fetch-mode: navigate' -H 'sec-fetch-user: ?1' -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3' -H 'sec-fetch-site: none' -H 'referer: https://thispersondoesnotexist.com/' -H 'accept-encoding: gzip, deflate, br' -H 'accept-language: en-US,en;q=0.9'  --compressed  --output image.jpg

最新更新