@download_tool('urllib2')
def urllib2_download(client, download_url, filename, resuming=False):
 assert (not resuming)
 print 'Downloading', download_url, 'to', filename, '...'
 request = urllib2.Request(download_url, headers={'Cookie': ('gdriveid=' + client.get_gdriveid())})
 response = urllib2.urlopen(request)
 import shutil
 with open(filename, 'wb') as output:
  shutil.copyfileobj(response, output)

@ download_tool ( 'urllib2' ) def urllib2_download ( client , download_url , filename , resuming = False ) : assert ( not resuming ) print 'Downloading' , download_url , 'to' , filename , '...' request = urllib2 . Request ( download_url , headers = { 'Cookie' : ( 'gdriveid=' + client . get_gdriveid ( ) ) } ) response = urllib2 . urlopen ( request ) import shutil with open ( filename , 'wb' ) as output : shutil . copyfileobj ( response , output )
in the case you dont even have wget .