Oops : forgot to close browser

This commit is contained in:
thopic 2021-11-21 01:42:47 +01:00
parent d0f462b03e
commit d6bbf8d5c8
Signed by: thopic
GPG Key ID: 292DBBF0B54AD4C5

View File

@ -23,14 +23,14 @@ try:
for duration in ["24h", "7d", "1M", "1y"]:
browser.get("https://mon.gnous.fr/app/dashboards#/view/380099d0-4944-11ec-81a9-95d7ffa23468?embed=true&_g=(filters%3A!()%2CrefreshInterval%3A(pause%3A!t%2Cvalue%3A0)%2Ctime%3A(from%3Anow-"+duration+"%2Cto%3Anow))&hide-filter-bar=true")
sleep(30)
if duration == "24h":
sleep(15)
sleep(60)
browser.get_screenshot_as_file("html/ressources/stats/mm"+duration+".png")
for duration in ["24h", "7d", "1M", "1y"]:
browser.get("https://mon.gnous.fr/app/dashboards#/view/ef70de60-4947-11ec-81a9-95d7ffa23468?embed=true&_g=(filters%3A!()%2CrefreshInterval%3A(pause%3A!t%2Cvalue%3A0)%2Ctime%3A(from%3Anow-"+duration+"%2Cto%3Anow))&hide-filter-bar=true")
sleep(30)
sleep(60)
browser.get_screenshot_as_file("html/ressources/stats/nc"+duration+".png")
browser.quit()
except Exception as e:
logging.error(traceback.format_exc())