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

Cannot download a private youtube video #4970

Closed
rpasing opened this issue Feb 17, 2015 · 2 comments
Closed

Cannot download a private youtube video #4970

rpasing opened this issue Feb 17, 2015 · 2 comments

Comments

@rpasing
Copy link

@rpasing rpasing commented Feb 17, 2015

Hi,

trying to download a private youtube video (you have to login to could watch it) results in this:

XXX@XXX ~ $ youtube-dl --username XXX --password XXX https://www.youtube.com/watch?v=_CpR4o81XQc                                                      
[youtube] Downloading login page
[youtube] Logging in
[youtube] _CpR4o81XQc: Downloading webpage
[youtube] _CpR4o81XQc: Extracting video information
[youtube] _CpR4o81XQc: Downloading DASH manifest
Traceback (most recent call last):
  File "/usr/bin/youtube-dl", line 9, in <module>
    load_entry_point('youtube-dl==2015.2.11', 'console_scripts', 'youtube-dl')()
  File "/usr/lib/python3.4/site-packages/youtube_dl/__init__.py", line 388, in main
    _real_main(argv)
  File "/usr/lib/python3.4/site-packages/youtube_dl/__init__.py", line 378, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/lib/python3.4/site-packages/youtube_dl/YoutubeDL.py", line 1387, in download
    res = self.extract_info(url)
  File "/usr/lib/python3.4/site-packages/youtube_dl/YoutubeDL.py", line 644, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/lib/python3.4/site-packages/youtube_dl/YoutubeDL.py", line 690, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/usr/lib/python3.4/site-packages/youtube_dl/YoutubeDL.py", line 1058, in process_video_result
    format['http_headers'] = self._calc_headers(full_format_info)
  File "/usr/lib/python3.4/site-packages/youtube_dl/YoutubeDL.py", line 947, in _calc_headers
    cookies = self._calc_cookies(info_dict)
  File "/usr/lib/python3.4/site-packages/youtube_dl/YoutubeDL.py", line 976, in _calc_cookies
    self.cookiejar.add_cookie_header(pr)
  File "/usr/lib/python3.4/http/cookiejar.py", line 1327, in add_cookie_header
    cookies = self._cookies_for_request(request)
  File "/usr/lib/python3.4/http/cookiejar.py", line 1253, in _cookies_for_request
    cookies.extend(self._cookies_for_domain(domain, request))
  File "/usr/lib/python3.4/http/cookiejar.py", line 1242, in _cookies_for_domain
    if not self._policy.return_ok(cookie, request):
  File "/usr/lib/python3.4/http/cookiejar.py", line 1077, in return_ok
    if not fn(cookie, request):
  File "/usr/lib/python3.4/http/cookiejar.py", line 1103, in return_ok_secure
    if cookie.secure and request.type != "https":
AttributeError: '_PseudoRequest' object has no attribute 'type'
@jaimeMF jaimeMF closed this in 662435f Feb 17, 2015
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Feb 17, 2015

Thanks for the report, it will be fixed in the next version.

For future reports, please post the output you get when adding the --verbose option (see this instructions), it contains useful information.

@phihag
Copy link
Contributor

@phihag phihag commented Feb 19, 2015

Fixed in youtube-dl 2015.02.19.3. See our FAQ if you need help updating.

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
3 participants
You can’t perform that action at this time.