GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Blog
  • Docs
  • Log in
  • Register
  • Getting help
  • Installing packages
  • Uploading packages
  • Packaging user guide
  • Infrastructure dashboard
  • Statistics
  • Logos & trademarks
  • Our sponsors
  • Bugs and feedback
  • Contribute on GitHub

This view

  • Original page
  • New address

GeezerVison is showing pypi.org — waybackpy

waybackpy 3.0.6

Python package that interfaces with the Internet Archive's Wayback Machine APIs. Archive pages and retrieve archived pages easily.

pip install waybackpy


A Python package & CLI tool that interfaces with the Wayback Machine API

Unit Tests codecov pypi Downloads Codacy Badge GitHub lastest commit PyPI - Python Version Code style: black


Introduction

Waybackpy is a Python package and a CLI tool that interfaces with the Wayback Machine APIs.

Wayback Machine has 3 client side APIs.

  • SavePageNow or Save API
  • CDX Server API
  • Availability API

These three APIs can be accessed via the waybackpy either by importing it from a python file/module or from the command-line interface.

Installation

Using pip, from PyPI (recommended):

pip install waybackpy

Using conda, from conda-forge (recommended):

See also waybackpy feedstock, maintainers are @rafaelrdealmeida, @labriunesp and @akamhy.

conda install -c conda-forge waybackpy

Install directly from this git repository (NOT recommended):

pip install git+https://github.com/akamhy/waybackpy.git

Docker Image

Docker Hub: hub.docker.com/r/secsi/waybackpy

Docker image is automatically updated on every release by Regulary and Automatically Updated Docker Images (RAUDI).

RAUDI is a tool by SecSI, an Italian cybersecurity startup.

Usage

As a Python package

Save API aka SavePageNow

>>> from waybackpy import WaybackMachineSaveAPI
>>> url = "https://github.com"
>>> user_agent = "Mozilla/5.0 (Windows NT 5.1; rv:40.0) Gecko/20100101 Firefox/40.0"
>>>
>>> save_api = WaybackMachineSaveAPI(url, user_agent)
>>> save_api.save()
https://web.archive.org/web/20220118125249/https://github.com/
>>> save_api.cached_save
False
>>> save_api.timestamp()
datetime.datetime(2022, 1, 18, 12, 52, 49)

CDX API aka CDXServerAPI

>>> from waybackpy import WaybackMachineCDXServerAPI
>>> url = "https://google.com"
>>> user_agent = "my new app's user agent"
>>> cdx_api = WaybackMachineCDXServerAPI(url, user_agent)
oldest
>>> cdx_api.oldest()
com,google)/ 19981111184551 http://google.com:80/ text/html 200 HOQ2TGPYAEQJPNUA6M4SMZ3NGQRBXDZ3 381
>>> oldest = cdx_api.oldest()
>>> oldest
com,google)/ 19981111184551 http://google.com:80/ text/html 200 HOQ2TGPYAEQJPNUA6M4SMZ3NGQRBXDZ3 381
>>> oldest.archive_url
'https://web.archive.org/web/19981111184551/http://google.com:80/'
>>> oldest.original
'http://google.com:80/'
>>> oldest.urlkey
'com,google)/'
>>> oldest.timestamp
'19981111184551'
>>> oldest.datetime_timestamp
datetime.datetime(1998, 11, 11, 18, 45, 51)
>>> oldest.statuscode
'200'
>>> oldest.mimetype
'text/html'
newest
>>> newest = cdx_api.newest()
>>> newest
com,google)/ 20220217234427 http://@google.com/ text/html 301 Y6PVK4XWOI3BXQEXM5WLLWU5JKUVNSFZ 563
>>> newest.archive_url
'https://web.archive.org/web/20220217234427/http://@google.com/'
>>> newest.timestamp
'20220217234427'
near
>>> near = cdx_api.near(year=2010, month=10, day=10, hour=10, minute=10)
>>> near.archive_url
'https://web.archive.org/web/20101010101435/http://google.com/'
>>> near
com,google)/ 20101010101435 http://google.com/ text/html 301 Y6PVK4XWOI3BXQEXM5WLLWU5JKUVNSFZ 391
>>> near.timestamp
'20101010101435'
>>> near.timestamp
'20101010101435'
>>> near = cdx_api.near(wayback_machine_timestamp=2008080808)
>>> near.archive_url
'https://web.archive.org/web/20080808051143/http://google.com/'
>>> near = cdx_api.near(unix_timestamp=1286705410)
>>> near
com,google)/ 20101010101435 http://google.com/ text/html 301 Y6PVK4XWOI3BXQEXM5WLLWU5JKUVNSFZ 391
>>> near.archive_url
'https://web.archive.org/web/20101010101435/http://google.com/'
>>> 
snapshots
>>> from waybackpy import WaybackMachineCDXServerAPI
>>> url = "https://pypi.org"
>>> user_agent = "Mozilla/5.0 (Windows NT 5.1; rv:40.0) Gecko/20100101 Firefox/40.0"
>>> cdx = WaybackMachineCDXServerAPI(url, user_agent, start_timestamp=2016, end_timestamp=2017)
>>> for item in cdx.snapshots():
...     print(item.archive_url)
...
https://web.archive.org/web/20160110011047/http://pypi.org/
https://web.archive.org/web/20160305104847/http://pypi.org/
.
. # URLS REDACTED FOR READABILITY
.
https://web.archive.org/web/20171127171549/https://pypi.org/
https://web.archive.org/web/20171206002737/http://pypi.org:80/

Availability API

It is recommended to not use the availability API due to performance issues. All the methods of availability API interface class, WaybackMachineAvailabilityAPI, are also implemented in the CDX server API interface class, WaybackMachineCDXServerAPI. Also note that the newest() method of WaybackMachineAvailabilityAPI can be more recent than WaybackMachineCDXServerAPI's same method.

>>> from waybackpy import WaybackMachineAvailabilityAPI
>>>
>>> url = "https://google.com"
>>> user_agent = "Mozilla/5.0 (Windows NT 5.1; rv:40.0) Gecko/20100101 Firefox/40.0"
>>>
>>> availability_api = WaybackMachineAvailabilityAPI(url, user_agent)
oldest
>>> availability_api.oldest()
https://web.archive.org/web/19981111184551/http://google.com:80/
newest
>>> availability_api.newest()
https://web.archive.org/web/20220118150444/https://www.google.com/
near
>>> availability_api.near(year=2010, month=10, day=10, hour=10)
https://web.archive.org/web/20101010101708/http://www.google.com/

Documentation is at https://github.com/akamhy/waybackpy/wiki/Python-package-docs.

As a CLI tool

Demo video on asciinema.org, you can copy the text from video:

asciicast

CLI documentation is at https://github.com/akamhy/waybackpy/wiki/CLI-docs.

Project links

  • Homepage
  • Download
  • Documentation
  • Source
  • Tracker

Key dates

PyPI data
Data sourced directly from PyPI's database.
  • Released: Mar 15, 2022
Latest release

1 maintainer

PyPI data
Data sourced directly from PyPI's database.
Avatar for akamhy from gravatar.com akamhy

Credits

Author: Akash Mahanty

License

MIT License (MIT)

Requires

Python >=3.6

Tags

Archive Website Wayback Machine Internet Archive Wayback Machine CLI Wayback Machine Python Internet Archiving Availability API CDX API savepagenow

Classifiers

  • Development Status
    • 5 - Production/Stable
  • Intended Audience
    • Developers
    • End Users/Desktop
  • License
    • OSI Approved :: MIT License
  • Natural Language
    • English
  • Programming Language
    • Python
    • Python :: 3
    • Python :: 3.6
    • Python :: 3.7
    • Python :: 3.8
    • Python :: 3.9
    • Python :: 3.10
    • Python :: Implementation :: CPython
  • Typing
    • Typed

Metadata

Project links

  • Homepage
  • Download
  • Documentation
  • Source
  • Tracker

Key dates

PyPI data
Data sourced directly from PyPI's database.
  • Released: Mar 15, 2022
Latest release

1 maintainer

PyPI data
Data sourced directly from PyPI's database.
Avatar for akamhy from gravatar.com akamhy

Credits

Author: Akash Mahanty

License

MIT License (MIT)

Requires

Python >=3.6

Tags

Archive Website Wayback Machine Internet Archive Wayback Machine CLI Wayback Machine Python Internet Archiving Availability API CDX API savepagenow

Classifiers

  • Development Status
    • 5 - Production/Stable
  • Intended Audience
    • Developers
    • End Users/Desktop
  • License
    • OSI Approved :: MIT License
  • Natural Language
    • English
  • Programming Language
    • Python
    • Python :: 3
    • Python :: 3.6
    • Python :: 3.7
    • Python :: 3.8
    • Python :: 3.9
    • Python :: 3.10
    • Python :: Implementation :: CPython
  • Typing
    • Typed

Release files for waybackpy 3.0.6

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

Source distribution (sdist)

Source distribution for waybackpy 3.0.6
File Size Uploaded Provenance Actions
waybackpy-3.0.6.tar.gz 29.9 kB Mar 15, 2022 Without provenance Details for waybackpy-3.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for waybackpy 3.0.6
File Interpreter ABI Platform Actions Reset
waybackpy-3.0.6-py3-none-any.whl 34.9 kB Mar 15, 2022 Without provenance Python 3 none any Details for waybackpy-3.0.6-py3-none-any.whl

Total release size: 64.8 kB

Release files / waybackpy-3.0.6.tar.gz

Download URL waybackpy-3.0.6.tar.gz
Size 29.9 kB
Tags Source
SHA-256 checksum
How to use checksums
497a371756aba7644eb7ada0ebd4edb15cb8c53bc134cc973bf023a12caff83f
BLAKE2b-256 checksum
How to use checksums
34ab90085feb81e7fad7d00c736f98e74ec315159ebef2180a77c85a06b2f0aa
Upload date Mar 15, 2022
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

Release files / waybackpy-3.0.6-py3-none-any.whl

Download URL waybackpy-3.0.6-py3-none-any.whl
Size 34.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c568b0db9056fbe42a1a7e56b4f1d1919bd3f76bd62da58d9ee2e577297be284
BLAKE2b-256 checksum
How to use checksums
1055573692440ce73f08200f4b6d3e193fa6426d1cb460912a472b8c3db137e2
Upload date Mar 15, 2022
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

Security for waybackpy 3.0.6

Report project as malware

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.0.6 This release

Mar 15, 2022 2 release files No provenance

3.0.5

Feb 18, 2022 2 release files No provenance

3.0.4

Feb 18, 2022 2 release files No provenance

3.0.3

Feb 9, 2022 2 release files No provenance

3.0.2

Jan 25, 2022 2 release files No provenance

3.0.1

Jan 25, 2022 2 release files No provenance

3.0.0

Jan 18, 2022 2 release files No provenance

2.4.4

Sep 3, 2021 2 release files No provenance

2.4.3

Apr 2, 2021 2 release files No provenance

2.4.2

Jan 24, 2021 2 release files No provenance

2.4.1

Jan 12, 2021 2 release files No provenance

2.4.0

Jan 10, 2021 2 release files No provenance

2.3.3

Jan 4, 2021 2 release files No provenance

2.3.2

Jan 2, 2021 2 release files No provenance

2.3.1

Jan 1, 2021 2 release files No provenance

2.3.0

Dec 13, 2020 2 release files No provenance

2.2.0

Oct 17, 2020 2 release files No provenance

2.1.9

Oct 2, 2020 2 release files No provenance

2.1.8

Oct 2, 2020 2 release files No provenance

2.1.7

Aug 9, 2020 2 release files No provenance

2.1.6

Jul 24, 2020 2 release files No provenance

2.1.5

Jul 24, 2020 2 release files No provenance

2.1.4

Jul 23, 2020 2 release files No provenance

2.1.3

Jul 22, 2020 2 release files No provenance

2.1.2

Jul 20, 2020 1 release file No provenance

2.1.1

Jul 20, 2020 1 release file No provenance

2.1.0

Jul 19, 2020 1 release file No provenance

2.0.2

Jul 18, 2020 1 release file No provenance

2.0.1

Jul 18, 2020 1 release file No provenance

2.0.0

Jul 18, 2020 1 release file No provenance

1.6

May 7, 2020 1 release file No provenance

1.4

May 5, 2020 1 release file No provenance

1.3

May 5, 2020 1 release file No provenance

v1.2

May 5, 2020 1 release file No provenance

v1.1

May 4, 2020 1 release file No provenance

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.