Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
bash script loop exits prematurely on youtube-dl connection error #6021
Comments
|
Not sure why. Could you add the
And paste the resultant URLs to browsers? |
|
there are times when connectivity goes down when using this application, but the script is suppose to keep running. For some reason when youtube-dl catches an error instead of just exiting from python, it kills the parent bash script as well. It's almost like a sys.exit is being called when it would be better if a return 1 should be called |
|
The issue is probably in the script, as far as I know |
|
I'm closing the issue since we need more info to verify it's an actual youtube-dl issue. |
Using youtube-dl in a for loop, where it shouldn't end the loop, but this error causes the for to break;
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'--user-agent', u'Mozilla/5.0 ;Windows NT 6.1; WOW64; Trident/7.0; rv:11.0; like Gecko', u'--restrict-filenames', u'-c', u'-r', u'20k', u'https://www.youtube.com/watch?v=1biIRxTRCS8']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.06.15
[debug] Python version 2.7.6 - Linux-3.16.0-41-generic-x86_64-with-Ubuntu-14.04-trusty
[debug] exe versions: avconv 9.18-6, avprobe 9.18-6, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] 1biIRxTRCS8: Downloading webpage
[youtube] 1biIRxTRCS8: Extracting video information
[youtube] 1biIRxTRCS8: Downloading DASH manifest
WARNING: Your copy of avconv is outdated and unable to properly mux separate video and audio files, youtube-dl will download single file media. Update avconv to version 10-0 or newer to fix this.
[debug] Invoking downloader on u'https://r2---sn-fvf-qufe.googlevideo.com/videoplayback?mt=1434657155&initcwndbps=1741250&expire=1434678792&signature=0AFF9BC4F7FC92DBA9811C01DE96DA10FD123300.E7A87E7A1483380EA524E944A264AA7417070005&upn=C9npayIpIe8&mime=video%2Fmp4&sver=3&itag=22&pl=22&source=youtube&mv=m&ms=au&ip=XXX.XXX.XXX.XXX&key=yt5&lmt=1394258535176683&pcm2cms=yes&fexp=9407141%2C9408133%2C9408142%2C9408144%2C9408420%2C9408710%2C9412843%2C9413113%2C9413503%2C9415304%2C9415758%2C9415811%2C9416052%2C9416126%2C9416504%2C9416654%2C952626&mm=31&mn=sn-fvf-qufe&id=o-AKSR6kHsI_t0C1GcxwFGAJa-K7uyi88P3lsT5mQgNdJT&dur=93.437&requiressl=yes&sparams=dur%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpcm2cms%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&ipbits=0&ratebypass=yes'
ERROR: unable to download video data: <urlopen error [Errno 111] Connection refused>
Traceback (most recent call last):
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1435, in process_info
success = dl(filename, info_dict)
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1377, in dl
return fd.download(name, info)
File "/usr/bin/youtube-dl/youtube_dl/downloader/common.py", line 342, in download
return self.real_download(filename, info_dict)
File "/usr/bin/youtube-dl/youtube_dl/downloader/http.py", line 59, in real_download
data = self.ydl.urlopen(request)
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1730, 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 442, in error
result = 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 629, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/usr/lib/python2.7/urllib2.py", line 404, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 422, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(_args)
File "/usr/bin/youtube-dl/youtube_dl/utils.py", line 713, in https_open
req, *_kwargs)
File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 111] Connection refused>