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

[youtube:subscriptions] HTTP Error 400: Bad Request #2975

Closed
Uddasa opened this issue May 23, 2014 · 11 comments
Closed

[youtube:subscriptions] HTTP Error 400: Bad Request #2975

Uddasa opened this issue May 23, 2014 · 11 comments

Comments

@Uddasa
Copy link

@Uddasa Uddasa commented May 23, 2014

Hi, since today (maybe yesterday) I got this error (the command was working well before) :

$ youtube-dl -o '/home/desktop/Vidéos/Youtube/%(uploader)s - %(title)s.%(ext)s' --download-archive /home/desktop/.mydownloads https://www.youtube.com/feed/subscriptions -u xxxxxxx@gmail.com -p xxxxxxxxx --verbose
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-o', '/home/desktop/Vid\xc3\xa9os/Youtube/%(uploader)s - %(title)s.%(ext)s', '--download-archive', '/home/desktop/.mydownloads', 'https://www.youtube.com/feed/subscriptions', '-u', '', '-p', '', '--verbose']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.05.19
[debug] Python version 2.7.3 - Linux-3.10.23-xxxx-std-ipv6-64-x86_64-with-Ubuntu-12.04-precise
[debug] Proxy map: {}
[youtube:subscriptions] Downloading login page
[youtube:subscriptions] Logging in
[youtube:subscriptions] subscriptions feed: Downloading page 1
ERROR: Unable to download JSON metadata: HTTP Error 400: Bad Request; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type youtube-dl -U to update.
File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 196, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1214, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python2.7/urllib2.py", line 406, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 519, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 444, in error
return self._call_chain(_args)
File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(_args)
File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

@jaimeMF jaimeMF changed the title HTTP Error 400: Bad Request [youtube:subscriptions] HTTP Error 400: Bad Request May 23, 2014
@RamyTalal
Copy link

@RamyTalal RamyTalal commented May 24, 2014

Same problem here.
I tried /feed_ajax?action_load_system_feed=1&feed_name=subscriptions&paging=0 and /feed_ajax?action_load_system_feed=1&feed_name=subscriptions, same problem.

/feed_ajax?action_load_system_feed=1&feed_name=subscriptions&paging=1 works, but without the first video.

@tehdeftz
Copy link

@tehdeftz tehdeftz commented May 29, 2014

Same here. Was working perfectly week ago I think. Any workarounds?

My log:

debug] System config: []
[debug] User config: []
[debug] Command-line args: [':ytsubscriptions', '-u', '', '-p', '', '--download-archive', '/home/tehdeftz/youtube/down.list', '-f', 'best', '-o', 'Videos/Youtube/%(uploader)s/%(title)s.%(ext)s', '--playlist-end', '25', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.05.19
[debug] Python version 3.4.1 - Linux-3.12.14-1-MANJARO-netbook-i686-with-glibc2.3.4
[debug] Proxy map: {}
ERROR: Unable to download JSON metadata: HTTP Error 400: Bad Request; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type youtube-dl -U to update.
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 196, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1214, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python3.4/urllib/request.py", line 461, in open
response = meth(req, response)
File "/usr/lib/python3.4/urllib/request.py", line 571, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.4/urllib/request.py", line 499, in error
return self._call_chain(_args)
File "/usr/lib/python3.4/urllib/request.py", line 433, in _call_chain
result = func(_args)
File "/usr/lib/python3.4/urllib/request.py", line 579, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)

@sndtnd
Copy link

@sndtnd sndtnd commented Jun 2, 2014

Problem persists:
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--get-id', '-t', '-i', '-c', '-u', '', '-p', '', 'http://www.youtube.com/feed/subscriptions', '--verbose']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.05.31.4
[debug] Python version 2.7.6 - Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty
[debug] Proxy map: {}
ERROR: Unable to download JSON metadata: HTTP Error 400: Bad Request; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type youtube-dl -U to update.
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 196, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 1214, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(_args)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(_args)
File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

@MalakymR
Copy link

@MalakymR MalakymR commented Jun 4, 2014

I got the same on the last few versions up to youtube-dl --version 2014.06.04

debug] System config: ['--ignore-errors', '--output', '/yt/yt/%(uploader)s--%(upload_date)s--%(title)s--%(id)s.%(ext)s', '--download-archive=/yt/yt.db', '--continue', '--max-quality', '22']
[debug] User config: []
[debug] Command-line args: ['--verbose', '-u', '', '-p', '', ':ytsubs', '--dateafter', 'now-1week']
[debug] Encodings: locale ANSI_X3.4-1968, fs ANSI_X3.4-1968, out ANSI_X3.4-1968, pref ANSI_X3.4-1968
[debug] youtube-dl version 2014.06.04
[debug] Python version 2.7.5 - Linux-3.2.12-gentoo-i686-Pentium_III_-Coppermine-with-gentoo-2.2
[debug] Proxy map: {}
[youtube:subscriptions] Downloading login page
[youtube:subscriptions] Logging in
[youtube:subscriptions] subscriptions feed: Downloading page 1
ERROR: Unable to download JSON metadata: HTTP Error 400: Bad Request; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type youtube-dl -U to update.
File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 196, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1214, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(_args)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(_args)
File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

@Yavos
Copy link

@Yavos Yavos commented Jun 11, 2014

As mentioned by RamyTalal the feed for youtube subscriptions doesn't work with paging=0 anymore.
You can easily make a temporary fix by adding the lines

        if self._FEED_NAME == 'subscriptions':
            paging = 1

in youtube_dl/extractor/youtube.py, Class YoutubeFeedsInfoExtractor(YoutubeBaseInfoExtractor), _real_extract(self, url) after line 1766 (paging = 0)

This won't download all the subscriptions but it will at least download most of them which is way better than none.

@MalakymR
Copy link

@MalakymR MalakymR commented Jun 12, 2014

That "fixed" it for me, I was playing around with the URLs in my command based on what RamyTalal said not the source.

@sndtnd
Copy link

@sndtnd sndtnd commented Aug 24, 2014

This 'fix' no longer works for me.

@RamyTalal
Copy link

@RamyTalal RamyTalal commented Aug 25, 2014

YouTube now uses a cookie (ACTIVITY) to determine the feed paging. If you request the following URL multiple times the paging increments:
https://www.youtube.com/browse_ajax?action_continuation=1&continuation=ChkSD0ZFc3Vic2NyaXB0aW9ucxoGQ0VBJTNE

@jaimeMF jaimeMF closed this in 1ed5b5c Aug 31, 2014
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Aug 31, 2014

Thanks for the report, it should work in the next version.
I would appreciate if you could tested with the next release and report any problem you find. (For example veryfing that all the videos are downloaded)

@phihag
Copy link
Contributor

@phihag phihag commented Aug 31, 2014

I believe this bug to be fixed in youtube-dl 2014.09.01. If it still occurs, please open a new issue (or comment in this one if you are absolutely certain it's the same issue) with the output of youtube-dl when called with the -v option.

@noureddin
Copy link

@noureddin noureddin commented Nov 29, 2014

The same problem here. It, firstly, occured about two weeks ago with a specific youtube channel, but upgrading to the latest version and using the url in the first comment (by RamyTalal) solved it for the first time, and since, youtube-dl works perfectly without that url. but today another channel refused to get downloaded, raisng the same error, with that url and without it.

here is the output:
$ youtube-dl 'https://www.youtube.com/channel/UCDHcIkFMCIXKmaD-8LtliSw/feed_ajax?action_load_system_feed=1&feed_name=subscriptions&paging=1' --verbose

[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['https://www.youtube.com/channel/UCDHcIkFMCIXKmaD-8LtliSw/feed_ajax?action_load_system_feed=1&feed_name=subscriptions&paging=1', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.11.27
[debug] Python version 3.4.1 - Linux-3.14.18-1-MANJARO-x86_64-with-glibc2.3.4
[debug] exe versions: ffmpeg 2.3.3, ffprobe 2.3.3, rtmpdump 2.4
[debug] Proxy map: {}
[youtube:channel] UCDHcIkFMCIXKmaD-8LtliSw: Downloading webpage
[youtube:channel] UCDHcIkFMCIXKmaD-8LtliSw: Downloading page #1
[youtube:channel] UCDHcIkFMCIXKmaD-8LtliSw: Downloading page #2
ERROR: Unable to download JSON metadata: HTTP Error 400: Bad Request (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 273, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1321, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python3.4/urllib/request.py", line 461, in open
response = meth(req, response)
File "/usr/lib/python3.4/urllib/request.py", line 571, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.4/urllib/request.py", line 499, in error
return self._call_chain(_args)
File "/usr/lib/python3.4/urllib/request.py", line 433, in _call_chain
result = func(_args)
File "/usr/lib/python3.4/urllib/request.py", line 579, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)

$ youtube-dl 'https://www.youtube.com/channel/UCDHcIkFMCIXKmaD-8LtliSw' --verbose

[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['https://www.youtube.com/channel/UCDHcIkFMCIXKmaD-8LtliSw', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.11.27
[debug] Python version 3.4.1 - Linux-3.14.18-1-MANJARO-x86_64-with-glibc2.3.4
[debug] exe versions: ffmpeg 2.3.3, ffprobe 2.3.3, rtmpdump 2.4
[debug] Proxy map: {}
[youtube:channel] UCDHcIkFMCIXKmaD-8LtliSw: Downloading webpage
[youtube:channel] UCDHcIkFMCIXKmaD-8LtliSw: Downloading page #1
[youtube:channel] UCDHcIkFMCIXKmaD-8LtliSw: Downloading page #2
ERROR: Unable to download JSON metadata: HTTP Error 400: Bad Request (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 273, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1321, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python3.4/urllib/request.py", line 461, in open
response = meth(req, response)
File "/usr/lib/python3.4/urllib/request.py", line 571, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.4/urllib/request.py", line 499, in error
return self._call_chain(_args)
File "/usr/lib/python3.4/urllib/request.py", line 433, in _call_chain
result = func(_args)
File "/usr/lib/python3.4/urllib/request.py", line 579, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)

@Mikeltxo15 Mikeltxo15 mentioned this issue Apr 23, 2019
0 of 4 tasks complete
@ytdl-org ytdl-org deleted a comment from Mikeltxo15 May 6, 2019
@ytdl-org ytdl-org deleted a comment from omeringen May 6, 2019
@ytdl-org ytdl-org deleted a comment from omeringen May 6, 2019
@ytdl-org ytdl-org deleted a comment from omeringen May 6, 2019
@ytdl-org ytdl-org deleted a comment from Quaraxkad May 6, 2019
@ytdl-org ytdl-org deleted a comment from omeringen May 6, 2019
@ytdl-org ytdl-org deleted a comment from rautamiekka May 6, 2019
@ytdl-org ytdl-org deleted a comment from Quaraxkad May 6, 2019
@ytdl-org ytdl-org deleted a comment from omeringen May 6, 2019
@ytdl-org ytdl-org locked and limited conversation to collaborators May 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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