question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Youtube]Cannot download private video with username and password

See original GitHub issue

Checklist

  • I’m reporting a broken site support
  • I’ve verified that I’m running youtube-dl version 2021.02.10
  • 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

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--ignore-config', '-v', '-u', 'PRIVATE', 'https://youtu.be/GccIPxHQodc']
Type account password and press [Return]: 
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.02.10
[debug] Python version 3.8.5 (CPython) - Linux-5.4.0-58-generic-x86_64-with-glibc2.29
[debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] Downloading login page
[youtube] Looking up account info
WARNING: Unable to look up account info: HTTP Error 400: Bad Request
[youtube] GccIPxHQodc: Downloading webpage
ERROR: Private video
Sign in if you've been granted access to this video
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/youtube_dl/YoutubeDL.py", line 806, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/youtube_dl/YoutubeDL.py", line 827, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/local/lib/python3.8/dist-packages/youtube_dl/extractor/common.py", line 532, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/lib/python3.8/dist-packages/youtube_dl/extractor/youtube.py", line 1630, in _real_extract
    raise ExtractorError(reason, expected=True)
youtube_dl.utils.ExtractorError: Private video
Sign in if you've been granted access to this video
$ echo $?
1

Description

Hi,

I cannot download any YouTube private video with username and password, can you help ? My video will be published soon so it will download soon. But you can try with any of your private video to investigate this.

Thanks for the great job you’ve done so far, god bless you !

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

2reactions
october262commented, Feb 12, 2021

try using the cookies.file

1reaction
DDvOcommented, Jun 14, 2021

As mentioned above, a workaround is to log in to YouTube on a browser, copy (e.g. using a browser extension) the cookies stored for the youtube.com domain to a text file and pass the resulting file to youtube-dl via the --cookies option.

Since many users have this problem, see also #26196, I wonder why youtube-dl does not give this hint upon

ERROR: Private video

or at least upon the more specific

WARNING: Unable to look up account info: HTTP Error 400: Bad Request
Read more comments on GitHub >

github_iconTop Results From Across the Web

Password Protect A YouTube Video: All You Need To Know
Can you password protect a YouTube video? We'll give you the answer, a full overview of YouTube's privacy settings and an alternative.
Read more >
How can youtube-dl download videos that require user ...
I was able to download private videos by using the --cookies route. I had to first format the cookies to Netscape format, which...
Read more >
5 Ways to Download Private YouTube Videos in 1080P or ...
Run the following command to download private YouTube videos be sure to replace the [YouTube URL], [your account], and [password] with your own ......
Read more >
How to Download Private YouTube Videos
1. Launch 4K Video Downloader. 2. Click Tools > Preferences at the menu bar. 3. Click Log In.
Read more >
How to Fix Cannot Download YouTube Video - AceThinker
Jump into the solutions about ways on how to download YouTube videos using third-party premium and free apps available.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found