renamed run.bat. changed logging back to info

This commit is contained in:
Dan
2021-08-23 11:46:27 -04:00
parent 6e5d503876
commit e65bb089a9
3 changed files with 11 additions and 7 deletions

14
main.py
View File

@@ -36,7 +36,7 @@ class Receive(Base):
Distance = Column(Integer) Distance = Column(Integer)
Azimuth = Column(Integer) Azimuth = Column(Integer)
Band = Column(Integer) Band = Column(Integer)
Version = Column(Float) Version = Column(String)
Code = Column(Integer) Code = Column(Integer)
@@ -79,13 +79,17 @@ links = soup.find_all("a")
for link in links: for link in links:
linkArray.append(link.get('href')) linkArray.append(link.get('href'))
ReportDownload = linkArray[-6:-5] ReportDownload = linkArray[-6:-5]
print(ReportDownload[0])
#Download the latest zip and save it to the working folder. #Download the latest zip and save it to the working folder.
download = requests.get(ReportDownload[0], stream=True) download = requests.get(ReportDownload[0], stream=True)
with open('./download.zip', 'wb') as fd: try:
for chunk in download.iter_content(chunk_size=128): with open('./download.zip', 'wb') as fd:
fd.write(chunk) for chunk in download.iter_content(chunk_size=128):
# print(ReportDownload[0]) fd.write(chunk)
except:
pass
print(ReportDownload[0])
#unzip the file and grab the CSV filename #unzip the file and grab the CSV filename
with zipfile.ZipFile('./download.zip', 'r') as zip: with zipfile.ZipFile('./download.zip', 'r') as zip:

View File

@@ -1,2 +0,0 @@
@echo off
cmd /k "cd /d C:\Users\ICYN3\Documents\dev\wspr\venv\Scripts & activate & cd /d C:\Users\ICYN3\Documents\dev\wspr & python main.py & exit"

2
wsprRun.bat Normal file
View File

@@ -0,0 +1,2 @@
@echo off
cmd /k "cd /d C:\Users\ICYN3\Documents\wsprLogging\venv\Scripts & activate & cd /d C:\Users\ICYN3\Documents\wsprLogging & python main.py & exit"