Created
May 30, 2011 18:14
-
-
Save derekg/999242 to your computer and use it in GitHub Desktop.
Simple Tumblr Posting Example
This file contains hidden or 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
import urllib,sys | |
params = { 'email': '[email protected]' , 'password' : 'SECRET PASSWORD'} | |
params['type'] = 'regular' | |
params['group'] = 'http://derek-test-06.tumblr.com' | |
params['title'] = 'I love tumblr' | |
params['body'] = 'and I love python' | |
cred = urllib.urlencode(params,True) | |
print urllib.urlopen('http://www.tumblr.com/api/write',cred).read() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment