File tree 3 files changed +6
-5
lines changed
seleniumbase/console_scripts 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ requests==2.19.1
12
12
beautifulsoup4 == 4.6.0
13
13
unittest2 == 1.1.0
14
14
chardet == 3.0.4
15
+ urllib3 == 1.23
15
16
boto == 2.48.0
16
17
ipdb == 0.11
17
18
parameterized == 0.6.1
Original file line number Diff line number Diff line change 19
19
import shutil
20
20
import sys
21
21
import tarfile
22
+ import urllib3
22
23
import zipfile
23
24
from seleniumbase import drivers # webdriver storage folder for SeleniumBase
24
- if sys .version_info [0 ] == 2 :
25
- from urllib import urlopen
26
- else :
27
- from urllib .request import urlopen
25
+ urllib3 .disable_warnings ()
28
26
DRIVER_DIR = os .path .dirname (os .path .realpath (drivers .__file__ ))
29
27
30
28
@@ -190,7 +188,8 @@ def main():
190
188
if not os .path .exists (downloads_folder ):
191
189
os .mkdir (downloads_folder )
192
190
local_file = open (file_path , 'wb' )
193
- remote_file = urlopen (download_url )
191
+ http = urllib3 .PoolManager ()
192
+ remote_file = http .request ('GET' , download_url , preload_content = False )
194
193
print ('\n Downloading %s from:\n %s ...' % (file_name , download_url ))
195
194
local_file .write (remote_file .read ())
196
195
local_file .close ()
Original file line number Diff line number Diff line change 59
59
'beautifulsoup4==4.6.0' ,
60
60
'unittest2==1.1.0' ,
61
61
'chardet==3.0.4' ,
62
+ 'urllib3==1.23' ,
62
63
'boto==2.48.0' ,
63
64
'ipdb==0.11' ,
64
65
'parameterized==0.6.1' ,
You can’t perform that action at this time.
0 commit comments