Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to download from youtube.com when logged in with a valid cookie #26554

Open
harroguk opened this issue Sep 8, 2020 · 2 comments
Open

Unable to download from youtube.com when logged in with a valid cookie #26554

harroguk opened this issue Sep 8, 2020 · 2 comments

Comments

@harroguk
Copy link

@harroguk harroguk commented Sep 8, 2020

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2020.09.06
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones

Verbose log

Request subscription playlist (To prove my cookie is good)

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-j', '--flat-playlist', '--cookies', 'D:\\scripts\\Powershell\\youtube-dl\\cookies.txt', '--playlist-end', '10', '--verbose', 'https://www.youtube.com/feed/subscriptions']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dl version 2020.09.06
[debug] Python version 3.8.3 (CPython) - Windows-2012ServerR2-6.3.9600-SP0
[debug] exe versions: ffmpeg git-2020-06-03-b6d7c4c, ffprobe git-2020-06-03-b6d7c4c
[debug] Proxy map: {}
{"_type": "url", "url": "7CwF3TpvcT0", "ie_key": "Youtube", "title": "Final Judging: 2020 Generative Design in Minecraft Competition"}
{"_type": "url", "url": "FmTxV3Qr-ro", "ie_key": "Youtube", "title": "Halo 3 Mythbusters - Vol. 5"}
{"_type": "url", "url": "YzA5EvBDOp0", "ie_key": "Youtube", "title": "Kingdoms of Amalur: Re-Reckoning Gameplay - Ellen Plays KoA LIVE!"}
{"_type": "url", "url": "6SfJ3Lj3zKg", "ie_key": "Youtube", "title": "7 Weirdest Things People Have Played Videogames On"}
{"_type": "url", "url": "AS1DgLmvlV0", "ie_key": "Youtube", "title": "CD Projekt Clarifies Microtransaction Controversy | New Xbox Price Revealed | Avengers Tops Charts"}
{"_type": "url", "url": "3oycBiqs6Rw", "ie_key": "Youtube", "title": "You're Grounded | FailArmy"}
{"_type": "url", "url": "jbERnd5EOAk", "ie_key": "Youtube", "title": "EA Tried Putting Intrusive Adverts Into UFC 4 Because It's Pure Slime"}
{"_type": "url", "url": "GFsSmRuBHps", "ie_key": "Youtube", "title": "The Importance Of The Overtake Button"}
{"_type": "url", "url": "qEzx5aGNxQw", "ie_key": "Youtube", "title": "Crash Bandicoot 4: It's About Time - New Character Reveal"}
{"_type": "url", "url": "hhX-X9Vhj0U", "ie_key": "Youtube", "title": "Russell Peters Talks Hip-Hop and Lists His Top 5 Comedians | Tacos Con Todo"}

Request first video from playlist (To show error)

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--cookies', 'D:\\scripts\\Powershell\\youtube-dl\\cookies.txt', '--verbose', '--output', 'D:\\TV\\YouTube\\%(uploader)s [%(channel_id)s]\\%(uploader)s - s2020e1090818%(playlist_index)s - %(title)s  [%(id)s].%(ex
t)s', 'https://www.youtube.com/watch?v=7CwF3TpvcT0']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dl version 2020.09.06
[debug] Python version 3.8.3 (CPython) - Windows-2012ServerR2-6.3.9600-SP0
[debug] exe versions: ffmpeg git-2020-06-03-b6d7c4c, ffprobe git-2020-06-03-b6d7c4c
[debug] Proxy map: {}
[youtube] 7CwF3TpvcT0: Downloading webpage
ERROR: 7CwF3TpvcT0: YouTube said: Unable to extract video data
Traceback (most recent call last):
  File "c:\installedprograms\python38\lib\site-packages\youtube_dl\YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "c:\installedprograms\python38\lib\site-packages\youtube_dl\extractor\common.py", line 530, in extract
    ie_result = self._real_extract(url)
  File "c:\installedprograms\python38\lib\site-packages\youtube_dl\extractor\youtube.py", line 1893, in _real_extract
    raise ExtractorError(
youtube_dl.utils.ExtractorError: 7CwF3TpvcT0: YouTube said: Unable to extract video data

Request same video without cookie (To show that its something that my users is specifically being served)

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', '--output', 'D:\\TV\\YouTube\\%(uploader)s [%(channel_id)s]\\%(uploader)s - s2020e1090818%(playlist_index)s - %(title)s  [%(id)s].%(ext)s', 'https://www.youtube.com/watch?v=7CwF3TpvcT0']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dl version 2020.09.06
[debug] Python version 3.8.3 (CPython) - Windows-2012ServerR2-6.3.9600-SP0
[debug] exe versions: ffmpeg git-2020-06-03-b6d7c4c, ffprobe git-2020-06-03-b6d7c4c
[debug] Proxy map: {}
[youtube] 7CwF3TpvcT0: Downloading webpage
[youtube] 7CwF3TpvcT0: Downloading m3u8 information
[youtube] 7CwF3TpvcT0: Downloading MPD manifest
[debug] Default format spec: best/bestvideo+bestaudio
[debug] Invoking downloader on 'https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1599615598/ei/Dt5XX7XRCoGPwQGZ2ImQBw/ip/174.91.53.73/id/7CwF3TpvcT0.0/itag/300/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/g
oi/160/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3Dyes%3Bitag%3D298/hls_chunk_host/r2---sn-cxaaj5o5q5-tt1y.googlevideo.com/playlist_duration/30/manifest_duration/30/vprv/1/playlist_type/DVR/mh/D3/mm/44/mn/sn-cxaaj5o5q5-tt1y/ms/lva/mv/u/mvi/2/p
l/24/dover/11/keepalive/yes/mt/1599593645/disable_polymer/true/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,live,goi,sgoap,sgovp,playlist_duration,manifest_duration,vprv,playlist_type/sig/AOq0QJ8wRAIgTQ42t4WLYySDYk7CAuEChK3NywU
NJasbx4_YiNaFm2YCIGZuoOMZvP_-A8Pzos8PxsKXonIZsaRzudMZdZdYYt3M/lsparams/hls_chunk_host,mh,mm,mn,ms,mv,mvi,pl/lsig/AG3C_xAwRgIhAIGPpONiXXxA79M2P-4Z1xMB3D4YQcyzorgMya6QlKnRAiEAhuTadwuWPGWAHpesgO1Ia9FWYXsht7NhurObjpcTd9w%3D/playlist/index.m3u8'

[download] Destination: D:\TV\YouTube\AI and Games [UCov_51F0betb6hJ6Gumxg3Q]\AI and Games - s2020e1090818NA - Final Judging - 2020 Generative Design in Minecraft Competition  [7CwF3TpvcT0].mp4
[debug] ffmpeg command line: ffmpeg -y -loglevel verbose -headers "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3616.1 Safari/537.36
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
" -i "https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1599615598/ei/Dt5XX7XRCoGPwQGZ2ImQBw/ip/174.91.53.73/id/7CwF3TpvcT0.0/itag/300/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/goi/160/sgoap/gir%3Dyes%3Bi
tag%3D140/sgovp/gir%3Dyes%3Bitag%3D298/hls_chunk_host/r2---sn-cxaaj5o5q5-tt1y.googlevideo.com/playlist_duration/30/manifest_duration/30/vprv/1/playlist_type/DVR/mh/D3/mm/44/mn/sn-cxaaj5o5q5-tt1y/ms/lva/mv/u/mvi/2/pl/24/dover/11/keepalive/ye
s/mt/1599593645/disable_polymer/true/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,live,goi,sgoap,sgovp,playlist_duration,manifest_duration,vprv,playlist_type/sig/AOq0QJ8wRAIgTQ42t4WLYySDYk7CAuEChK3NywUNJasbx4_YiNaFm2YCIGZuoOMZv
P_-A8Pzos8PxsKXonIZsaRzudMZdZdYYt3M/lsparams/hls_chunk_host,mh,mm,mn,ms,mv,mvi,pl/lsig/AG3C_xAwRgIhAIGPpONiXXxA79M2P-4Z1xMB3D4YQcyzorgMya6QlKnRAiEAhuTadwuWPGWAHpesgO1Ia9FWYXsht7NhurObjpcTd9w%3D/playlist/index.m3u8" -c copy -f mp4 "-bsf:a" a
ac_adtstoasc "file:D:\TV\YouTube\AI and Games [UCov_51F0betb6hJ6Gumxg3Q]\AI and Games - s2020e1090818NA - Final Judging - 2020 Generative Design in Minecraft Competition  [7CwF3TpvcT0].mp4.part"
ffmpeg version git-2020-06-03-b6d7c4c Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200523
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --
enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
--disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 49.100 / 56. 49.100
  libavcodec     58. 90.100 / 58. 90.100
  libavformat    58. 44.100 / 58. 44.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 84.100 /  7. 84.100
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[tcp @ 000000010b9426c0] Starting connection attempt to 172.217.164.206 port 443
[tcp @ 000000010b9426c0] Successfully connected to 172.217.164.206 port 443
[snip]

Description

In order to obtain my subscription playlist I need to use --cookie (which is working)
However if I attempt to download a video by using the same cookie then the download is "Unable to extract video data"
If I attempt to download the same video without providing the cookie then the video downloads successfully.

To me this implies I am being served a non-standard page when I am logged in.

@harroguk harroguk changed the title Unable to download from youtube.com Unable to download from youtube.com when logged in with a valid cookie Sep 8, 2020
@blackjack4494
Copy link

@blackjack4494 blackjack4494 commented Sep 9, 2020

You could get the playlist first with cookie and then download the videos in the playlist without using cookies.

@harroguk
Copy link
Author

@harroguk harroguk commented Sep 9, 2020

Yup, however its not working as designed, hence the bug report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.