diff options
Diffstat (limited to 'db.py')
-rw-r--r-- | db.py | 23 |
1 files changed, 21 insertions, 2 deletions
@@ -207,7 +207,7 @@ class HumanKind(object): return new - def load_new_profiles(self): + def load_unknown_profiles(self): """Load all new Tinder profiles.""" new = [] @@ -215,7 +215,26 @@ class HumanKind(object): values = (False, False, False) cursor = self._db.cursor() - cursor.execute('SELECT uid FROM People WHERE liked = ? AND superliked = ? AND passed = ?', values) + cursor.execute('SELECT uid FROM People WHERE liked = ? AND passed = ? AND superliked = ?', values) + + for found in cursor.fetchall(): + + profile = self.load_profile(found['uid']) + + new.append(profile) + + return new + + + def load_new_profiles(self): + """Load all new Tinder profiles.""" + + new = [] + + values = (False, ) + + cursor = self._db.cursor() + cursor.execute('SELECT uid FROM People WHERE extracted = ?', values) for found in cursor.fetchall(): |