import codecs import json import os import io from http import client from wordpress_xmlrpc import Client, WordPressPost from wordpress_xmlrpc.methods.posts import GetPosts from wordpress_xmlrpc.methods import posts from wordpress_xmlrpc import WordPressTerm from wordpress_xmlrpc.methods import taxonomies wp = Client('https://www.xacisco.net/blog/xmlrpc.php', 'xxx', 'xxx') for i in range (39823,41651): try: print(wp.call(posts.DeletePost(str(i)))) except: print('error')