[utils] Register SOCKS protocols in urllib and support SOCKS4A
[youtube-dl] / youtube_dl / YoutubeDL.py
index a96482e68005d80f73704b727f01d45c62588200..34eeb77c5d1cf5c0596de6582ea9751641c108b1 100755 (executable)
@@ -64,6 +64,7 @@ from .utils import (
     PostProcessingError,
     preferredencoding,
     prepend_extension,
+    register_socks_protocols,
     render_table,
     replace_extension,
     SameFileError,
@@ -361,6 +362,8 @@ class YoutubeDL(object):
         for ph in self.params.get('progress_hooks', []):
             self.add_progress_hook(ph)
 
+        register_socks_protocols()
+
     def warn_if_short_id(self, argv):
         # short YouTube ID starting with dash?
         idxs = [