We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be372fc commit d845977Copy full SHA for d845977
download.py
@@ -1,9 +1,7 @@
1
from __future__ import print_function
2
import os
3
import re
4
-from six.moves.urllib.request import urlopen
5
from six.moves.urllib.error import HTTPError
6
-import urllib2
7
import shutil
8
import argparse
9
import mistune
@@ -14,9 +12,14 @@
14
12
15
13
# encoding=utf8
16
import sys
17
-
18
-reload(sys)
19
-sys.setdefaultencoding('utf8')
+try:
+ reload(sys)
+except NameError:
+ pass
20
+ sys.setdefaultencoding('utf8')
21
+except AttributeError:
22
23
24
def download_pdf(link, location, name):
25
try:
0 commit comments