import xmlrpclib
import time
ljsrv = xmlrpclib.ServerProxy(r"http://www.livejournal.com/interface/xmlrpc")
curtime = time.localtime()
data = {'ver':0,
'subject':'test post from xml rpc 2',
'year': curtime[0],
'mon': curtime[1],
'day': curtime[2],
'hour': curtime[3],
'min': curtime[4],
'security': 'private',
'event': 'test message from xml rpc',
'username': 'VasyPupkin',
'password': 'PaSsWoRd',
}
response = ljsrv.LJ.XMLRPC.postevent(data)
print response
Описание команд LiveJournal API.
Комментариев нет:
Отправить комментарий