原文地址:http://dcortesi.com/2008/05/28/google-ajax-search-api-example-python-code/
For whatever reason, there aren’t many examples on the net of Python code that can be used
with the Google AJAX Search API. I’m not really sure why this is and perhaps I’m missing something,
but for future reference here’s some sample python code.
#!/usr/bin/python import urllib import simplejson query = urllib.urlencode({'q' : 'damon cortesi'}) url = 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0&%s' \ % (query) search_results = urllib.urlopen(url) json = simplejson.loads(search_results.read()) results = json['responseData']['results'] for i in results: print i['title'] + ": " + i['url']
Google Web Search API的文档:http://code.google.com/intl/zh-CN/apis/websearch/docs/reference.html#_intro_fonje
呵呵,谢谢
VaTG790i.最好的<a href=http://www.kyfei.com>网站推广软件</a>,
非常好
....................
;ui;普i;uighur;ui;ui;个
在unix网络编程中看到了关于TCP/IP的一些内容,我感觉还是写的不够。正在下载中,一定
下载地址呢