-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial tests with wordpressxmlrpc.py
- Loading branch information
1 parent
af16995
commit 94be7e1
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from wordpress_xmlrpc import Client | ||
from wordpress_xmlrpc.methods import posts | ||
|
||
client = Client( | ||
'http://www.weeklyosm.eu/xmlrpc.php', | ||
'alexandre', 'SENHA' | ||
) | ||
|
||
posts = client.call(posts.GetPosts()) | ||
|
||
#for post in posts[:1]: | ||
#print(posts[1].id) | ||
#print(posts[1].title) | ||
#print(posts[1].link) | ||
print(posts[0].content) | ||
|
||
# http://python-wordpress-xmlrpc.readthedocs.org/en/latest | ||
# | ||
# http://codex.wordpress.org/XML-RPC_WordPress_API | ||
# https://github.com/maxcutler/python-wordpress-xmlrpc/ |