Python爬取google搜索结果
2012-07-26 12:28
441 查看
使用Python爬取google的搜索结果:
参见:/article/2830495.html
# -*- coding: utf-8 -*-
import urllib2
import cookielib
url = 'http://www.google.com.hk/search?sourceid=chrome&;ie=UTF-8&q=python'
cj = cookielib.CookieJar()
opener=urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
opener.addheaders = [('User-agent', 'Opera/9.23')]
urllib2.install_opener(opener)
req=urllib2.Request(url)
response =urllib2.urlopen(req)
content = response.read()
print content
参见:/article/2830495.html
相关文章推荐
- 编写Python脚本来获取Google搜索结果的示例
- 编写Python脚本来获取Google搜索结果的示例
- python抓取google搜索结果
- 编写Python脚本来获取Google搜索结果的示例
- python 抓取google搜索结果
- 关于python抓取google搜索结果的若干问题
- 关于python抓取google搜索结果的若干问题
- Python实现抓取百度搜索结果页的网站标题信息
- Google表示停止对搜索结果进行审查,准备退出中国
- 搜索结果仿google搜索提示SuggestFramework的使用
- 采集Google搜索结果
- python如何获取百度搜索结果的真实URL
- Google 搜索结果改为每页7条 来自同一域名的结果更多
- C#winform抓取百度,Google搜索关键词结果
- Google搜索结果链接重定向的插件
- python3爬取百度搜索结果url,获得真实url,提取网页正文并分词,多进程的使用
- Python 获取Twitter搜索结果
- 停止过滤搜索结果符合 Google 的商业利益
- 在新窗口或Tab页中打开Google的搜索结果
- 模拟Google首页(dwr实现ajax) 弹出补全搜索结果