”No data received”: UA spoofing required for download to work

5. heinäkuuta 2019 klo 15.12
Sijainti: Vianhallintajärjestelmät: Github
Avainsanat: wget

I’m using yle-dl 20190614 with GNU Wget 1.19.4 in Ubuntu 18.04.

When trying to download this (and so far this is the only example I’ve come across): https://areena.yle.fi/1-50192791

Wget fails like this:

Resolving ylekaod-a.akamaihd.net (ylekaod-a.akamaihd.net)... 62.183.170.32, 62.183.170.35
Connecting to ylekaod-a.akamaihd.net (ylekaod-a.akamaihd.net)|62.183.170.32|:443... connected.
HTTP request sent, awaiting response... No data received.
Retrying.

It tries a few more times, then gives up. I’m attaching --verbose log (with LC_ALL=C).

Workaround

I took the wget command from –verbose output and added UA spoofing with -U 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.27 Safari/537.17', and with the resulting command I was able to download the file.

Vastaa viestiin sen kontekstissa (Github)