{ "info": { "author": "dmkitui", "author_email": "dmkitui@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "ArachneServer\n==============\n[![Build Status](https://travis-ci.org/dmkitui/arachneserver.svg?branch=master)](https://travis-ci.org/dmkitui/arachneserver)\n[![Coverage Status](https://coveralls.io/repos/github/dmkitui/arachneserver/badge.svg?branch=master)](https://coveralls.io/github/dmkitui/arachneserver?branch=master)\n[![Maintainability](https://api.codeclimate.com/v1/badges/637b135299638812096d/maintainability)](https://codeclimate.com/github/dmkitui/arachneserver/maintainability)\n\nArachneServer provides a wrapper around your scrapy ``Spider`` object to run them through a flask app. All you have to do is customize ``SPIDER_SETTINGS`` in the settings file.\n\n\nInstallation\n============\nYou can install **ArachneServer** from pip\n\n\tpip install ArachneServer\n\n\nSample settings\n===============\nThis is sample settings file for spiders in your project. The settings file should be called **settings.py** in the root of your project for **ArachneServer** to find it and looks like this::\n\n\t# settings.py file\n\tSPIDER_SETTINGS = [\n\t\t{\n\t\t\t'endpoint': 'dmoz',\n\t\t\t'location': 'spiders.DmozSpider',\n\t\t\t'endpoints_location: 'spiders.DmozSpider_endpoints'\n\t\t\t'spider': 'DmozSpider' \n\t\t}\n\t]\n\nUsage\n=====\nIt looks very similar to a flask app but since **Scrapy** depends on the python **twisted** package, we need to run our flask app with **twisted**::\n\n\tfrom twisted.web.wsgi import WSGIResource\n\tfrom twisted.web.server import Site\n\tfrom twisted.internet import reactor\n\tfrom arachneserver import ArachneServer\n\n\tapp = ArachneServer(__name__)\n\n\tresource = WSGIResource(reactor, reactor.getThreadPool(), app)\n\tsite = Site(resource)\n\treactor.listenTCP(8080, site)\n\n\tif __name__ == '__main__':\n\t\treactor.run()\n\nEndpoints\n=========\n\nTwo default endpoints are provided for every spider:\n 1. **'/'** - List all spiders.\n 2. **'/run-spider/'** - To run the specified spider.\n\nSpecify additional endpoints for each spider and update the respective SPIDER_SETTINGS dictionary's `endpoints_location` to point to the correct path to the endpoints file.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dmkitui/arachneserver", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "ArachneServer", "package_url": "https://pypi.org/project/ArachneServer/", "platform": "", "project_url": "https://pypi.org/project/ArachneServer/", "project_urls": { "Homepage": "https://github.com/dmkitui/arachneserver" }, "release_url": "https://pypi.org/project/ArachneServer/1.0.2/", "requires_dist": null, "requires_python": "", "summary": "API for Scrapy spiders", "version": "1.0.2" }, "last_serial": 5654032, "releases": { "1.0.2": [ { "comment_text": "", "digests": { "md5": "7360aa33cf7285fb8c13187af7e1e6e0", "sha256": "a145beb9c417f350c38919d75a2caeb0a07a1c9579b5e87661d1b82f60400fdf" }, "downloads": -1, "filename": "ArachneServer-1.0.2.tar.gz", "has_sig": false, "md5_digest": "7360aa33cf7285fb8c13187af7e1e6e0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8274, "upload_time": "2019-08-09T07:32:12", "url": "https://files.pythonhosted.org/packages/75/b6/650e4e5fd4c3727a5ac9914ec0c2869ac760462fcc12aa679bda3a85c0f5/ArachneServer-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7360aa33cf7285fb8c13187af7e1e6e0", "sha256": "a145beb9c417f350c38919d75a2caeb0a07a1c9579b5e87661d1b82f60400fdf" }, "downloads": -1, "filename": "ArachneServer-1.0.2.tar.gz", "has_sig": false, "md5_digest": "7360aa33cf7285fb8c13187af7e1e6e0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8274, "upload_time": "2019-08-09T07:32:12", "url": "https://files.pythonhosted.org/packages/75/b6/650e4e5fd4c3727a5ac9914ec0c2869ac760462fcc12aa679bda3a85c0f5/ArachneServer-1.0.2.tar.gz" } ] }