Scrapy middleware for submitting URLs to the Internet Archive Wayback Machine
Project description
Scrapy Wayback Middleware
Middleware for submitting all scraped response URLs to the Internet Archive Wayback Machine for archival.
Installation
pip install scrapy-wayback-middleware
Setup
Add scrapy_wayback_middleware.WaybackMiddleware
to your project's SPIDER_MIDDLEWARES
settings. By default, the middleware will make GET requests to web.archive.org/save/{URL}
, but if the WAYBACK_MIDDLEWARE_POST
setting is True
then it will make POST requests to pragma.archivelab.org
instead.
Configuration
To configure custom behavior for certain methods, subclass WaybackMiddleware
and override the get_item_urls
method to pull additional links to archive from individual items or handle_wayback
to change how responses from the Wayback Machine are handled. The WAYBACK_MIDDLEWARE_POST
can be set to True
to adjust request behavior.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for scrapy-wayback-middleware-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24c57b8b80559b13057bfa18f90752184903b02b960eb6010ff89cbc92657743 |
|
MD5 | b6e8341a0d6c9ce812b22b2eb2e503f3 |
|
BLAKE2b-256 | eaa392beea58d36d4ea65c389ab894c4652d13e8783f5a3d22b211554615239c |
Hashes for scrapy_wayback_middleware-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3db78db804f1c26729ad96c368c3c87535b1aa1f3019012b23c0d5e0d83cc61 |
|
MD5 | ace89a631b07cbbd4de0b4e9ac565cf9 |
|
BLAKE2b-256 | 5947821243abf87f5a77eadaf5a8379a6992e75a1362768e8b007e583edbb9ca |