Skip when information download fails #2799

Open
opened 2026-02-20 23:08:15 -05:00 by deekerman · 4 comments
Owner

Originally created by @Schabernack on GitHub (Aug 6, 2014).

Instead of cancelling the whole downloading process, maybe just skip the failed item and continue with the rest? Example:

[ ❤ :~/apps]$ ./youtube-dl --verbose http://8tracks.com/inchanpratiwi/morning-jog                                                                                                                13:53:53 
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://8tracks.com/inchanpratiwi/morning-jog']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.08.02.1
[debug] Python version 2.7.5 - Darwin-13.2.0-x86_64-i386-64bit
[debug] Proxy map: {}
[8tracks] morning-jog: Downloading webpage
[8tracks] morning-jog: Downloading song information 1/10
[8tracks] morning-jog: Downloading song information 2/10
[8tracks] morning-jog: Downloading song information 3/10
[8tracks] morning-jog: Downloading song information 4/10
[8tracks] morning-jog: Downloading song information 5/10
[8tracks] morning-jog: Downloading song information 6/10
[8tracks] morning-jog: Downloading song information 7/10
ERROR: Failed to download song information: HTTP Error 403: Forbidden; 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 "./youtube-dl/youtube_dl/extractor/common.py", line 203, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 1231, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 410, in open
    response = meth(req, response)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 523, in http_response
    'http', request, response, code, msg, hdrs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 448, in error
    return self._call_chain(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 531, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
Originally created by @Schabernack on GitHub (Aug 6, 2014). Instead of cancelling the whole downloading process, maybe just skip the failed item and continue with the rest? Example: ``` [ ❤ :~/apps]$ ./youtube-dl --verbose http://8tracks.com/inchanpratiwi/morning-jog 13:53:53 [debug] System config: [] [debug] User config: [] [debug] Command-line args: ['--verbose', 'http://8tracks.com/inchanpratiwi/morning-jog'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2014.08.02.1 [debug] Python version 2.7.5 - Darwin-13.2.0-x86_64-i386-64bit [debug] Proxy map: {} [8tracks] morning-jog: Downloading webpage [8tracks] morning-jog: Downloading song information 1/10 [8tracks] morning-jog: Downloading song information 2/10 [8tracks] morning-jog: Downloading song information 3/10 [8tracks] morning-jog: Downloading song information 4/10 [8tracks] morning-jog: Downloading song information 5/10 [8tracks] morning-jog: Downloading song information 6/10 [8tracks] morning-jog: Downloading song information 7/10 ERROR: Failed to download song information: HTTP Error 403: Forbidden; 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 "./youtube-dl/youtube_dl/extractor/common.py", line 203, in _request_webpage return self._downloader.urlopen(url_or_request) File "./youtube-dl/youtube_dl/YoutubeDL.py", line 1231, in urlopen return self._opener.open(req, timeout=self._socket_timeout) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 410, in open response = meth(req, response) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 523, in http_response 'http', request, response, code, msg, hdrs) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 448, in error return self._call_chain(*args) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 382, in _call_chain result = func(*args) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 531, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) ```
Author
Owner

@phihag commented on GitHub (Aug 6, 2014):

You can pass in the -i option to do that (pass it in a config file such as /.config/youtube-dl.conf if you want it all the time).

We may default to that behavior, but for now, we're behaving like many other console applications that abort once they encounter an error.

@phihag commented on GitHub (Aug 6, 2014): You can pass in the `-i` option to do that (pass it in a config file such as `/.config/youtube-dl.conf` if you want it all the time). We may default to that behavior, but for now, we're behaving like many other console applications that abort once they encounter an error.
Author
Owner

@Schabernack commented on GitHub (Aug 6, 2014):

sorry, i forgot to mention that i also tried it with -i enabled and it still didnt work.

[ ❤ :~/apps]$ ./youtube-dl --verbose -i http://8tracks.com/inchanpratiwi/morning-jog                                                                                                             23:54:59 
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', '-i', 'http://8tracks.com/inchanpratiwi/morning-jog']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.08.05
[debug] Python version 2.7.5 - Darwin-13.2.0-x86_64-i386-64bit
[debug] Proxy map: {}
[8tracks] morning-jog: Downloading webpage
[8tracks] morning-jog: Downloading song information 1/10
[8tracks] morning-jog: Downloading song information 2/10
[8tracks] morning-jog: Downloading song information 3/10
[8tracks] morning-jog: Downloading song information 4/10
[8tracks] morning-jog: Downloading song information 5/10
[8tracks] morning-jog: Downloading song information 6/10
[8tracks] morning-jog: Downloading song information 7/10
[8tracks] morning-jog: Downloading song information 8/10
ERROR: Failed to download song information: HTTP Error 403: Forbidden; 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 "./youtube-dl/youtube_dl/extractor/common.py", line 203, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 1231, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 410, in open
    response = meth(req, response)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 523, in http_response
    'http', request, response, code, msg, hdrs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 448, in error
    return self._call_chain(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 531, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
@Schabernack commented on GitHub (Aug 6, 2014): sorry, i forgot to mention that i also tried it with -i enabled and it still didnt work. ``` [ ❤ :~/apps]$ ./youtube-dl --verbose -i http://8tracks.com/inchanpratiwi/morning-jog 23:54:59 [debug] System config: [] [debug] User config: [] [debug] Command-line args: ['--verbose', '-i', 'http://8tracks.com/inchanpratiwi/morning-jog'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2014.08.05 [debug] Python version 2.7.5 - Darwin-13.2.0-x86_64-i386-64bit [debug] Proxy map: {} [8tracks] morning-jog: Downloading webpage [8tracks] morning-jog: Downloading song information 1/10 [8tracks] morning-jog: Downloading song information 2/10 [8tracks] morning-jog: Downloading song information 3/10 [8tracks] morning-jog: Downloading song information 4/10 [8tracks] morning-jog: Downloading song information 5/10 [8tracks] morning-jog: Downloading song information 6/10 [8tracks] morning-jog: Downloading song information 7/10 [8tracks] morning-jog: Downloading song information 8/10 ERROR: Failed to download song information: HTTP Error 403: Forbidden; 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 "./youtube-dl/youtube_dl/extractor/common.py", line 203, in _request_webpage return self._downloader.urlopen(url_or_request) File "./youtube-dl/youtube_dl/YoutubeDL.py", line 1231, in urlopen return self._opener.open(req, timeout=self._socket_timeout) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 410, in open response = meth(req, response) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 523, in http_response 'http', request, response, code, msg, hdrs) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 448, in error return self._call_chain(*args) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 382, in _call_chain result = func(*args) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 531, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) ```
Author
Owner

@Schabernack commented on GitHub (Aug 10, 2014):

@phihag any chance of reopening this issue?

@Schabernack commented on GitHub (Aug 10, 2014): @phihag any chance of reopening this issue?
Author
Owner

@dstftw commented on GitHub (Aug 10, 2014):

Looks like this issue is duplicate of #2950 and #2310.

@dstftw commented on GitHub (Aug 10, 2014): Looks like this issue is duplicate of #2950 and #2310.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl#2799
No description provided.