{"id":15683359,"url":"https://github.com/pjsier/scrapy-wayback-middleware","last_synced_at":"2025-05-07T10:23:28.015Z","repository":{"id":44540105,"uuid":"172538392","full_name":"pjsier/scrapy-wayback-middleware","owner":"pjsier","description":"Scrapy middleware for submitting URLs to the Internet Archive Wayback Machine","archived":false,"fork":false,"pushed_at":"2022-08-01T07:35:47.000Z","size":24,"stargazers_count":10,"open_issues_count":2,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-02T08:51:43.339Z","etag":null,"topics":["archiving","hacktoberfest","python","scrapy","wayback-machine"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/scrapy-wayback-middleware/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pjsier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-25T16:05:54.000Z","updated_at":"2023-10-23T16:35:37.000Z","dependencies_parsed_at":"2022-08-31T03:11:30.604Z","dependency_job_id":null,"html_url":"https://github.com/pjsier/scrapy-wayback-middleware","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjsier%2Fscrapy-wayback-middleware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjsier%2Fscrapy-wayback-middleware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjsier%2Fscrapy-wayback-middleware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjsier%2Fscrapy-wayback-middleware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pjsier","download_url":"https://codeload.github.com/pjsier/scrapy-wayback-middleware/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223806487,"owners_count":17205982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["archiving","hacktoberfest","python","scrapy","wayback-machine"],"created_at":"2024-10-03T17:04:37.052Z","updated_at":"2024-11-09T09:05:33.693Z","avatar_url":"https://github.com/pjsier.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scrapy Wayback Middleware\n\n[![Build status](https://github.com/pjsier/scrapy-wayback-middleware/workflows/CI/badge.svg)](https://github.com/pjsier/scrapy-wayback-middleware/actions)\n\nMiddleware for submitting all scraped response URLs to the [Internet Archive Wayback Machine](https://archive.org/web/) for archival.\n\n## Installation\n\n```bash\npip install scrapy-wayback-middleware\n```\n\n## Setup\n\nAdd `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`](https://archive.readme.io/docs/creating-a-snapshot) instead.\n\n## Configuration\n\nTo 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.\n\n### Duplicate Filtering\n\nIn order to avoid sending duplicate requests with `WAYBACK_MIDDLEWARE_POST` set to `False`, you'll need to either include `web.archive.org` in your spider's `allowed_domains` property (if specified) or disable `scrapy.spidermiddlewares.offsite.OffsiteMiddleware` in your settings.\n\n### Rate Limits\n\nWhile neither endpoint returns headers indicating specific rate limits, the `GET` endpoint at `web.archive.org/save` has a rate limit of 25 requests/minute, resetting each minute. The middleware is configured to wait for 60 seconds whenever it sees a 429 error code to handle this.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpjsier%2Fscrapy-wayback-middleware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpjsier%2Fscrapy-wayback-middleware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpjsier%2Fscrapy-wayback-middleware/lists"}