文件名称:ragstoriches:轻松开发并发性高的刮板机
文件大小:13KB
文件格式:ZIP
更新时间:2024-06-01 15:27:35
Python
来自ragstoriches ragstoriches是一个组合的库/框架,可简化使用gevent和请求编写Web爬虫的过程。 一个简单的例子来讲述这个故事: import re from lxml . html import document_fromstring from ragstoriches . scraper import Scraper scraper = Scraper ( __name__ ) @ scraper def index ( requests , url = 'http://eastidaho.craigslist.org/search/act?query=+' ): html = document_fromstring ( requests . get ( url ). content ) for ad_link in html . c
【文件预览】:
ragstoriches-master
----setup.py(825B)
----ragstoriches()
--------errors.py(296B)
--------__init__.py(388B)
--------limits.py(1KB)
--------scraper.py(8KB)
--------injection.py(934B)
--------apps.py(4KB)
--------util.py(804B)
--------coloringbook.py(2KB)
--------receiver.py(926B)
----craigs2.py(963B)
----printer.py(187B)
----README.rst(6KB)
----tests()
--------test_injection.py(2KB)
----craigs.py(1004B)