def clearImages():
getPage(air, 'switch_cameramode.cgi?mode=standalone', headers)
getPage(air, 'switch_cameramode.cgi?mode=play', headers)
getPage(air, 'switch_cameramode.cgi?mode=playmaintenance', headers)
bodyText=("Clearing Images on A01 <br> \n")
response= getPage(air , 'get_imglist.cgi?DIR=/DCIM/100OLYMP', headers)
results=re.findall("P.\d*.JPG", response)
for result in results:
link='exec_erase.cgi?DIR=/DCIM/100OLYMP/' + result
print(getPage(air, link, headers))
bodyText=bodyText + "Erasing : " + link + " <br> \n"
#Delete local files
if os.path.isfile('static/thumbs/'+ result):
os.remove('static/thumbs/'+ result)
if os.path.isfile('static/images/'+ result):
os.remove('static/images/'+ result)
bodyText=Markup(bodyText)
getPage(air, 'switch_cameramode.cgi?mode=standalone', headers)
getPage(air, 'switch_cameramode.cgi?mode=rec', headers)
getPage(air, 'exec_takemisc.cgi?com=startliveview&port=5555', headers)
return render_template('templatecss.html', bodyText=bodyText)
评论列表
文章目录