X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Futils.py;h=201ed255dfacca6853f1388e5ad05b613eca4fb5;hb=f426de84606fd0807a5ab38c0733032d790b056e;hp=814a9b6be6aabc366d96c23bca5c9c3c1e80f8b6;hpb=7459e3a29081dfa4cbbcc795e054e884e1d5e020;p=youtube-dl diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index 814a9b6be..201ed255d 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -66,6 +66,12 @@ try: except ImportError: # Python 2 from urllib2 import HTTPError as compat_HTTPError +try: + from urllib.request import urlretrieve as compat_urlretrieve +except ImportError: # Python 2 + from urllib import urlretrieve as compat_urlretrieve + + try: from subprocess import DEVNULL compat_subprocess_get_DEVNULL = lambda: DEVNULL