youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit ac249f421f5d7a9d9272d478f2f5e246ed497c47
parent e86e9474bfdd2cb12f70d34e5cd6d2ff20171887
Author: Ricardo Garcia <sarbalap+freshmeat@gmail.com>
Date:   Sun,  3 Oct 2010 11:05:20 +0200

Retry on any 5xx server error

Diffstat:
Myoutube-dl | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/youtube-dl b/youtube-dl @@ -529,7 +529,7 @@ class FileDownloader(object): data = urllib2.urlopen(request) break except (urllib2.HTTPError, ), err: - if err.code != 500 and err.code != 503 and err.code != 416: + if (err.code < 500 or err.code >= 600) and err.code != 416: # Unexpected HTTP error raise elif err.code == 416: @@ -539,7 +539,7 @@ class FileDownloader(object): data = urllib2.urlopen(basic_request) content_length = data.info()['Content-Length'] except (urllib2.HTTPError, ), err: - if err.code != 503 and err.code != 500: + if err.code < 500 or err.code >= 600: raise else: # Examine the reported length