tumblr.py #! /usr/bin/env python # coding: utf-8 import urllib TUMBLR_URL = 'http://www.tumblr.com/api/write' def postImg(url, caption='', link=''): pd = {} pd['email'] = 'mailaddress' pd['password'] = 'password' pd['group'] = 'progdhoge.tumblr.com' pd['type'] = 'photo' pd['source'] = url pd['caption'] = caption pd['click-through-url'] = link params = urllib.urlencode(pd) up = urllib.urlopen(TUMBL
![PythonでTumblrに画像を投稿するテスト - progd](https://cdn-ak-scissors.b.st-hatena.com/image/square/04ca34fedc97bc2f02343954791878a61745d32c/height=288;version=1;width=512/https%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fp%2Fprogd%2F20090822%2F20090822114802.png)