对 Scrapyd API的Python包装:python-scrapyd-api
jopen
10年前
一个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()