This commit is contained in:
Your Name
2021-05-02 00:22:12 +02:00
parent 66006a0273
commit cae6f75643
9 changed files with 184 additions and 88 deletions

6
ppf.py
View File

@@ -321,16 +321,16 @@ if __name__ == '__main__':
statusmsg = time.time()
while True:
try:
time.sleep(random.random()/10)
if (time.time() - statusmsg) > 180:
_log('running %d thread(s) over %d' % (len(threads), config.ppf.threads), 'ppf')
statusmsg = time.time()
time.sleep(0.1)
if not len(rows):
if (time.time() - reqtime) > 3:
rows = urldb.execute(qurl, (config.ppf.max_fail, config.ppf.checktime, config.ppf.perfail_checktime, int(time.time()))).fetchall()
reqtime = time.time()
if len(rows) < config.ppf.threads:
time.sleep(5)
time.sleep(60)
rows = []
else:
nao = time.time()
@@ -345,7 +345,6 @@ if __name__ == '__main__':
url, proxylist, stale_count, error, retrievals, content_type, proxies_added, execute = thread.retrieve()
new = []
for p in proxylist:
#print(p)
if not p in _known_proxies:
new.append(p)
_known_proxies[p]=1
@@ -363,6 +362,7 @@ if __name__ == '__main__':
t = Leechered(row[0], row[1], row[2], row[3], row[4], row[5])
threads.append(t)
t.start()
time.sleep(random.random()/100)
except KeyboardInterrupt:
if watcherd: