Skip to content

Instantly share code, notes, and snippets.

@hjupadhyay
hjupadhyay / wpadapter.py
Last active Oct 28, 2020
A csv to wordpress posting adapter written in python
View wpadapter.py
# wpadapter.py inserts posts from a csv file to a wordpress blog
import datetime , xmlrpclib , csv
# STEP 1 create a wp insert function
def insert_wp_post(title="Title was not passed !",content="Content was not passed !"):
wp_url = "http:// <INSERT YOUR WORDPRESS URL HERE >/xmlrpc.php"
wp_username = "wordpress username"
wp_password = "wordpress password"
wp_blogid = ""
postype=""