Answers for "xmlrpc get all posts"

0

xmlrpc get all posts

# 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
Posted by: Guest on October-04-2021

Python Answers by Framework

Browse Popular Code Answers by Language