一、Scrapy简介
Scrapy is a fast high-level screenscraping and web crawling framework, used to crawl websites and extractstructured data from their pages. It can be used for a wide range of purposes,from data mining to monitoring and automated testing.
官方主页: http://www.scrapy.org/
官方下载页面:http://doc.scrapy.org/en/0.14/intro/install.html
二、安装Python2.5
按照上图安装Scrapy所需模块依次下载安装,首先安装Python2.5
安装目录:F:\thread\trunk\SE\src\DDMS\config\SEconfigXML\Python25
添加环境变量F:\thread\trunk\SE\src\DDMS\config\SEconfigXML\Python25到path中
cmd下验证python
三、安装Twisted
Twisted is an event-driven networkingengine written in Python and licensed under the open source
1) 安装setuptools
官方主页:http://pypi.python.org/pypi/setuptools
下载页面:https://pypi.python.org/packages/source/s/setuptools/
2) 安装Zope.Interface
官方主页:http://pypi.python.org/pypi/zope.interface/
下载地址:https://pypi.python.org/pypi/zope.interface#download
在目录F:\thread\trunk\SE\src\DDMS\config\SEconfigXML\Python25\Scripts下
利用命令easy_install.exe zope.interface-3.8.0-py2.5-win32.egg完成
Zope.Interface的安装,也可以直接将下载后的egg包丢到F:\thread\trunk\SE\src\
DDMS\config\SEconfigXML\Python25\Scripts目录下由scrapy自动解压安装
安装并验证安装是否正确
3) 安装Twisted
官方主页:http://twistedmatrix.com/trac/wiki/TwistedProject
下载地址:http://twistedmatrix.com/Releases/Twisted/12.0/
解压压缩包并运行setup.pyan安装
四、安装w3lib
官方主页:http://pypi.python.org/pypi/w3lib
下载地址: http://pypi.python.org/packages/source/w/w3lib/w3lib-1.2.tar.gz
解压:略
安装过程:同上
五、 安装libxml2
官方主页:http://users.skynet.be/sbi/libxml-python/http://pypi.python.org/pypi/pyOpenSSL
下载地址:https://pypi.python.org/simple/lxml/
安装过程:同上
六、 安装pyOpenSSL
下载地址:https://pypi.python.org/simple/pyOpenSSL/
七、安装simplejson
下载地址:https://pypi.python.org/simple/simplejson/
安装同上
八、 安装Scrapy
官方主页:http://scrapy.org/
下载地址:https://pypi.python.org/pypi/Scrapy/0.14.4
安装过程:
如果在安装以上除Scrapy外的模块时出现问题,可以直接将出问题的模块解压到
F:\thread\trunk\SE\src\DDMS\config\SEconfigXML\Python25\Lib\site-packages目录下
最后将路径F:\thread\trunk\SE\src\DDMS\config\SEconfigXML\Python25\Scripts添加到环境变量中,并验证是否安装正确