📅  最后修改于: 2022-03-11 14:46:37.899000             🧑  作者: Mango
# get pages in batches of 20
offset = 0
increment = 20
while True:
posts = client.call(posts.GetPosts({'number': increment, 'offset': offset}))
if len(posts) == 0:
break # no more posts returned
for post in posts:
do_something(post)
offset = offset + increment