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

obamawhitehouse YouTube channel download doesn't work #26316

Open
wayneworkman opened this issue Aug 12, 2020 · 3 comments
Open

obamawhitehouse YouTube channel download doesn't work #26316

wayneworkman opened this issue Aug 12, 2020 · 3 comments

Comments

@wayneworkman
Copy link

@wayneworkman wayneworkman commented Aug 12, 2020

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2020.07.28
  • 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 bug reports including closed ones
  • I've read bugs section in FAQ

Command

/usr/local/bin/youtube-dl --verbose -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]' -i --force-ipv4 --user-agent 'Mozilla/5.0 (Linux; Android 10; SM-A205U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.111 Mobile Safari/537.36' --cookies /data/cookies.txt --download-archive /data/youtube/The_Obama_White_House/archive.txt --write-info-json --write-description --write-thumbnail --socket-timeout 30 --restrict-filenames -o "/data/youtube/The_Obama_White_House/%(uploader_id)s_%(upload_date)s_%(title)s.%(ext)s" https://www.youtube.com/obamawhitehouse

/data/cookies.txt contents

# Netscape HTTP Cookie File
# This file is generated by youtube-dl.  Do not edit.

.youtube.com	TRUE	/	FALSE	1597250770	GPS	1
.youtube.com	TRUE	/	FALSE	1602433039	PREF	f1=50000000&f6=8&hl=en
.youtube.com	TRUE	/	TRUE	1612799781	VISITOR_INFO1_LIVE	XZn8voCBHxc
.youtube.com	TRUE	/	TRUE	0	YSC	GNgX0LqudNU
.youtube.com	TRUE	/	FALSE	0	s_gl	1d69aac621b2f9c0a25dade722d6e24bcwIAAABVUw==

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'-f', u'bestvideo[ext=mp4]+bestaudio[ext=m4a]', u'-i', u'--force-ipv4', u'--user-agent', u'${useragent}', u'--cookies', u'/data/cookies.txt', u'--download-archive', u'/data/youtube/The_Obama_White_House/archive.txt', u'--write-info-json', u'--write-description', u'--write-thumbnail', u'--socket-timeout', u'30', u'--restrict-filenames', u'-o', u'/data/youtube/The_Obama_White_House/%(uploader_id)s_%(upload_date)s_%(title)s.%(ext)s', u'https://www.youtube.com/obamawhitehouse']
[debug] Encodings: locale UTF-8, fs UTF-8, out None, pref UTF-8
[debug] youtube-dl version 2020.07.28
[debug] Python version 2.7.16 (CPython) - Linux-4.19.0-10-amd64-x86_64-with-debian-10.5
[debug] exe versions: ffmpeg 4.1.6-1, ffprobe 4.1.6-1
[debug] Proxy map: {}
[youtube:user] obamawhitehouse: Downloading channel page
WARNING: Unable to download webpage: HTTP Error 404: Not Found
[youtube:user] obamawhitehouse: Downloading page #1
ERROR: Unable to download webpage: HTTP Error 404: Not Found (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 "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 627, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2238, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 467, in error
    result = self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 654, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

Description

"The Obama White House" YouTube channel does not download using the above command. I use this sort of command on many other channels with the same cookies.txt file, works fine on others.
Here's the link to the channel: https://www.youtube.com/obamawhitehouse

@llacb47
Copy link

@llacb47 llacb47 commented Aug 12, 2020

It's not handling some vanity urls correctly.
https://www.youtube.com/obamawhitehouse is not the same as https://www.youtube.com/user/obamawhitehouse but YTDL assumes it is.

Downloading any of these channels fails:

https://www.youtube.com/atlanticrecords
https://www.youtube.com/firefox
https://www.youtube.com/eminem
https://www.youtube.com/smartereveryday

Because YTDL assumes that https://www.youtube.com/channelurl is the same channel as https://www.youtube.com/user/channelurl.

Sometimes they are the same: https://www.youtube.com/jacksfilms redirects to https://www.youtube.com/user/jacksfilms

@wayneworkman
Copy link
Author

@wayneworkman wayneworkman commented Aug 12, 2020

@llacb47 is this something I'm doing wrong, or is it a bug?

@llacb47
Copy link

@llacb47 llacb47 commented Aug 12, 2020

@wayneworkman I think it's a bug. YTDL should be grabbing the proper channel URL from the HTML code (link itemprop="url")

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.