<?xml version="1.0"?><methodCall> <methodName>login</methodName> <params> <param> <value><base64>XXX69XX</base64></value> </param> <param> <value><base64>X69696XX</base64></value> </param> </params></methodCall>
curl -c cookies.txt -b cookies.txt -H "Content-Type: application/xml" -d @login.xml http://yourewinner.com/winnerapi/mobiquo.php
from xmlrpc.client import ServerProxy, Binary, Error# see http://stackoverflow.com/questions/25876503/how-to-retain-cookies-for-xmlrpc-client-in-python-3client = ServerProxy("http://yourewinner.com/winnerapi/mobiquo.php", CookiesTransport())def login(username, password): # base64 encode parameters username = Binary(username.encode("utf-8")) password = Binary(password.encode("utf-8")) try: resp = client.login(username, password) return resp["result"] except Error as e: print("ERROR:", e) return False
<?xml version="1.0"?><methodCall> <methodName>get_latest_topic</methodName> <params> <param> <value><int>0</int></value> </param> <param> <value><int>9</int></value> </param> </params></methodCall>
curl -c cookies.txt -b cookies.txt -H "Content-Type: application/xml" -d @get_latest_topic.xml http://yourewinner.com/winnerapi/mobiquo.php
from xmlrpc.client import ServerProxy, Binary, Error# see http://stackoverflow.com/questions/25876503/how-to-retain-cookies-for-xmlrpc-client-in-python-3client = ServerProxy("http://yourewinner.com/winnerapi/mobiquo.php", CookiesTransport())def get_latest_topic(start, end): try: resp = client.get_latest_topic(start, end) # print username and short content for topic in resp["topics"]: msg = "{}: {}".format(resp["post_author_name"], resp["short_content") print(msg) except Error as e: print("ERROR:", e)