forked from netkiller/netkiller.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·158 lines (109 loc) · 26.1 KB
/
Copy pathindex.html
File metadata and controls
executable file
·158 lines (109 loc) · 26.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Netkiller Python 手札</title><link rel="stylesheet" type="text/css" href="/docbook.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><meta name="description" content="我的系列文档 编程语言 Netkiller Architect 手札 Netkiller Developer 手札 Netkiller Java 手札 Netkiller PHP 手札 Netkiller Python 手札 Netkiller Testing 手札 Netkiller Cryptography 手札 Netkiller Perl 手札 Netkiller Docbook 手札 Netkiller Project 手札 Netkiller Management 手札" /><meta name="keywords" content="php, pear, pecl, phar" /><link rel="home" href="index.html" title="Netkiller Python 手札" /><link rel="next" href="preface.html" title="自述" /></head><body><a xmlns="" href="//www.netkiller.cn/">Home</a> |
<a xmlns="" href="//netkiller.github.io/">简体中文</a> |
<a xmlns="" href="http://netkiller.sourceforge.net/">繁体中文</a> |
<a xmlns="" href="/journal/index.html">杂文</a> |
<a xmlns="" href="//www.netkiller.cn/home/donations.html">打赏(Donations)</a> |
<a xmlns="" href="http://netkiller-github-com.iteye.com/">ITEYE 博客</a> |
<a xmlns="" href="http://my.oschina.net/neochen/">OSChina 博客</a> |
<a xmlns="" href="https://www.facebook.com/bg7nyt">Facebook</a> |
<a xmlns="" href="http://cn.linkedin.com/in/netkiller/">Linkedin</a> |
<a xmlns="" href="https://zhuanlan.zhihu.com/netkiller">知乎专栏</a> |
<a xmlns="" href="/search.html">Search</a> |
<a xmlns="" href="mailto:netkiller@msn.com">Email</a><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Netkiller Python 手札</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="preface.html">下一页</a></td></tr></table><hr /></div><table xmlns=""><tr><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&repo=netkiller.github.io&type=watch&count=true&size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&repo=netkiller.github.io&type=fork&count=true&size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&type=follow&count=true&size=large" height="30" width="240" frameborder="0" scrolling="0" style="width:240px; height: 30px;" allowTransparency="true"></iframe></td></tr></table><div xml:lang="zh-cn" class="book" lang="zh-cn"><div class="titlepage"><div><div><h1 class="title"><a id="idp1"></a>Netkiller Python 手札</h1></div><div><h2 class="subtitle">Python Language...</h2></div><div><div class="author"><h3 class="author"><span class="honorific">Mr</span>. <span class="firstname">Neo</span> <span class="othername"></span> <span class="surname">Chan</span>, <span class="lineage">陈景峯(BG7NYT)</span></h3><div class="affiliation">
<div class="address"><p><br />
<span class="country">中国</span><span class="state">广东省</span><span class="city">深圳市</span><span class="street">龙华新区民治街道溪山美地</span><br />
<span class="postcode">518131</span><br />
<span class="phone">+86 13113668890</span><br />
<br />
<code class="email"><<a class="email" href="mailto:netkiller@msn.com">netkiller@msn.com</a>></code><br />
</p></div>
</div></div></div><div><p class="releaseinfo">$Id: book.xml 640 2013-07-18 03:27:47Z netkiller $</p></div><div><p class="copyright">版权 © 2008-2017 Netkiller(Neo Chan). All rights reserved.</p></div><div><div class="legalnotice"><a id="legalnotice"></a>
<p class="legalnotice-title"><strong>版权声明</strong></p>
<p>转载请与作者联系,转载时请务必标明文章原始出处和作者信息及本声明。</p>
<table border="0" summary="Simple list" class="simplelist"><tr><td>
<a class="ulink" href="http://creativecommons.org/licenses/by/3.0/" target="_top">
<div><table border="0" summary="manufactured viewport for HTML img" style="cellpadding: 0; cellspacing: 0;" width="180"><tr><td><img src="/images/by-nc-sa.png" width="180" /></td></tr></table></div>
</a>
</td><td>
<table border="0" summary="Simple list" class="simplelist"><tr><td>
文档出处:
</td></tr><tr><td>
<a class="ulink" href="http://netkiller.github.io/" target="_top">http://netkiller.github.io</a>
</td></tr><tr><td>
<a class="ulink" href="http://netkiller.sourceforge.net/" target="_top">http://netkiller.sourceforge.net</a>
</td></tr></table>
</td><td>
<a class="ulink" href="/images/weixin.jpg" target="_top"><div><table border="0" summary="manufactured viewport for HTML img" style="cellpadding: 0; cellspacing: 0;" width="80"><tr><td><img src="/images/weixin.jpg" width="80" /></td></tr></table></div></a>
</td><td>
<p>微信扫描二维码进入 Netkiller 微信订阅号 </p>
<p>QQ群:128659835 请注明“读者”</p>
</td></tr></table>
<p></p>
</div></div><div><p class="pubdate">$Date: 2013-07-18 11:27:47 +0800 (Thu, 18 Jul 2013) $</p></div><div><div class="abstract"><p class="title"><strong>我的系列文档</strong></p>
<p>编程语言</p>
<table border="0" summary="Simple list" class="simplelist"><tr><td>
<a class="ulink" href="../architect/index.html" target="_top">Netkiller Architect 手札</a>
</td><td>
<a class="ulink" href="../developer/index.html" target="_top">Netkiller Developer 手札</a>
</td><td>
<a class="ulink" href="../java/index.html" target="_top">Netkiller Java 手札</a>
</td><td>
<a class="ulink" href="../php/index.html" target="_top">Netkiller PHP 手札</a>
</td><td>
<a class="ulink" href="../python/index.html" target="_top">Netkiller Python 手札</a>
</td><td>
<a class="ulink" href="../testing/index.html" target="_top">Netkiller Testing 手札</a>
</td></tr><tr><td>
<a class="ulink" href="../cryptography/index.html" target="_top">Netkiller Cryptography 手札</a>
</td><td>
<a class="ulink" href="../perl/index.html" target="_top">Netkiller Perl 手札</a>
</td><td>
<a class="ulink" href="../docbook/index.html" target="_top">Netkiller Docbook 手札</a>
</td><td>
<a class="ulink" href="../project/index.html" target="_top">Netkiller Project 手札</a>
</td><td>
<a class="ulink" href="../management/index.html" target="_top">Netkiller Management 手札</a>
</td><td> </td></tr></table>
</div></div></div><hr /></div><div class="dedication"><div class="titlepage"><div><div><h1 class="title"><a id="dedication"></a></h1></div></div></div>
</div><div class="toc"><p><strong>目录</strong></p><dl class="toc"><dt><span class="preface"><a href="preface.html">1. 自述</a></span></dt><dd><dl><dt><span class="section"><a href="preface.html#preface.contents">1.1. 系列文档</a></span></dt><dt><span class="section"><a href="author.html">1.2. 作者简介</a></span></dt><dt><span class="section"><a href="reader.html">1.3. 写给读者</a></span></dt><dt><span class="section"><a href="preface.download.html">1.4. 文档下载</a></span></dt><dt><span class="section"><a href="pr01s05.html">1.5. 打赏(Donations)</a></span></dt><dd><dl><dt><span class="section"><a href="pr01s05.html#idp3">1.5.1. 微信(Wechat)</a></span></dt><dt><span class="section"><a href="pr01s05.html#idp4">1.5.2. 支付宝(Alipay)</a></span></dt><dt><span class="section"><a href="pr01s05.html#paypal">1.5.3. PayPal Donations</a></span></dt><dt><span class="section"><a href="pr01s05.html#bank">1.5.4. 银行(Bank)</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="python.install.html">1. install</a></span></dt><dd><dl><dt><span class="section"><a href="python.install.html#python2">1.1. Python2.x</a></span></dt><dd><dl><dt><span class="section"><a href="python.install.html#idp5">1.1.1. 编译安装</a></span></dt><dt><span class="section"><a href="python.install.html#idp6">1.1.2. Ubuntu 安装</a></span></dt></dl></dd><dt><span class="section"><a href="python3.html">1.2. Python3.x</a></span></dt><dd><dl><dt><span class="section"><a href="python3.html#idp7">1.2.1. 编译安装</a></span></dt><dt><span class="section"><a href="python3.html#idp8">1.2.2. Ubunut 13.04 环境安装python3</a></span></dt></dl></dd><dt><span class="section"><a href="pypy.html">1.3. pypy - fast alternative implementation of Python - PyPy interpreter</a></span></dt><dd><dl><dt><span class="section"><a href="pypy.html#idp9">1.3.1. Ubuntu 环境安装</a></span></dt><dt><span class="section"><a href="pypy.html#idp10">1.3.2. CentOS 环境安装</a></span></dt></dl></dd><dt><span class="section"><a href="eric.html">1.4. Eric Python IDE</a></span></dt></dl></dd><dt><span class="chapter"><a href="setup.html">2. Python 包管理</a></span></dt><dd><dl><dt><span class="section"><a href="setup.html#setup.py">2.1. setup.py</a></span></dt><dt><span class="section"><a href="distribute.html">2.2. distribute</a></span></dt><dt><span class="section"><a href="pip.html">2.3. pip - A tool for installing and managing Python packages</a></span></dt><dd><dl><dt><span class="section"><a href="pip.html#idp14">2.3.1. 安装 pip</a></span></dt><dd><dl><dt><span class="section"><a href="pip.html#idp11">2.3.1.1. 使用 easy_install 安装 pip</a></span></dt><dt><span class="section"><a href="pip.html#idp12">2.3.1.2. Ubuntu 安装 pip</a></span></dt><dt><span class="section"><a href="pip.html#idp13">2.3.1.3. Mac</a></span></dt></dl></dd><dt><span class="section"><a href="pip.html#idp15">2.3.2. pip 命令</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="stdio.html">3. Input/Output</a></span></dt><dd><dl><dt><span class="section"><a href="stdio.html#sys">3.1. Standard</a></span></dt><dd><dl><dt><span class="section"><a href="stdio.html#idp16">3.1.1. Standard Input</a></span></dt><dt><span class="section"><a href="stdio.html#idp17">3.1.2. Standard Output</a></span></dt></dl></dd><dt><span class="section"><a href="io.file.html">3.2. File</a></span></dt></dl></dd><dt><span class="chapter"><a href="type.html">4. 数据类型</a></span></dt><dd><dl><dt><span class="section"><a href="type.html#type">4.1. type 数据类型检测</a></span></dt><dt><span class="section"><a href="string.html">4.2. String</a></span></dt><dd><dl><dt><span class="section"><a href="string.html#str.fun">4.2.1. String function</a></span></dt><dd><dl><dt><span class="section"><a href="string.html#str.find">4.2.1.1. str.find()</a></span></dt><dt><span class="section"><a href="string.html#str.replace">4.2.1.2. str.find()</a></span></dt></dl></dd><dt><span class="section"><a href="string.html#idp18">4.2.2. Convert str to bytes in python</a></span></dt><dt><span class="section"><a href="string.html#idp19">4.2.3. String format</a></span></dt></dl></dd><dt><span class="section"><a href="ch04s03.html">4.3. Array</a></span></dt><dd><dl><dt><span class="section"><a href="ch04s03.html#idp20">4.3.1. split / join </a></span></dt></dl></dd><dt><span class="section"><a href="datetime.html">4.4. Datetime</a></span></dt><dd><dl><dt><span class="section"><a href="datetime.html#idp21">4.4.1. datetime</a></span></dt></dl></dd><dt><span class="section"><a href="bytes.html">4.5. bytes 类型</a></span></dt><dd><dl><dt><span class="section"><a href="bytes.html#idp22">4.5.1. BOM头</a></span></dt><dt><span class="section"><a href="bytes.html#idp23">4.5.2. replace</a></span></dt><dt><span class="section"><a href="bytes.html#idp24">4.5.3. pack/unpack</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="data.html">5. 数据结构</a></span></dt><dd><dl><dt><span class="section"><a href="data.html#data.list">5.1. List</a></span></dt><dt><span class="section"><a href="data.set.html">5.2. Set</a></span></dt></dl></dd><dt><span class="chapter"><a href="class.html">6. Class</a></span></dt><dd><dl><dt><span class="section"><a href="class.html#class.init">6.1. __init__</a></span></dt></dl></dd><dt><span class="chapter"><a href="pipe.html">7. Pipe</a></span></dt><dd><dl><dt><span class="section"><a href="pipe.html#stdin">7.1. stdin</a></span></dt><dt><span class="section"><a href="forkpty.html">7.2. forkpty</a></span></dt><dt><span class="section"><a href="popen.html">7.3. Popen</a></span></dt><dt><span class="section"><a href="socketpair.html">7.4. socketpair</a></span></dt></dl></dd><dt><span class="chapter"><a href="framework/index.html">8. Frameworks</a></span></dt><dd><dl><dt><span class="section"><a href="framework/index.html#idp25">8.1. REST web service framework</a></span></dt><dt><span class="section"><a href="framework/python.pylons.html">8.2. Pylons</a></span></dt><dd><dl><dt><span class="section"><a href="framework/python.pylons.html#idp28">8.2.1. Getting Started with Pylons</a></span></dt><dd><dl><dt><span class="section"><a href="framework/python.pylons.html#idp26">8.2.1.1. Installing</a></span></dt><dt><span class="section"><a href="framework/python.pylons.html#idp27">8.2.1.2. Debian/Ubuntu</a></span></dt></dl></dd><dt><span class="section"><a href="framework/python.pylons.html#idp29">8.2.2. config/routing.py</a></span></dt><dt><span class="section"><a href="framework/python.pylons.html#mako">8.2.3. mako template</a></span></dt><dd><dl><dt><span class="section"><a href="framework/python.pylons.html#idp30">8.2.3.1. include</a></span></dt><dt><span class="section"><a href="framework/python.pylons.html#idp31">8.2.3.2. inherit</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="framework/django.html">8.3. Django</a></span></dt><dt><span class="section"><a href="framework/pyramid.html">8.4. Pyramid</a></span></dt><dd><dl><dt><span class="section"><a href="framework/pyramid.html#idp33">8.4.1. Getting Started</a></span></dt><dd><dl><dt><span class="section"><a href="framework/pyramid.html#virtualenv">8.4.1.1. virtualenv - create virtual Python instances</a></span></dt><dt><span class="section"><a href="framework/pyramid.html#pyramid.helloworld">8.4.1.2. Hello world</a></span></dt><dt><span class="section"><a href="framework/pyramid.html#idp32">8.4.1.3. MongoDB</a></span></dt></dl></dd><dt><span class="section"><a href="framework/pyramid.html#idp35">8.4.2. Creating a Pyramid Project</a></span></dt><dd><dl><dt><span class="section"><a href="framework/pyramid.html#idp34">8.4.2.1. mongodb</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="framework/robotframework.html">8.5. Robot Framework</a></span></dt></dl></dd><dt><span class="chapter"><a href="library/index.html">10. Library</a></span></dt><dd><dl><dt><span class="section"><a href="library/index.html#idp36">10.1. 日期与时间</a></span></dt><dt><span class="section"><a href="library/threading.html">10.2. Python 多线程</a></span></dt><dd><dl><dt><span class="section"><a href="library/threading.html#idp37">10.2.1. threading 高级线程接口</a></span></dt><dt><span class="section"><a href="library/threading.html#idp38">10.2.2. Lock 线程锁</a></span></dt><dt><span class="section"><a href="library/threading.html#idp39">10.2.3. Queue 队列</a></span></dt></dl></dd><dt><span class="section"><a href="library/syslog.html">10.3. syslog</a></span></dt><dd><dl><dt><span class="section"><a href="library/syslog.html#syslog.udp">10.3.1. udp client</a></span></dt><dt><span class="section"><a href="library/syslog.html#idp40">10.3.2. udp server</a></span></dt></dl></dd><dt><span class="section"><a href="library/ch10s04.html">10.4. Socket</a></span></dt><dd><dl><dt><span class="section"><a href="library/ch10s04.html#idp43">10.4.1. UDP</a></span></dt><dd><dl><dt><span class="section"><a href="library/ch10s04.html#idp41">10.4.1.1. UDP Server</a></span></dt><dt><span class="section"><a href="library/ch10s04.html#idp42">10.4.1.2. UDP Clinet</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="library/daemon.html">10.5. Daemon</a></span></dt><dt><span class="section"><a href="library/python-memcached.html">10.6. python-memcached</a></span></dt><dt><span class="section"><a href="library/pyro.html">10.7. Pyro - Pyro is short for PYthon Remote Objects</a></span></dt><dt><span class="section"><a href="library/python-imaging.html">10.8. Python Imaging Library</a></span></dt><dt><span class="section"><a href="library/getopt.html">10.9. getopt – Command line option parsing</a></span></dt><dt><span class="section"><a href="library/syslog.html">10.10. syslog</a></span></dt><dd><dl><dt><span class="section"><a href="library/syslog.html#syslog.udp">10.10.1. udp client</a></span></dt><dt><span class="section"><a href="library/syslog.html#idp44">10.10.2. udp server</a></span></dt></dl></dd><dt><span class="section"><a href="library/python-subversion.html">10.11. python-subversion</a></span></dt><dt><span class="section"><a href="library/simplehttpserver.html">10.12. SimpleHTTPServer</a></span></dt><dt><span class="section"><a href="library/fuse-python.html">10.13. fuse-python.x86_64 : Python bindings for FUSE - filesystem in userspace</a></span></dt><dt><span class="section"><a href="library/python.network.html">10.14. Network</a></span></dt><dd><dl><dt><span class="section"><a href="library/python.network.html#gevent">10.14.1. gevent - A coroutine-based network library for Python</a></span></dt></dl></dd><dt><span class="section"><a href="library/tui.html">10.15. TUI</a></span></dt><dd><dl><dt><span class="section"><a href="library/tui.html#console">10.15.1. Console</a></span></dt><dt><span class="section"><a href="library/tui.html#idp45">10.15.2. urwid</a></span></dt><dt><span class="section"><a href="library/tui.html#idp46">10.15.3. pycdk</a></span></dt><dt><span class="section"><a href="library/tui.html#idp47">10.15.4. python-newt - A NEWT module for Python</a></span></dt></dl></dd><dt><span class="section"><a href="library/python-spdylay.html">10.16. Python-spdylay - Spdylay Python Extension Module</a></span></dt><dt><span class="section"><a href="library/mechanize.html">10.17. mechanize</a></span></dt><dt><span class="section"><a href="library/zope.testbrowser.html">10.18. zope.testbrowser</a></span></dt></dl></dd><dt><span class="chapter"><a href="scrapy/index.html">11. Scrapy - Python web scraping and crawling framework</a></span></dt><dd><dl><dt><span class="section"><a href="scrapy/index.html#setup">11.1. 安装 scrapy 开发环境</a></span></dt><dd><dl><dt><span class="section"><a href="scrapy/index.html#idp48">11.1.1. Mac</a></span></dt><dt><span class="section"><a href="scrapy/index.html#idp49">11.1.2. Ubuntu</a></span></dt><dt><span class="section"><a href="scrapy/index.html#idp50">11.1.3. 使用 pip 安装 scrapy</a></span></dt><dt><span class="section"><a href="scrapy/index.html#idp51">11.1.4. 测试 scrapy</a></span></dt></dl></dd><dt><span class="section"><a href="scrapy/scrapy.html">11.2. scrapy 命令</a></span></dt><dd><dl><dt><span class="section"><a href="scrapy/scrapy.html#scrapy.startproject">11.2.1. </a></span></dt><dt><span class="section"><a href="scrapy/scrapy.html#scrapy.genspider">11.2.2. 新建 spider</a></span></dt><dt><span class="section"><a href="scrapy/scrapy.html#scrapy.list">11.2.3. 列出可用的 spiders</a></span></dt><dt><span class="section"><a href="scrapy/scrapy.html#scrapy.crawl">11.2.4. 运行 spider</a></span></dt></dl></dd><dt><span class="section"><a href="scrapy/shell.html">11.3. Scrapy Shell</a></span></dt><dd><dl><dt><span class="section"><a href="scrapy/shell.html#response">11.3.1. response</a></span></dt><dd><dl><dt><span class="section"><a href="scrapy/shell.html#response.url">11.3.1.1. 当前URL地址</a></span></dt><dt><span class="section"><a href="scrapy/shell.html#status">11.3.1.2. status HTTP 状态</a></span></dt><dt><span class="section"><a href="scrapy/shell.html#text">11.3.1.3. text 正文</a></span></dt><dt><span class="section"><a href="scrapy/shell.html#response.css">11.3.1.4. css</a></span></dt><dd><dl><dt><span class="section"><a href="scrapy/shell.html#idp52">11.3.1.4.1. 获取 html 属性</a></span></dt></dl></dd><dt><span class="section"><a href="scrapy/shell.html#response.xpath">11.3.1.5. xpath</a></span></dt><dt><span class="section"><a href="scrapy/shell.html#headers">11.3.1.6. headers</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="scrapy/tutorial.html">11.4. 爬虫项目</a></span></dt><dd><dl><dt><span class="section"><a href="scrapy/tutorial.html#startproject">11.4.1. 创建项目</a></span></dt><dt><span class="section"><a href="scrapy/tutorial.html#spider">11.4.2. Spider</a></span></dt><dd><dl><dt><span class="section"><a href="scrapy/tutorial.html#response.follow">11.4.2.1. 翻页操作</a></span></dt><dt><span class="section"><a href="scrapy/tutorial.html#response.body">11.4.2.2. 采集内容保存到文件</a></span></dt></dl></dd><dt><span class="section"><a href="scrapy/tutorial.html#settings">11.4.3. settings.py 爬虫配置文件</a></span></dt><dd><dl><dt><span class="section"><a href="scrapy/tutorial.html#idp53">11.4.3.1. 忽略 robots.txt 规则</a></span></dt></dl></dd><dt><span class="section"><a href="scrapy/tutorial.html#items">11.4.4. Item</a></span></dt><dt><span class="section"><a href="scrapy/tutorial.html#pipeline">11.4.5. Pipeline</a></span></dt></dl></dd><dt><span class="section"><a href="scrapy/images.html">11.5. 下载图片</a></span></dt><dd><dl><dt><span class="section"><a href="scrapy/images.html#idp54">11.5.1. 配置 settings.py</a></span></dt><dt><span class="section"><a href="scrapy/images.html#idp55">11.5.2. 修改 pipelines.py 文件</a></span></dt><dt><span class="section"><a href="scrapy/images.html#idp56">11.5.3. 编辑 items.py</a></span></dt><dt><span class="section"><a href="scrapy/images.html#idp57">11.5.4. Spider 爬虫文件</a></span></dt></dl></dd><dt><span class="section"><a href="scrapy/xpath.html">11.6. xpath</a></span></dt><dd><dl><dt><span class="section"><a href="scrapy/xpath.html#idp60">11.6.1. 逻辑运算符</a></span></dt><dd><dl><dt><span class="section"><a href="scrapy/xpath.html#idp58">11.6.1.1. and</a></span></dt><dt><span class="section"><a href="scrapy/xpath.html#idp59">11.6.1.2. or</a></span></dt></dl></dd><dt><span class="section"><a href="scrapy/xpath.html#fun">11.6.2. function</a></span></dt><dd><dl><dt><span class="section"><a href="scrapy/xpath.html#text()">11.6.2.1. text()</a></span></dt><dt><span class="section"><a href="scrapy/xpath.html#contains()">11.6.2.2. contains()</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="chapter"><a href="3rdparty/index.html">12. 3rdparty toolkit</a></span></dt><dd><dl><dt><span class="section"><a href="3rdparty/index.html#ZeroRPC">12.1. ZeroRPC</a></span></dt></dl></dd><dt><span class="chapter"><a href="exe.html">13. python to exe</a></span></dt><dd><dl><dt><span class="section"><a href="exe.html#pyinstaller">13.1. pyinstaller</a></span></dt><dd><dl><dt><span class="section"><a href="exe.html#idp61">13.1.1. Linux</a></span></dt></dl></dd><dt><span class="section"><a href="py2exe.html">13.2. py2exe</a></span></dt></dl></dd><dt><span class="chapter"><a href="faq.html">14. FAQ</a></span></dt><dd><dl><dt><span class="section"><a href="faq.html#faq.zlib">14.1. ImportError: No module named 'zlib'</a></span></dt><dt><span class="section"><a href="UnicodeDecodeError.html">14.2. UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb2 in position 679: invalid start byte</a></span></dt></dl></dd></dl></div><div class="list-of-examples"><p><strong>范例清单</strong></p><dl><dt>8.1. <a href="framework/pyramid.html#idp62">__init__.py</a></dt><dt>10.1. <a href="library/python-memcached.html#idp63">memcached.py</a></dt><dt>10.2. <a href="library/simplehttpserver.html#idp64">SimpleHTTPServer</a></dt></dl></div>
</div><div xmlns="" id="disqus_thread"></div><script xmlns="">
var disqus_config = function () {
this.page.url = "http://www.netkiller.cn"; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = 'netkiller'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = '//netkiller.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script><noscript xmlns="">Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><br xmlns="" /><script xmlns="" type="text/javascript" id="clustrmaps" src="//cdn.clustrmaps.com/map_v2.js?u=r5HG&d=9mi5r_kkDC8uxG8HuY3p4-2qgeeVypAK9vMD-2P6BYM"></script><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="preface.html">下一页</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> 自述</td></tr></table></div><script xmlns="">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-11694057-1', 'auto');
ga('send', 'pageview');
</script><script xmlns="" async="async">
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?93967759a51cda79e49bf4e34d0b0f2c";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script><script xmlns="" async="async">
(function(){
var bp = document.createElement('script');
var curProtocol = window.location.protocol.split(':')[0];
if (curProtocol === 'https') {
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
}
else {
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
}
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(bp, s);
})();
</script><script xmlns="" type="text/javascript" src="/js/q.js" async="async"></script></body></html>