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
131.07k stars 9.92k forks source link

"HTTP Error 401: Unauthorized" if passing in creds or useragent\cookies #13447

Open jakepbrown27 opened 7 years ago

jakepbrown27 commented 7 years ago

Please follow the guide below


Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.06.18. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

Before submitting an issue make sure you have:

What is the purpose of your issue?


The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

$ youtube-dl -v <your command line>
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2017.06.18
[debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
[debug] Proxy map: {}
...
<end of log>

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.


Description of your issue, suggested solution and other information

Explanation of your issue in arbitrary form goes here. Please make sure the description is worded well enough to be understood. Provide as much context and examples as possible. If work on your issue requires account credentials please provide them or explain how one can obtain them.

Hello, I suppose the question portion of this is: is VRV supported\compatible? I did try and perform a .\youtube-dl.exe --list-extractors in which case VRV and VRV:SERIES did show up however I have not had much success.

I am trying to download episodes\video files from VRV [https://vrv.co] For example: [https://vrv.co/series/GR751KNZY/Attack-on-Titan] I have tried just passing in the URL as the content should be viewable with just a regular user account, but also passed in my premium account creds and or a cookies.txt and user agent (I've tried individually as well as different combinations)

`.\youtube-dl.exe : [debug] System config: [] At line:1 char:1

[debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['-v', 'https://vrv.co/series/GR751KNZY/Attack-on-Titan', '--user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36', '--cookies', '.\vrvcookies.txt'] [debug] Encodings: locale cp1252, fs mbcs, out cp1252, pref cp1252 [debug] youtube-dl version 2017.06.18 [debug] Python version 3.4.4 - Windows-10-10.0.15063 [debug] exe versions: none [debug] Proxy map: {} [vrv:series] GR751KNZY: Downloading webpage [vrv:series] GR751KNZY: Downloading resource path JSON metadata ERROR: Unable to download JSON metadata: HTTP Error 401: Unauthorized (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp_9wocfhk\build\youtube_dl\extractor\common.py", line 502, in _request_webpage File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp_9wocfhk\build\youtube_dl\YoutubeDL.py", line 2129, in urlopen File "C:\Python\Python34\lib\urllib\request.py", line 470, in open File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response File "C:\Python\Python34\lib\urllib\request.py", line 508, in error File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default `

jakepbrown27 commented 7 years ago

Hi, so I am largely unfamiliar with the processes reporting\remediation here -- I see the account-needed label, if needed I'll help with a burner account if needed to do work on this.

dgcurtis commented 6 years ago

For many of their series, a free account is all that is needed. The series I am trying to download doesn't require a premium account.

jakepbrown27 commented 6 years ago

I saw @remitamine say he couldn't repro on another listing - I can also get the listings just fine for the same fairy tail episode. But trying to download the episode doesn't work.

.\youtube-dl.exe -F https://vrv.co/watch/GY8V590JY/Fairy-Tail:The-Fairy-Tail [vrv] GY8V590JY: Downloading webpage [vrv] GY8V590JY: Downloading en-US m3u8 information [vrv] GY8V590JY: Downloading en-US MPD information [info] Available formats for GY8V590JY: format code extension resolution note dash-en-US-f1-a1-x3 m4a audio only [en-US] DASH audio 125k , mp4a.40.2 (44100Hz) dash-en-US-f4-v1-x3 mp4 640x360 DASH video 537k , avc1.4d401f, video only dash-en-US-f3-v1-x3 mp4 848x480 DASH video 1150k , avc1.4d401f, video only dash-en-US-f1-v1-x3 mp4 1280x720 DASH video 1979k , avc1.640032, video only dash-en-US-f2-v1-x3 mp4 1920x1080 DASH video 4391k , avc1.640032, video only hls-en-US-662-0 mp4 640x360 [en-US] 662k , avc1.4d401f, mp4a.40.2 hls-en-US-662-1 mp4 640x360 [en-US] 662k , avc1.4d401f, mp4a.40.2 hls-en-US-662-2 mp4 640x360 [en-US] 662k , avc1.4d401f, mp4a.40.2 hls-en-US-1275-0 mp4 848x480 [en-US] 1275k , avc1.4d401f, mp4a.40.2 hls-en-US-1275-1 mp4 848x480 [en-US] 1275k , avc1.4d401f, mp4a.40.2 hls-en-US-1275-2 mp4 848x480 [en-US] 1275k , avc1.4d401f, mp4a.40.2 hls-en-US-2105-0 mp4 1280x720 [en-US] 2105k , avc1.640032, mp4a.40.2 hls-en-US-2105-1 mp4 1280x720 [en-US] 2105k , avc1.640032, mp4a.40.2 hls-en-US-2105-2 mp4 1280x720 [en-US] 2105k , avc1.640032, mp4a.40.2 hls-en-US-4516-0 mp4 1920x1080 [en-US] 4516k , avc1.640032, mp4a.40.2 hls-en-US-4516-1 mp4 1920x1080 [en-US] 4516k , avc1.640032, mp4a.40.2 hls-en-US-4516-2 mp4 1920x1080 [en-US] 4516k , avc1.640032, mp4a.40.2 (best)

PS C:\Users\Desktop\youtubedl> .\youtube-dl.exe https://vrv.co/watch/GY8V590JY/Fairy-Tail:The-Fairy-Tail --ffmpeg-location C:\Users\Desktop\youtubedl\ffmpeg-20170620-ae6f6d4-win64-static\bin\ffmpeg.exe [vrv] GY8V590JY: Downloading webpage [vrv] GY8V590JY: Downloading en-US MPD information .\youtube-dl.exe : Traceback (most recent call last): At line:1 char:1

If it isn't supported, it isn't supported and that is fine just hoping for some clarity is all.

remitamine commented 6 years ago
.\youtube-dl.exe https://vrv.co/watch/GY8V590JY/Fairy-Tail:The-Fairy-Tail
[vrv] GY8V590JY: Downloading webpage
[vrv] GY8V590JY: Downloading en-US m3u8 information
[vrv] GY8V590JY: Downloading en-US MPD information
[dashsegments] Total fragments: 151
[download] Destination: The Fairy Tail-GY8V590JY.fdash-en-US-f2-v1-x3.mp4
[download]   0.6% of ~117.72MiB at 15.95KiB/s ETA 02:12:14
jakepbrown27 commented 6 years ago

Seems like it will work for some free content - sometimes that is.

But when it gets to any premium content it no longer does -- I have tried passing in username\password and cookies\user agent, both resulting in the same error below:

youtube-dl.exe -v https://vrv.co/watch/GY9P99J3R/Dofus:My-Buddy-Bashi 
youtube-dl.exe : [debug] System config: []
At line:1 char:1
+ youtube-dl.exe -v https://vrv.co/watch/GY9P99J3R/Dofus:My-Buddy-Bashi
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: ([debug] System config: []:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://vrv.co/watch/GY9P99J3R/Dofus:My-Buddy-Bashi']
[debug] Encodings: locale cp1252, fs mbcs, out cp1252, pref cp1252
[debug] youtube-dl version 2017.10.29
[debug] Python version 3.4.4 - Windows-10-10.0.15063
[debug] exe versions: none
[debug] Proxy map: {}
[vrv] GY9P99J3R: Downloading webpage
ERROR: An extractor error has occurred. (caused by KeyError('streams',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest 
version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpk63cqkyt\build\youtube_dl\extractor\common.py", line 434, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpk63cqkyt\build\youtube_dl\extractor\vrv.py", line 110, in _real_extract
KeyError: 'streams'
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpk63cqkyt\build\youtube_dl\extractor\common.py", line 434, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpk63cqkyt\build\youtube_dl\extractor\vrv.py", line 110, in _real_extract
KeyError: 'streams'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpk63cqkyt\build\youtube_dl\YoutubeDL.py", line 784, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpk63cqkyt\build\youtube_dl\extractor\common.py", line 447, in extract
youtube_dl.utils.ExtractorError: An extractor error has occurred. (caused by KeyError('streams',)); please report this issue on https://yt-dl.org/bug . Make sure you 
are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
youtube-dl.exe --version
2017.10.29
imseandavis commented 6 years ago

I wrote literally almost the exact same thing to keepvid support about vrv.co premium content. But I added the process to decode premium content as well. They use Ellation Player and now after defeating their last way of encoding they have moved on to base64 encrypting the video string in the url.

imseandavis commented 6 years ago

I can show you how to decode premium links but it's a multistep process with the way they hide their URLs now, but once you get the raw URL you can download any content they have. Message me and I'll show you how.