Comment #4 by jake.turner:
This is because the URL is incomplete, it's relative, not absolute.
Modify the download method as follows:
def download_if_dne(href, filename):
if os.path.isfile(filename):
# print 'already downloaded:', href
return False
else:
if not href.startswith('http://'):
href = 'http://maps.google.com' + href
print 'Fixed url :', href
try:
print 'downloading:', href
oa = openanything.fetch(href)
if oa['status']==200:
file = open( filename, 'w' )
file.write( oa['data'] )
file.close()
return True
except KeyboardInterrupt:
raise
except:
print '\tdownload failed -', sys.exc_info()[0]
return False
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings