Skip to main content

Unofficial CLI for the Wayback Machine's Save Page Now API.

Project description

Simple command-line interface for the Wayback Machine's Save Page Now (SPN) API.

Installation

pip install spn

API Keys

Get your API keys here and put them in ~/.config/spn/config.yaml:

---
access_key: YOUR_ACCESS_KEY
secret_key: YOUR_SECRET_KEY

Or use environment variables:

export SPN_ACCESS_KEY=YOUR_ACCESS_KEY
export SPN_SECRET_KEY=YOUR_SECRET_KEY

Or use command parameters:

spn --access-key=YOUR_ACCESS_KEY --secret-key=YOUR_SECRET_KEY

Examples

# save a single url to the wayback machine
spn https://www.theguardian.com/politics/2023/may/28/more-than-half-of-voters-now-want-britain-to-forge-closer-ties-with-the-eu-poll-reveals

# save urls from a file
spn -i urls

# save urls from a pipe and only save urls not already saved in the last 3 days
some-command-that-outputs-urls | spn -i - --if-not-archived-within=3d

Official API Documentation

https://docs.google.com/document/d/1Nsv52MvSjbLb2PCpHlat0gkzw0EvtSgpKHu4mk0MnrA/edit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spn-0.2.1.tar.gz (5.0 kB view hashes)

Uploaded Source

Built Distribution

spn-0.2.1-py2.py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page