pushbullet.py
pushbullet.py copied to clipboard
get_pushes() doesn't stop automatically after getting all possible pushes
It just checks it has a "cursor" field, but it seems to have this even when it's reached the last page of pushes. This eats through rate limit very very quickly.
I'll send a pull request with a patch within the next few days hopefully.
@andrewjbennett did you ever fix this?
I've found a reasonable workaround is to use the modified_after
and limit
variables.
def grab_pushes(limit=10):
print("Fetching pushes.")
global last_check
pushes = pb.get_pushes(modified_after=last_check, limit=limit)
last_check = time.time()
for push in pushes:
# Process pushes.
print("Done.")