一、 Scrapy简介

Scrapy is a fast high-level screen scraping and web crawling framework, used to crawl websites and extract structured 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/

二、 安装Python2.7

官方主页:http://www.python.org/

下载地址:http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi

1) 安装python

安装目录:D:\Python27

2) 添加环境变量

略System Properties -> Advanced -> Environment Variables - >System Variables -> Path -> Edit

3) 验证环境变量

T:\>set Path
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\Rational\common;D:\Rational\ClearCase\bin;D:\Python27;D:\Python27\Scripts
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH

4) 验证Python

T:\>python
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit() T:\>

三、 安装Twisted

Twisted is an event-driven networking engine written in Python and licensed under the open source

1) 安装setuptools

Download, build, install, upgrade, and uninstall Python packages -- easily!

官方主页:http://pypi.python.org/pypi/setuptools

下载地址:http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11.win32-py2.7.exe

安装过程:略

2) 安装Zope.Interface

官方主页:http://pypi.python.org/pypi/zope.interface/

下载地址:http://pypi.python.org/packages/2.7/z/zope.interface/zope.interface-4.0.1-py2.7-win32.egg

安装过程:

T:\>d:
D:\>cd D:\Python27\Scripts
D:\Python27\Scripts>easy_install.exe zope.interface-4.0.1-py2.7-win32.egg
Processing zope.interface-4.0.1-py2.7-win32.egg
creating d:\python27\lib\site-packages\zope.interface-4.0.1-py2.7-win32.egg
Extracting zope.interface-4.0.1-py2.7-win32.egg to d:\python27\lib\site-packages
Adding zope.interface 4.0.1 to easy-install.pth file Installed d:\python27\lib\site-packages\zope.interface-4.0.1-py2.7-win32.egg
Processing dependencies for zope.interface==4.0.1
Finished processing dependencies for zope.interface==4.0.1 D:\Python27\Scripts>

验证安装:

D:\Python27\Scripts>python
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import zope.interface
>>>

3) 安装Twisted

官方主页:http://twistedmatrix.com/trac/wiki/TwistedProject

下载地址:http://pypi.python.org/packages/2.7/T/Twisted/Twisted-12.1.0.win32-py2.7.msi

安装过程:略

四、 安装w3lib

官方主页:http://pypi.python.org/pypi/w3lib

下载地址: http://pypi.python.org/packages/source/w/w3lib/w3lib-1.2.tar.gz

解压过程:略

安装过程:

T:\w3lib-1.2>python setup.py install
running install
running build
running build_py
creating build
creating build\lib
creating build\lib\w3lib
copying w3lib\encoding.py -> build\lib\w3lib
copying w3lib\form.py -> build\lib\w3lib
copying w3lib\html.py -> build\lib\w3lib
copying w3lib\http.py -> build\lib\w3lib
copying w3lib\url.py -> build\lib\w3lib
copying w3lib\util.py -> build\lib\w3lib
copying w3lib\__init__.py -> build\lib\w3lib
running install_lib
creating D:\Python27\Lib\site-packages\w3lib
copying build\lib\w3lib\encoding.py -> D:\Python27\Lib\site-packages\w3lib
copying build\lib\w3lib\form.py -> D:\Python27\Lib\site-packages\w3lib
copying build\lib\w3lib\html.py -> D:\Python27\Lib\site-packages\w3lib
copying build\lib\w3lib\http.py -> D:\Python27\Lib\site-packages\w3lib
copying build\lib\w3lib\url.py -> D:\Python27\Lib\site-packages\w3lib
copying build\lib\w3lib\util.py -> D:\Python27\Lib\site-packages\w3lib
copying build\lib\w3lib\__init__.py -> D:\Python27\Lib\site-packages\w3lib
byte-compiling D:\Python27\Lib\site-packages\w3lib\encoding.py to encoding.pyc
byte-compiling D:\Python27\Lib\site-packages\w3lib\form.py to form.pyc
byte-compiling D:\Python27\Lib\site-packages\w3lib\html.py to html.pyc
byte-compiling D:\Python27\Lib\site-packages\w3lib\http.py to http.pyc
byte-compiling D:\Python27\Lib\site-packages\w3lib\url.py to url.pyc
byte-compiling D:\Python27\Lib\site-packages\w3lib\util.py to util.pyc
byte-compiling D:\Python27\Lib\site-packages\w3lib\__init__.py to __init__.pyc
running install_egg_info
Writing D:\Python27\Lib\site-packages\w3lib-1.2-py2.7.egg-info T:\w3lib-1.2>

验证安装:

T:\>python
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import w3lib
>>>

五、 安装libxml2

官方主页:http://users.skynet.be/sbi/libxml-python/http://pypi.python.org/pypi/pyOpenSSL

下载地址:http://users.skynet.be/sbi/libxml-python/binaries/libxml2-python-2.7.7.win32-py2.7.exe

安装过程:略

验证安装:

T:\>python
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import libxml2
>>>

六、 安装pyOpenSSL

官方主页:http://pypi.python.org/pypi/pyOpenSSL

下载地址:http://pypi.python.org/packages/2.7/p/pyOpenSSL/pyOpenSSL-0.13.winxp32-py2.7.msi

安装过程:略

验证安装:

T:\>python
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import OpenSSL
>>>

七、 安装Scrapy

官方主页:http://scrapy.org/

下载地址:http://pypi.python.org/packages/source/S/Scrapy/Scrapy-0.14.4.tar.gz

解压过程:略

安装过程:

T:\Scrapy-0.14.4>python setup.py install

……
Installing easy_install-2.7-script.py script to D:\Python27\Scripts
Installing easy_install-2.7.exe script to D:\Python27\Scripts
Installing easy_install-2.7.exe.manifest script to D:\Python27\Scripts Using d:\python27\lib\site-packages
Finished processing dependencies for Scrapy==0.14.4 T:\Scrapy-0.14.4>

验证安装:

T:\>scrapy
Scrapy 0.14.4 - no active project Usage:
scrapy <command> [options] [args] Available commands:
fetch Fetch a URL using the Scrapy downloader
runspider Run a self-contained spider (without creating a project)
settings Get settings values
shell Interactive scraping console
startproject Create new project
version Print Scrapy version
view Open URL in browser, as seen by Scrapy Use "scrapy <command> -h" to see more info about a command T:\>

原文地址:http://www.cnblogs.com/txw1958/archive/2012/07/12/scrapy_installation_introduce.html

Scrapy安装介绍的更多相关文章

  1. Python -- Scrapy 框架简单介绍(Scrapy 安装及项目创建)

    Python -- Scrapy 框架简单介绍 最近在学习python 爬虫,先后了解学习urllib.urllib2.requests等,后来发现爬虫也有很多框架,而推荐学习最多就是Scrapy框架 ...

  2. python Scrapy安装和介绍

    python Scrapy安装和介绍 Windows7下安装1.执行easy_install Scrapy Centos6.5下安装 1.库文件安装yum install libxslt-devel ...

  3. selenium模块使用详解、打码平台使用、xpath使用、使用selenium爬取京东商品信息、scrapy框架介绍与安装

    今日内容概要 selenium的使用 打码平台使用 xpath使用 爬取京东商品信息 scrapy 介绍和安装 内容详细 1.selenium模块的使用 # 之前咱们学requests,可以发送htt ...

  4. scrapy框架介绍及安装

    什么是scrapy框架? scrapy框架的安装 1.windowes下的安装 Python 2 / 3升级pip版本: pip install --upgrade pip 通过pip 安装 Scra ...

  5. 第三百二十四节,web爬虫,scrapy模块介绍与使用

    第三百二十四节,web爬虫,scrapy模块介绍与使用 Scrapy是一个为了爬取网站数据,提取结构性数据而编写的应用框架. 其可以应用在数据挖掘,信息处理或存储历史数据等一系列的程序中.其最初是为了 ...

  6. Python3 Scrapy 安装方法

    Python3 Scrapy 安装方法 (一脸辛酸泪) 写在前面 最近在学习爬虫,在熟悉了Python语言和BeautifulSoup4后打算下个爬虫框架试试. 没想到啊,这坑太深了... 看了看相关 ...

  7. Scrapy安装向导

    原文地址 https://doc.scrapy.org/en/latest/intro/install.html 安装Scrapy Scrapy运行在python2.7和python3.3或以上版本( ...

  8. 在windows下如何新建爬虫虚拟环境和进行scrapy安装

    Scrapy是Python开发的一个快速.高层次的屏幕抓取和web抓取框架,用于抓取web站点并从页面中提取结构化的数据.Scrapy吸引人的地方在于它是一个框架,任何人都可以根据需求方便的修改.Sc ...

  9. Windows下安装Scrapy方法及常见安装问题总结——Scrapy安装教程

    这几天,很多朋友在群里问Scrapy安装的问题,其实问题方面都差不多,今天小编给大家整理一下Scrapy的安装教程,希望日后其他的小伙伴在安装的时候不再六神无主,具体的教程如下. Scrapy是Pyt ...

随机推荐

  1. SqlServer2005或2008数据库字典--表结构.sql

    SELECT TOP 100 PERCENT --a.id,       CASE WHEN a.colorder = 1 THEN d.name ELSE '' END AS 表名,       C ...

  2. map与mapPartitions

    区别在于sc.map是将RDD下的所有行数据统计处理.而sc.mapPartitions是按RDD分区进行数据统计处理. 测试一下: val data = sc.parallelize(1 to 6, ...

  3. js:语言精髓笔记11--动态语言特性(1)

    语言:程序最终被表达为数据(结构)和逻辑(算法),命令式和说明式/函数式语言分别从这两方面分类: 动态:在语言陈述时无法确定,必须在计算机执行时才能确定语言关系:JS是完全动态语言,导致其不确定性一般 ...

  4. Codeforces Round #294 (Div. 2)

    水 A. A and B and Chess /* 水题 */ #include <cstdio> #include <algorithm> #include <iost ...

  5. Task 实现多线程的模板

        1.Task多线程简单模板   using System; using System.Collections.Generic; using System.Threading.Tasks;   ...

  6. 算法教程(3)zz

    First off, we can use our Line-Point Distance code to test for the "BOUNDARY" case. If the ...

  7. Drainage Ditches

    Drainage Ditches Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) ...

  8. 【转】Profiling application LLC cache misses under Linux using Perf Events

    转自:http://ariasprado.name/2011/11/30/profiling-application-llc-cache-misses-under-linux-using-perf-e ...

  9. vi/vim键盘图-----又一张桌面背景好图

    也许还是有很多人不能愿意用CLI的vi/Vim来写东西,不过,当你真的习惯了,它的高效性就是不可估量了.下面的这张图,一看就明白了,从此,学习变的不再艰难^_^ 补注: 图中没有关于查找和替换的,应该 ...

  10. [插头DP自我总结]

    [HNOI 2007]神奇游乐园 #include <bits/stdc++.h> #define maxn 110 using namespace std; typedef long l ...