family-guy
commited on
Commit
·
b8192f2
1
Parent(s):
3690a45
Make test pass
Browse files- pytube/compat.py +3 -1
pytube/compat.py
CHANGED
@@ -4,12 +4,14 @@
|
|
4 |
"""Python 2/3 compatibility support."""
|
5 |
import sys
|
6 |
|
|
|
7 |
PY2 = sys.version_info[0] == 2
|
8 |
PY3 = sys.version_info[0] == 3
|
9 |
PY33 = sys.version_info[0:2] >= (3, 3)
|
10 |
|
11 |
-
|
12 |
if PY2:
|
|
|
|
|
13 |
import urllib2
|
14 |
from urllib import urlencode
|
15 |
from urllib2 import URLError
|
|
|
4 |
"""Python 2/3 compatibility support."""
|
5 |
import sys
|
6 |
|
7 |
+
|
8 |
PY2 = sys.version_info[0] == 2
|
9 |
PY3 = sys.version_info[0] == 3
|
10 |
PY33 = sys.version_info[0:2] >= (3, 3)
|
11 |
|
|
|
12 |
if PY2:
|
13 |
+
reload(sys)
|
14 |
+
sys.setdefaultencoding('utf8')
|
15 |
import urllib2
|
16 |
from urllib import urlencode
|
17 |
from urllib2 import URLError
|