对 Scrapyd API的Python包装:python-scrapyd-api
api地址:https://github.com/djm/python-scrapyd-api
对 Scrapyd API的Python包装:python-scrapyd-api
来源:open开发经验库2014-11-01
一个Python封装用于与Scrapyd API交互。
能够让 Python 应用访问和控制 Scrapy 后台程序: Scrapyd.
- Supports Python 2.6, 2.7, 3.3 & 3.4
- Free software: BSD license
- Full documentation
- On the Python Package Index (PyPI)
- Scrapyd's API Documentation
>>> from scrapyd_api import ScrapydAPI
>>> scrapyd = ScrapydAPI('http://localhost:6800')
Add a project egg as a new version:
>>> egg = open('some_egg.egg')
>>> scrapyd.add_version('project_name', 'version_name', egg)
# Returns the number of spiders in the project.
3
>>> egg.close()

浙公网安备 33010602011771号