do not crash when the limitation rate is reached
This commit is contained in:
parent
3df00b6395
commit
81503a88e8
2 changed files with 13 additions and 2 deletions
|
|
@ -100,9 +100,19 @@ class TinderBrowser(APIBrowser):
|
|||
return
|
||||
|
||||
profile = self.recs.pop()
|
||||
|
||||
if 'tinder_rate_limited' in profile['_id']:
|
||||
self.logger.info(profile['bio'])
|
||||
return 600
|
||||
|
||||
resp = self.request('/like/%s' % profile['_id'])
|
||||
|
||||
if resp['match']:
|
||||
self.logger.error('Match with %s!' % profile['name'])
|
||||
else:
|
||||
self.logger.info('Liked %s (%r)' % (profile['name'], profile['common_likes']))
|
||||
|
||||
if len(self.recs) > 0:
|
||||
return 1
|
||||
else:
|
||||
return 60
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue