Fixed scrape sql query

This commit is contained in:
Emily 2018-05-15 11:27:07 +02:00
parent c253a2aca6
commit 17273a1f8d

View File

@ -3,7 +3,7 @@
import urllib.request, json
import MySQLdb
import MySQLdb.cursors
import time
import time, calendar
import atexit
finished = False
@ -44,12 +44,12 @@ while not finished:
data["filename"],
data["file_hash"],
data["filesize"],
data["timestamp"],
calendar.timegm(time.strptime(data["timestamp"], "%Y-%m-%d %H:%M:%S")),
data["patch_id"],
data["url_full"],
data["url_patch"]
]
)
])
sql.commit()
completed = True
failed_streak = 0
print("target: {}, status: OK".format(target))