This commit is contained in:
rscmbbng 2018-12-02 19:40:04 +01:00
parent ca30b15ca7
commit 664a2be2dd

View File

@ -1,3 +1,5 @@
#!/usr/bin/env python3
import urllib.request, datetime, os, time
from urllib.error import URLError, HTTPError
import sqlite3
@ -44,10 +46,8 @@ if error:
error = error.args[1]
time.sleep(1)
print(day,the_time,error, data)
c.execute("""INSERT INTO stats VALUES(?,?,?,?)""", (day, the_time, error, data))
time.sleep(1)
db.commit()
time.sleep(1)
db.close()