X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fdownloader%2Fhttp.py;h=8407727ba43df75a31a53d073cbd430877157b29;hb=a7c26e7338ceed06b579775f315b078644a7482b;hp=54dc7616bd2a92941e71a3b17d4c400104d0682a;hpb=9fc3bef87a1009eb48f2012f3eab65761a53ba5e;p=youtube-dl diff --git a/youtube_dl/downloader/http.py b/youtube_dl/downloader/http.py index 54dc7616b..8407727ba 100644 --- a/youtube_dl/downloader/http.py +++ b/youtube_dl/downloader/http.py @@ -1,7 +1,4 @@ import os -import re -import subprocess -import sys import time from .common import FileDownloader @@ -52,8 +49,6 @@ class HttpFD(FileDownloader): while count <= retries: # Establish connection try: - if count == 0 and 'urlhandle' in info_dict: - data = info_dict['urlhandle'] data = compat_urllib_request.urlopen(request) break except (compat_urllib_error.HTTPError, ) as err: @@ -138,7 +133,7 @@ class HttpFD(FileDownloader): return False try: stream.write(data_block) - except (IOError, OSError): + except (IOError, OSError) as err: self.to_stderr(u"\n") self.report_error(u'unable to write data: %s' % str(err)) return False