fix nonsense
This commit is contained in:
6
ppf.py
6
ppf.py
@@ -55,17 +55,15 @@ def fetch_contents(uri):
|
||||
|
||||
def insert_proxies(proxies, uri, sqlite):
|
||||
time_now = time.time()
|
||||
added = 0
|
||||
|
||||
query = [ 'proxy=?' for p in proxies ]
|
||||
known = [ i[0] for i in sqlite.execute('SELECT proxy FROM proxylist WHERE %s' % ' OR '.join(query), proxies).fetchall() ]
|
||||
new = [ (time_now,i,3,0) for i in proxies if not i in known ]
|
||||
|
||||
if len(new):
|
||||
added = added + len(new)
|
||||
sqlite.executemany('INSERT INTO proxylist (added,proxy,failed,tested) VALUES (?,?,?,?)', new)
|
||||
sqlite.commit()
|
||||
|
||||
if added > 0: _log('+%d item(s) from %s' % (added, uri), 'added')
|
||||
_log('+%d item(s) from %s' % (len(new), uri), 'added')
|
||||
|
||||
def proxyfind(sqlite = None):
|
||||
#print('entering proxyfind...')
|
||||
|
||||
Reference in New Issue
Block a user