Re: Wget fails to download some URLs from www.investing.com

Tim Rühsen <[email protected]> Sun, 18 Feb 2024 13:56:11 +0100
Newsgroups gmane.comp.web.wget.general
Message-ID <[email protected]>
On 2/14/24 11:21, Chris Smith via Primary discussion list for GNU Wget 
wrote:
> Hi guys,
> This is not so much a bug as requests being blocked by the cloudflare server.
> 
> Checkout:
>      https://www.investing.com/crypto/bitcoin/btc-usd-historical-data

The server just gives a 403 Forbidden.

> 
> The URL works in Firefox, but fails to download using cURL or Wget.
> I have tried various user-agent strings, so that is not the problem.

Maybe the page requires a Referrer: header? In theory it could be 
anything, e.g. the page is HTTP/3 only or whatnot :|

You can start with F12 (developer console) in Firefox, load the page and 
check the request headers. Or better: there is a copy-as-curl when 
right-clicking on the request line that puts a full curl command line 
into your clipboard.

> 
> The following URL works for Firefox, cURL and Wget:
>      https://www.investing.com/equities/lloyds-banking-grp-historical-data
> 
> Kind regards,
> Chris Smith <[email protected]>
> 
> _________________________________________________________________
> ________________________________________________________
> Your E-Mail. Your Cloud. Your Office. eclipso Mail Europe. https://www.eclipso.de
> 
> 
>
OpenPGP_signature.asc (application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE-----

wsF5BAABCAAjFiEEHLJ9vJhhSy1YQWRtCDAttqJnBCgFAmXR/msFAwAAAAAACgkQCDAttqJnBCia
2w//cunNdZYLjHeJJ0RjtdONbzfQfpHzVw5cxNaTB1SIsILa+GWQYp4VU/U4wnlp5WzsC8NRmKON
f7zlmBtm2i6PoYJnlqFFE8eXdqBjenZwR5TkQv9s1/OMVU/GeOjn0UeqQp7kCPcm3HE6fzBbhHZW
MgpVj7ScbTieiEe1FeWmaUxTb2XDUHB25x464r/HgLoRmvH6ocWczbWJjajCcJgLkrk8To6lOj3i
OKWyaFUfheb8vnCVvgz9vrbmB8oMSwL/Ea7SIjodvqn4oQvD2DrHt2Rm6dlo6hYrVMycci+IA6uV
f4k/z4q8+R0KdXw+5iaH8ZfhxjLAdDeJ1vhq1WyNSunGS6iL+MHuYwYbYXSGxExhe5lEWolt8HOL
jhacBqgrlGDS4/R4EAuJuzulVH1o/X0xeZI3of04vGK9MtIZM7gJqVN+9Di/YQJrtJ+EsJOKZhKt
8BLs640hU1rlcg4CViPcSklOE79DMGbQpO46XuFQkBCDZya5Q8ljTR1/o5GGAA3mtZfsplTQEXDo
+uPrH9VDUugUQYWsvnLjnrwx1jlCbfYULlRXpTT7LxVY19Y4Y4/SA9z38IasaxvE63zhgvOhvJC7
CL0T/QXbU7KswEjW3AiZ5obY7U5ADpVdog0+/3Y0nzvyaavEOFtjLCF6Q84koam7aGZxfkmiWRnG
wT8=
=OnXn
-----END PGP SIGNATURE-----