Revision: 12505
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at March 17, 2009 15:58 by tamuratetsuya
Initial Code
#googleã®æ¤œç´¢çµæžœæ•°ã‚’見る def countWord(word): q = {#'q':'\"'+question+'\"', 'q':word.encode('utf-8'), 'v' : 1.0, 'hl' : 'ja', 'rsz': 'small' } url=u'http://ajax.googleapis.com/ajax/services/search/web?'+ urllib.urlencode(q) json_result=urlfetch.fetch(url).content json_result = string.replace(json_result, 'null', '"null"') try: dict_result=eval('dict('+json_result+')') return dict_result['responseData']['cursor']['estimatedResultCount'] except: return 0
Initial URL
Initial Description
Initial Title
googleã®æ¤œç´¢çµæžœæ•°ã‚’å–å¾—
Initial Tags
google, python, django
Initial Language
Python