Skip to content

Instantly share code, notes, and snippets.

@nvllsvm
Last active August 11, 2016 17:39
Show Gist options
  • Save nvllsvm/db6a93c245e5a024e8d596bb52375f19 to your computer and use it in GitHub Desktop.
Save nvllsvm/db6a93c245e5a024e8d596bb52375f19 to your computer and use it in GitHub Desktop.
AWeber rate limit handling
subscribers = aweber_list.subscribers.find(status='subscribed')
for i in range(0, subscribers.total_size):
try:
print(subscribers[i].id)
except aweber_api.base.APIException:
if str(e).startswith('ForbiddenError: Rate limit exceeded'):
# Wait 60 seconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment