我想从“www.google.com”下载查询结果。我有这段代码:
string query = "where buy a nice dress in Londod";
string site = "www.google.com";
string page = ??; //What I must to do in order to get this page
有没有办法做我想做的事?
答案 0 :(得分:1)
基本google查询可以采用以下方式格式化:
http://www.google.com/#q=day+of+the+tentacle
(在q =之后搜索关键字)
答案 1 :(得分:0)
你需要创建一个网络爬虫,如果你使用python,它很简单:
import urllib2
url = "http://www.google.com"
request = urllib2.Request(url)
response = urllib2.urlopen(request)
document = response.read()
print document