#archive #url #client #wayback #machine #internet #user

waybackmachine-client

Client to archive URLs in the Internet Archive's Wayback Machine

10 unstable releases (3 breaking)

new 0.5.0 Mar 7, 2025
0.4.6 Mar 7, 2025
0.4.5 Nov 25, 2024
0.4.2 Aug 8, 2024
0.2.0 Mar 27, 2024

#513 in Compression

Download history 169/week @ 2024-11-19 118/week @ 2024-11-26 32/week @ 2024-12-03 26/week @ 2024-12-10 7/week @ 2024-12-17 9/week @ 2025-02-04 1/week @ 2025-02-11 1/week @ 2025-02-18 239/week @ 2025-03-04

243 downloads per month
Used in archive-pdf-urls

Apache-2.0

25KB
493 lines

Wayback Machine Client

This Rust crate provides a client for interacting with the Wayback Machine, allowing users to archive URLs.

Build status Crates.io

Installation

cargo add waybackmachine-client

Usage

The WaybackMachineClient struct provides methods for archiving URLs using the Wayback Machine service. You can use the archive_url method to archive a URL asynchronously.

Example:

use waybackmachine_client::{ClientConfig, Error, WaybackMachineClient};

#[tokio::main]
async fn main() -> Result<(), Error> {
    let wayback_client = WaybackMachineClient::new(ClientConfig::default());
    wayback_client.archive_url("https://www.example.com").await?;
    Ok(())
}

Features

  • Automatic Retry: The client automatically retries failed requests with exponential backoff, configurable via the ClientConfig.max_request_retries setting.
  • Recent Archive Check: The client checks if a URL has been archived within a specified threshold using the ClientConfig.archive_threshold_days setting.
  • Customisable Configuration: You can customise the client's behavior using the ClientConfig struct.
  • Asynchronous: Requests are sent asynchronously using the Tokio runtime

Dependencies

~6–18MB
~240K SLoC