Created
November 2, 2010 13:49
-
-
Save kosugi/659624 to your computer and use it in GitHub Desktop.
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
# -*- coding: utf-8 -*- | |
import plurk | |
import plurk_api_urllib2 | |
import simplejson | |
def do(key, username, password): | |
# login | |
api = plurk_api_urllib2.PlurkAPI(key) | |
plurk = plurk.PlurkProxy(api, simplejson.loads) | |
user = plurk.Login(username, password) | |
# post | |
text = u'(code) %.2f' % user.stats['karma'] | |
plurk.AddPlurk(':', text.encode('UTF-8')) | |
if __name__ == '__main__': | |
do(API_KEY, USERNAME, PASSWORD) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment