fix: no uris were tested because commented"

This commit is contained in:
mickael
2019-01-10 00:21:57 +00:00
parent 0cbc434883
commit 383ae6f431

5
ppf.py
View File

@@ -174,7 +174,6 @@ def proxyleech(sqlite, rows):
## proxylist was updated: error is zero
else: row[2] = 0
#check_time = (time.time() + 3600 + (3600 * row[2]))
sqlite.execute('UPDATE uris SET error=?,hash=?,check_time=? where url=?', (row[2],hash, int(time.time()),row[0]))
sqlite.commit()
@@ -223,9 +222,9 @@ if __name__ == '__main__':
while True:
try:
## any site that needs to be checked ?
#rows = [ [i[0],i[1],i[2]] for i in sqlite.execute('SELECT url,hash,error FROM uris WHERE (check_time+?+(error*?) <?) ORDER BY RANDOM() LIMIT 25', (config.ppf.checktime, config.ppf.perfail_checktime, int(time.time()))).fetchall() ]
rows = [ [i[0],i[1],i[2]] for i in sqlite.execute('SELECT url,hash,error FROM uris WHERE (check_time+?+(error*?) <?) ORDER BY RANDOM() LIMIT 25', (config.ppf.checktime, config.ppf.perfail_checktime, int(time.time()))).fetchall() ]
#if len(rows): proxyleech(sqlite,rows)
if len(rows): proxyleech(sqlite,rows)
## search for new website during free time
if config.ppf.search: proxyfind(sqlite)
## sleep