-
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.
- Loading branch information
1 parent
26208fc
commit c6626ab
Showing
1 changed file
with
20 additions
and
14 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 |
---|---|---|
@@ -1,20 +1,26 @@ | ||
from wordpress_xmlrpc import Client | ||
from wordpress_xmlrpc.methods import posts | ||
|
||
client = Client( | ||
'http://www.weeklyosm.eu/xmlrpc.php', | ||
'alexandre', 'SENHA' | ||
) | ||
def test(): | ||
|
||
posts = client.call(posts.GetPosts()) | ||
client = Client( | ||
'http://www.weeklyosm.eu/xmlrpc.php', | ||
'alexandre', 'SENHA' | ||
) | ||
|
||
#for post in posts[:1]: | ||
#print(posts[1].id) | ||
#print(posts[1].title) | ||
#print(posts[1].link) | ||
print(posts[0].content) | ||
posts = client.call(posts.GetPosts()) | ||
|
||
# http://python-wordpress-xmlrpc.readthedocs.org/en/latest | ||
# | ||
# http://codex.wordpress.org/XML-RPC_WordPress_API | ||
# https://github.com/maxcutler/python-wordpress-xmlrpc/ | ||
#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/ | ||
|
||
|
||
if __name__ == "__main__": | ||
test() |