Commit 1e5e5f07 authored by Nitha Sagar Jayanna's avatar Nitha Sagar Jayanna
Browse files

minor update

parent cbe5b38b
......@@ -126,7 +126,7 @@ def urlDownload(start,end):
filelist = accessurl.urlaccess([url])
#print(filelist)
if len(filelist) == 0:
print("Download Error: No data available",url)
print("No data available",url)
newfilelist=[]
for i in range (span.days + 1):
......@@ -147,8 +147,8 @@ def urlDownload(start,end):
#print(downloadURL)
fileLoc = dirCreate.create(router,startYear,startMonth)
#print(fileLoc)
print("downloading")
#urllib.request.urlretrieve(downloadURL, fileLoc+"/"+i[0])
#print("downloading")
urllib.request.urlretrieve(downloadURL, fileLoc+"/"+i[0])
logString = i[0]+" "+i[1]+"\n"
logHandle = open(log_file,'a+')
logHandle.write(logString)
......@@ -175,7 +175,7 @@ def urlDownload(start,end):
filelist = accessurl.urlaccess([url])
#print(filelist)
if len(filelist) == 0:
print("No data availbale",)
print("No data available",url)
for i in filelist:
downloadRequired = filecheck(i)
......@@ -185,8 +185,8 @@ def urlDownload(start,end):
#print(downloadURL)
fileLoc = dirCreate.create(router,startYear,startMonth)
#print(fileLoc)
print("downloading")
#urllib.request.urlretrieve(downloadURL, fileLoc+"/"+i[0])
#print("downloading")
urllib.request.urlretrieve(downloadURL, fileLoc+"/"+i[0])
logString = i[0]+" "+i[1]+"\n"
logHandle = open(log_file,'a+')
logHandle.write(logString)
......@@ -212,7 +212,7 @@ def urlDownload(start,end):
filelist = accessurl.urlaccess([url])
#print(filelist)
if len(filelist) == 0:
print("Download Error: No data available",url)
print("No data available",url)
newfilelist=[]
for i in range (span.days + 1):
......@@ -233,8 +233,8 @@ def urlDownload(start,end):
#print(downloadURL)
fileLoc = dirCreate.create(router,startYear,startMonth)
#print(fileLoc)
print("downloading")
#urllib.request.urlretrieve(downloadURL, fileLoc+"/"+i[0])
#print("downloading")
urllib.request.urlretrieve(downloadURL, fileLoc+"/"+i[0])
logString = i[0]+" "+i[1]+"\n"
logHandle = open(log_file,'a+')
logHandle.write(logString)
......@@ -248,7 +248,7 @@ def urlDownload(start,end):
filelist = accessurl.urlaccess([url])
#print(filelist)
if len(filelist) == 0:
print("Error: No data Available")
print("No data available",url)
newfilelist=[]
for i in range (span.days + 1):
day = startDate + timedelta(days=i)
......@@ -266,8 +266,8 @@ def urlDownload(start,end):
#print(downloadURL)
fileLoc = dirCreate.create(router,startYear,startMonth)
#print(fileLoc)
print("downloading")
#urllib.request.urlretrieve(downloadURL, fileLoc+"/"+i[0])
#print("downloading")
urllib.request.urlretrieve(downloadURL, fileLoc+"/"+i[0])
logString = i[0]+" "+i[1]+"\n"
logHandle = open(log_file,'a+')
logHandle.write(logString)
......@@ -311,3 +311,5 @@ else:
urlDownload(startdate[0],enddate)
remove_empty_lines()
print("Download Complete,exiting....")
print("Error: No data Available")
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment