Created
January 21, 2018 05:34
-
-
Save parzibyte/c7691723c88f21300a433b63a41524fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from wordpress_xmlrpc import Client | |
from wordpress_xmlrpc.methods import posts | |
usuario = "" | |
contraseña = "" | |
sitio = "" | |
cliente = Client(sitio, usuario, contraseña) | |
entradas = cliente.call(posts.GetPosts()) | |
if len(entradas) > 0: | |
for entrada in entradas: | |
print(""" | |
ID: {} | |
Título: {} | |
Contenido: {} | |
Estado: {} | |
""".format(entrada.id, entrada.title, entrada.content, entrada.post_status)) | |
input("Presiona ENTER para ver la siguiente entrada") | |
else: | |
print("No hay entradas") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment