2010-07-26 48 views

回答

2

看看Alex Martelli's example

如果您搜索“汽车”之类的模糊内容,data将如下所示。注意它不是很长;您只能获得排名前几位的点击数,并可链接到“moreResultsUrl”。因此,进行此查询的速度应该相当快,并在 data['cursor']['estimatedResultCount']中查看估计的点击次数。

{'cursor': {'currentPageIndex': 0, 
      'estimatedResultCount': '168000000', 
      'moreResultsUrl': 'http://www.google.com/search?oe=utf8&ie=utf8&source=uds&start=0&hl=en&q=cars', 
      'pages': [{'label': 1, 'start': '0'}, 
         {'label': 2, 'start': '4'}, 
         {'label': 3, 'start': '8'}, 
         {'label': 4, 'start': '12'}, 
         {'label': 5, 'start': '16'}, 
         {'label': 6, 'start': '20'}, 
         {'label': 7, 'start': '24'}, 
         {'label': 8, 'start': '28'}]}, 
'results': [ <<list of 4 dicts>> ]} 
相关问题