Skip to content

Commit

Permalink
Merge pull request #14 from haverland/dev
Browse files Browse the repository at this point in the history
fix loading after v14 of edgeAI
  • Loading branch information
haverland authored Feb 6, 2023
2 parents c00f54f + 401fc13 commit 03c1681
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions collectmeteranalog/collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ def readimages(servername, output_dir, daysback=15):
path = output_dir + "/" + servername + "/" + picturedate + "/" + hour
os.makedirs(path, exist_ok=True)
for url in urls:
if (url[-4] != 'jpg'):
continue
prefix = os.path.basename(url).split('_', 1)[0]
if (prefix == os.path.basename(url)):
prefix = ''
Expand All @@ -66,6 +68,7 @@ def readimages(servername, output_dir, daysback=15):
while countrepeat > 0:
if (not os.path.exists(path + "/" + prefix + filename)):
try:
print(serverurl+url)
img = Image.open(requests.get(serverurl+url, stream=True).raw)
img.save(path + "/" + prefix + filename)
count = count + 1
Expand Down

0 comments on commit 03c1681

Please sign in to comment.