Skip to main content

Arachne

https://travis-ci.org/kirankoduru/arachne.svg https://coveralls.io/repos/kirankoduru/arachne/badge.svg?branch=master&service=github

Arachne 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.

Installation

You can install Arachne from pip

pip install Arachne

Sample settings

This is sample settings file for spiders in your project. The settings file should be called settings.py for Arachne to find it and looks like this:

# settings.py file
SPIDER_SETTINGS = [
        {
                'endpoint': 'dmoz',
                'location': 'spiders.DmozSpider',
                'spider': 'DmozSpider'
        }
]

Usage

It 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:

from twisted.web.wsgi import WSGIResource
from twisted.web.server import Site
from twisted.internet import reactor
from arachne import Arachne

app = Arachne(__name__)

resource = WSGIResource(reactor, reactor.getThreadPool(), app)
site = Site(resource)
reactor.listenTCP(8080, site)

if __name__ == '__main__':
        reactor.run()

Release files for Arachne 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Arachne 0.5.0
File Size Uploaded
Arachne-0.5.0.tar.gz 9.0 kB Details

Release files / Arachne-0.5.0.tar.gz

Download URL Arachne-0.5.0.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bbbd23873d410c9f57b75acb14b4c58fa5ae1b18a98342dd6b52c1a0ee0c8825
BLAKE2b-256 checksum
How to use checksums
178132175cf9d8d24744389fbaa9c48e754693392b1a453c5f62057449348fbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.5.0 This release

1 release file

0.4.0

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page