今天在用scrapy爬某个网站的数据,其中DOM解析我用的是BeautifulSoup,速度上没有XPath来得快,不过因为用了习惯了,所以一直用的bs,版本是bs4不过在爬取过程中遇到了一些问题,其中一个是Unicode转码问题,这也算是python中一个著名问题了。我遇到的算是Beautiful...
分类:
其他好文 时间:
2014-07-22 22:53:55
阅读次数:
229
Scrapy是一个用python实现都爬虫框架,简单易用,功能强大,只需要在框架的基础上自定义自己的分析规则即可,具体如何新建工程等待都在官方文档上面讲解得非常清楚,官方文档tutorial(http://doc.scrapy.org/en/latest/intro/tutorial.html).....
分类:
编程语言 时间:
2014-07-22 22:50:15
阅读次数:
307
关于Vertex Array Objects(VAOs), Vertex
Buffer Objects(VBOs), Vertex and Fragment Shaders的概念还是看官方说明理解的好!
The OpenGL 3.2 core specification removes the majority of the fixed function pipeline previou...
分类:
其他好文 时间:
2014-07-19 23:31:48
阅读次数:
241
Cocos2d (v.3.0) rendering pipeline roadmap
Why (the vision)
The way currently Cocos2d does rendering is good but it is beginning to feel somehow antiquate and moreover it doesn’t actually leverag...
分类:
其他好文 时间:
2014-07-19 23:14:08
阅读次数:
449
一、 Scrapy简介Scrapy is a fast high-level screen scraping and web crawling framework, used to crawl websites and extract structured data from their pages...
使用Scrapy这个python的网络爬虫框架抓取Scrapy中文文档开发第一步:新建项目scrapy startproject myfirst目录结构:myfirst│ scrapy.cfg Scrapy项目配置文件│└─myfirst Scrapy项目代码存放目...
分类:
其他好文 时间:
2014-07-19 16:00:43
阅读次数:
207
所谓网络爬虫,就是一个在网上到处或定向抓取数据的程序,当然,这种说法不够专业,更专业的描述就是,抓取特定网站网页的HTML数据。不过由于一个网站的网页很多,而我们又不可能事先知道所有网页的URL地址,所以,如何保证我们抓取到了网站的所有HTML页面就是一个有待考究的问题了。一般的方法是,定义一个入口...
分类:
其他好文 时间:
2014-07-19 15:13:58
阅读次数:
241
windows 命令行编码是cp936,而D:\Python27\Scripts\scrapy脚本编码是Unicode编码顾在命令行启动会出现编码问题解决办法:修改D:\Python27\Scripts\ 下的scrapy文件,这个文件即scrapy命令的程序文件,加上如下代码即可:import s...
分类:
其他好文 时间:
2014-07-19 14:21:14
阅读次数:
209
Constructing selectorsFor convenience,response objects exposes a selector on .selector attribute,it's totally ok to use this shortcut when possible.//...
分类:
其他好文 时间:
2014-07-15 09:18:04
阅读次数:
220
BACKGROUNDMany algorithms on a graphics processing unit (GPU) may benefit from doing a query in a hierarchical tree structure (including quad-trees, o...
分类:
其他好文 时间:
2014-07-13 19:47:28
阅读次数:
289