Created
November 17, 2014 07:09
-
-
Save ideodora/791d87ae3ebe627f4079 to your computer and use it in GitHub Desktop.
Urlfetch の param
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
from google.appengine.api import urlfetch | |
from urllib import urlencode | |
url = 'http://search.hatena.ne.jp/keyword’ | |
params = {'mode' : 'rss', | |
'ie' : 'utf-8', | |
'word' : 'python', | |
'page' : 1} | |
res = urlfetch.fetch(url, urlencode(params), urlfetch.POST) | |
xml = res.content | |
print xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment