def Downloadfiles(urls_metadata,output,target):
path = None
try:
filename = None
print "\nDo you like downloading these files to analyze metadata(Y/N)?"
#Convert to lower the input
resp = raw_input().lower()
if (resp == 'n'):
print "Exiting"
exit(1)
if ((resp != 'y') and (resp != 'n')):
print "The option is not valided. Please, try again it"
if (resp =='y'):
path = str(target) + '/temp'
for url in urls_metadata:
filename = wget.download(url,str(path))
Analyze_Metadata(filename)
time.sleep(3)
#Delete temp folder
os.system('rm -r ' + str(path))
Display_Export_Metadata(metadata_files,output,target)
except Exception as e:
print str(e)
评论列表
文章目录