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