File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
seleniumbase/console_scripts Expand file tree Collapse file tree 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
1212beautifulsoup4 == 4.6.0
1313unittest2 == 1.1.0
1414chardet == 3.0.4
15+ urllib3 == 1.23
1516boto == 2.48.0
1617ipdb == 0.11
1718parameterized == 0.6.1
Original file line number Diff line number Diff line change 1919import shutil
2020import sys
2121import tarfile
22+ import urllib3
2223import zipfile
2324from 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 ()
2826DRIVER_DIR = os .path .dirname (os .path .realpath (drivers .__file__ ))
2927
3028
@@ -190,7 +188,8 @@ def main():
190188 if not os .path .exists (downloads_folder ):
191189 os .mkdir (downloads_folder )
192190 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 )
194193 print ('\n Downloading %s from:\n %s ...' % (file_name , download_url ))
195194 local_file .write (remote_file .read ())
196195 local_file .close ()
Original file line number Diff line number Diff line change 5959 'beautifulsoup4==4.6.0' ,
6060 'unittest2==1.1.0' ,
6161 'chardet==3.0.4' ,
62+ 'urllib3==1.23' ,
6263 'boto==2.48.0' ,
6364 'ipdb==0.11' ,
6465 'parameterized==0.6.1' ,
You can’t perform that action at this time.
0 commit comments