这是我下载文件的 curl 命令。下载的文件已损坏,无法打开。文件网址为https://www.carscoops.com/wp-content/uploads/2022/12/Buick-Encore-GX-Scoop-4.jpg
curl -iv --output abc.jpg --request GET \
--url https://www.carscoops.com/wp-content/uploads/2022/12/Buick-Encore-GX-Scoop-4.jpg
我什至尝试使用 chrome 的完整卷曲副本,但它没有用
curl 'https://www.carscoops.com/wp-content/uploads/2022/12/Buick-Encore-GX-Scoop-4.jpg' --output "abc.jpg" \
-H 'authority: www.carscoops.com' \
-H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'cache-control: no-cache' \
-H 'pragma: no-cache' \
-H 'sec-ch-ua: "Not?A_Brand";v="8", "Chromium";v="108", "Google Chrome";v="108"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
-H 'sec-fetch-dest: document' \
-H 'sec-fetch-mode: navigate' \
-H 'sec-fetch-site: none' \
-H 'sec-fetch-user: ?1' \
-H 'upgrade-insecure-requests: 1' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36'
它也不会工作wget
,但仍然可以通过浏览器访问,什么样的技术可以防止它下载?