Fixed scrape sql query
This commit is contained in:
parent
c253a2aca6
commit
17273a1f8d
|
@ -3,7 +3,7 @@
|
||||||
import urllib.request, json
|
import urllib.request, json
|
||||||
import MySQLdb
|
import MySQLdb
|
||||||
import MySQLdb.cursors
|
import MySQLdb.cursors
|
||||||
import time
|
import time, calendar
|
||||||
import atexit
|
import atexit
|
||||||
|
|
||||||
finished = False
|
finished = False
|
||||||
|
@ -44,12 +44,12 @@ while not finished:
|
||||||
data["filename"],
|
data["filename"],
|
||||||
data["file_hash"],
|
data["file_hash"],
|
||||||
data["filesize"],
|
data["filesize"],
|
||||||
data["timestamp"],
|
calendar.timegm(time.strptime(data["timestamp"], "%Y-%m-%d %H:%M:%S")),
|
||||||
data["patch_id"],
|
data["patch_id"],
|
||||||
data["url_full"],
|
data["url_full"],
|
||||||
data["url_patch"]
|
data["url_patch"]
|
||||||
]
|
])
|
||||||
)
|
sql.commit()
|
||||||
completed = True
|
completed = True
|
||||||
failed_streak = 0
|
failed_streak = 0
|
||||||
print("target: {}, status: OK".format(target))
|
print("target: {}, status: OK".format(target))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user