Created
January 21, 2018 04:28
-
-
Save parzibyte/43cb021119ef475353bfe4c106c1af28 to your computer and use it in GitHub Desktop.
Hola mundo con api de wp y python
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.users import GetUserInfo | |
usuario = "tu_usuario" | |
contraseña = "tu_contraseña" | |
sitio = "tusitiodewordpress.com/xmlrpc.php" #Recuerda que debes llamar al archivo xmlrpc.php | |
cliente = Client(sitio, usuario, contraseña) | |
datos_usuario = cliente.call(GetUserInfo()) | |
print("Tu nombre de usuario es {}".format(datos_usuario)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment