projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a test for --no-check-certificate
[youtube-dl]
/
youtube_dl
/
compat.py
diff --git
a/youtube_dl/compat.py
b/youtube_dl/compat.py
index 4453b34fceea50861ccedec0ec177a12f424274d..497ca52de14e59aabbc5587a0c6238e02dd37a48 100644
(file)
--- a/
youtube_dl/compat.py
+++ b/
youtube_dl/compat.py
@@
-71,6
+71,11
@@
try:
except ImportError:
compat_subprocess_get_DEVNULL = lambda: open(os.path.devnull, 'w')
except ImportError:
compat_subprocess_get_DEVNULL = lambda: open(os.path.devnull, 'w')
+try:
+ import http.server as compat_http_server
+except ImportError:
+ import BaseHTTPServer as compat_http_server
+
try:
from urllib.parse import unquote as compat_urllib_parse_unquote
except ImportError:
try:
from urllib.parse import unquote as compat_urllib_parse_unquote
except ImportError:
@@
-365,6
+370,7
@@
__all__ = [
'compat_html_entities',
'compat_html_parser',
'compat_http_client',
'compat_html_entities',
'compat_html_parser',
'compat_http_client',
+ 'compat_http_server',
'compat_kwargs',
'compat_ord',
'compat_parse_qs',
'compat_kwargs',
'compat_ord',
'compat_parse_qs',