Last active
August 11, 2016 17:39
-
-
Save nvllsvm/db6a93c245e5a024e8d596bb52375f19 to your computer and use it in GitHub Desktop.
AWeber rate limit handling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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