summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-06-20 21:45:27 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-06-20 21:45:27 (GMT)
commitd044176c5369ed1d057e9b9ab5d0c59ed2c0f914 (patch)
treed312868e0c2a20c6e6116e0894eb753669b4168d
parent5117558498601b0b59fb44338ab3ec82c7229dae (diff)
Stopped grabbing profiles when there is no new data, as expected.
-rw-r--r--cupinder.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/cupinder.py b/cupinder.py
index cb0d171..cb3b28c 100644
--- a/cupinder.py
+++ b/cupinder.py
@@ -63,23 +63,27 @@ if __name__=='__main__':
profiles = tinder.get_recommendations(1)
+ new = 0
+
for p in profiles:
if not(db.has_profile_id(p)):
- extra += 1
+ new += 1
print(p)
db.store_profile(p)
- if extra == 0:
+ if new == 0:
print('[!] No new profiles to grab! Exiting...')
break
+ extra += new
+
print('[i] Loaded ' + config.COLOR_LIKE + '%d' % extra + config.COLOR_RESET \
+ ' new profile%s... Taking some rest now!' % ('s' if extra > 2 else ''))
- sleep(5 * 60)
+ sleep(20)
elif args.process: