-
parse_torrent(self, response): x = HtmlXPathSelector(response) torrent = TorrentItem() torrent['url'] = response.url torrent['name'] = x.select("//h1/text()").extract() torrent['description'] = x.select("//div[@id='description']").extract() torrent['size'] = x.select("//div[@id='info-left']/p[2]/text() [2]").extract() return torrent For brevity documentation » Installation guide This document describes how to install Scrapy in Linux, Windows and Mac OS X systems and it consists on the following 3 steps: Step 1. Install Python Step 2. Install required libraries
0 码力 |
204 页 |
447.68 KB
| 1 年前 3
-
parse_torrent(self, response): x = HtmlXPathSelector(response) torrent = TorrentItem() torrent['url'] = response.url torrent['name'] = x.select("//h1/text()").extract() torrent['description'] = x.select("//div[@id='description']") tion']").extract() 6 Chapter 2. First steps Scrapy Documentation, Release 0.9 torrent['size'] = x.select("//div[@id='info-left']/p[2]/text()[2]").extract() return torrent For brevity sake, we intentionally 2.2 Installation guide This document describes how to install Scrapy in Linux, Windows and Mac OS X systems and it consists on the following 3 steps: • Step 1. Install Python 2.2. Installation guide
0 码力 |
156 页 |
764.56 KB
| 1 年前 3
-
parse_torrent(self, response): x = HtmlXPathSelector(response) torrent = TorrentItem() torrent['url'] = response.url torrent['name'] = x.select("//h1/text()").extract() torrent['description'] = x.select("//div[@id='description']").extract() torrent['size'] = x.select("//div[@id='info-left']/p[2]/text() [2]").extract() return torrent For brevity’s document describes how to install Scrapy on Linux, Windows and Mac OS X. Requirements Python [http://www.python.org] 2.5, 2.6, 2.7 (3.x is not yet supported) Twisted [http://twistedmatrix.com] 2.5.0, 8.0
0 码力 |
235 页 |
490.23 KB
| 1 年前 3
-
parse_torrent(self, response): x = HtmlXPathSelector(response) torrent = TorrentItem() torrent['url'] = response.url torrent['name'] = x.select("//h1/text()").extract() torrent['description'] = x.select("//div[@id='description']") select("//div[@id='description']").extract() torrent['size'] = x.select("//div[@id='info-left']/p[2]/text()[2]").extract() return torrent For brevity’s sake, we intentionally left out the import statements. The Torrent This document describes how to install Scrapy on Linux, Windows and Mac OS X. 2.2.1 Requirements • Python 2.5, 2.6, 2.7 (3.x is not yet supported) • Twisted 2.5.0, 8.0 or above (Windows users: you’ll
0 码力 |
179 页 |
861.70 KB
| 1 年前 3
-
parse_torrent(self, response): x = HtmlXPathSelector(response) torrent = TorrentItem() torrent['url'] = response.url torrent['name'] = x.select("//h1/text()").extract() torrent['description'] = x.select("//div[@id='description']").extract() torrent['size'] = x.select("//div[@id='info-left']/p[2]/text() [2]").extract() return torrent For brevity’s document describes how to install Scrapy on Linux, Windows and Mac OS X. Requirements Python [http://www.python.org] 2.5, 2.6, 2.7 (3.x is not yet supported) Twisted [http://twistedmatrix.com] 2.5.0, 8.0
0 码力 |
228 页 |
462.54 KB
| 1 年前 3
-
parse_torrent(self, response): x = HtmlXPathSelector(response) torrent = TorrentItem() torrent['url'] = response.url torrent['name'] = x.select("//h1/text()").extract() torrent['description'] = x.select("//div[@id='description']") select("//div[@id='description']").extract() torrent['size'] = x.select("//div[@id='info-left']/p[2]/text()[2]").extract() return torrent For brevity’s sake, we intentionally left out the import statements. The Torrent This document describes how to install Scrapy on Linux, Windows and Mac OS X. 2.2.1 Requirements • Python 2.5, 2.6, 2.7 (3.x is not yet supported) • Twisted 2.5.0, 8.0 or above (Windows users: you’ll
0 码力 |
177 页 |
806.90 KB
| 1 年前 3
-
parse_torrent(self, response):
x = HtmlXPathSelector(response) torrent = TorrentItem() torrent['url'] = response.url torrent['name'] =
x.select("//h1/text()").extract() torrent['description'] =
x.select("//div[@id='description']") select("//div[@id='description']").extract() torrent['size'] =
x.select("//div[@id='info-left']/p[2]/text()[2]").extract() return torrent For brevity’s sake, we intentionally left out the import statements. The Torrent http://www.dmoz.org/Computers/Programming/Languages/Python/Books/> [s] spider
x1b6c2d0> [s] xxs 0 码力 |
203 页 |
931.99 KB
| 1 年前 3
-
parse_torrent(self, response):
x = HtmlXPathSelector(response) torrent = TorrentItem() torrent['url'] = response.url torrent['name'] =
x.select("//h1/text()").extract() torrent['description'] =
x.select("//div[@id='description']").extract() torrent['size'] =
x.select("//div[@id='info-left']/p[2]/text() [2]").extract() return torrent For brevity’s dmoz.org/Computers/Programming/Languages/Python/Books/> [s] spider
x1b6c2d0> [s] xxs 0 码力 |
272 页 |
522.10 KB
| 1 年前 3
-
parse_torrent(self, response):
x = HtmlXPathSelector(response) torrent = TorrentItem() torrent['url'] = response.url torrent['name'] =
x.select("//h1/text()").extract() torrent['description'] =
x.select("//div[@id='description']") select("//div[@id='description']").extract() torrent['size'] =
x.select("//div[@id='info-left']/p[2]/text()[2]").extract() return torrent For brevity’s sake, we intentionally left out the import statements. The Torrent http://www.dmoz.org/Computers/Programming/Languages/Python/Books/> [s] spider
x1b6c2d0> [s] xxs 0 码力 |
201 页 |
929.55 KB
| 1 年前 3
-
install the package from the conda-forge channel, which has up-to-date packages for Linux, Windows and OS X. To install Scrapy using conda, run: 2.2. Installation guide 7 Scrapy Documentation, Release 1.8 install virtualenv Check this user guide on how to create your virtualenv. Note: If you use Linux or OS X, virtualenvwrapper is a handy tool to create virtualenvs. Once you have created a virtualenv, you can guide 9 Scrapy Documentation, Release 1.8.4 Mac OS X Building Scrapy’s dependencies requires the presence of a C compiler and development headers. On OS X this is typically provided by Apple’s Xcode development
0 码力 |
335 页 |
1.44 MB
| 1 年前 3