ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.54k stars 10.05k forks source link

Tumblr media no longer captures due to privacy redirect #16681

Open spongbros opened 6 years ago

spongbros commented 6 years ago
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--ignore-config', '-v', 'http://spudislander.tumblr.com/post/171230775471/inspired-by-the-250-miles-post-i-made-this-out-of']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2018.06.04
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
[debug] exe versions: ffmpeg N-89980-ge752da5464, ffprobe N-89980-ge752da5464, rtmpdump 2.3
[debug] Proxy map: {}
[Tumblr] 171230775471: Downloading webpage
[generic] consent?redirect=http://spudislander.tumblr: Requesting header
WARNING: Could not send HEAD request to https://www.tumblr.com/privacy/consent?redirect=http%3A%2F%2Fspudislander.tumblr.com%2Fpost%2F171230775471%2F: HTTP Error 404: Not Found
[generic] consent?redirect=http://spudislander.tumblr: Downloading webpage
WARNING: Falling back on generic information extractor.
WARNING: URL could be a direct video link, returning it as such.
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'https://www.tumblr.com/privacy/consent?redirect=http%3A%2F%2Fspudislander.tumblr.com%2Fpost%2F171230775471%2F'
[download] Destination: consent-consentredirect=http -__spudislander.tumblr.unknown_video
[download] 100% of 161.92KiB in 00:00
<end of log>

Trying to download from a Tumblr URL no longer works. It looks like youtube-dl's getting tripped up on the recently-added privacy consent screen - youtube-dl tries to parse media information from the consent page instead of continuing on to the actual post. It would be best if youtube-dl automatically worked around this instead of requiring users to fiddle around with cookies.

akaleeroy commented 6 years ago

instead of requiring users to fiddle around with cookies.

Besides cookies you have to also supply the browser's user agent string: This command worked:

youtube-dl --no-check-certificate --cookies C:\cookies.txt --user-agent "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36" <url>
moonlit commented 5 years ago

This could also explain why embedded youtube_dl (which seems to lack a user-agent setting) is failing on sensitive media even with a cookies file.