Skip to main content

Envelope for archive.org API.

Project description

PyPI version PyPI downloads Stars Contributors Wheel Status PyPi license Last commit

Wayback Machine

This project is an envelope for simple fetching of historical versions of page from archive.org API.

The page can be used for subsequent webscraping

Setup and usage

Install from pip with

pip install waybackmachine

Simple usage of the WaybackMachine class is as

import waybackmachine as wm

url = "https://en.wikipedia.org/wiki/COVID-19"
for version in wm.browse(url):
    version.response  # requests.Response
    version.date  # capture time
    version.url  # url

This will iterate the current version, followed by screenshots from archive.org. Avoid returning the current (live) version.

from datetime import datetime
for version in wm.browse(url, start=datetime.now()):
    pass

You can specify a custom date range as follows.

for version in wm.browse(url, start=datetime(2020,6,30), end=datetime(2020,3,1)):
    pass

Contribution

Developed by Martin Benes.

Join on GitHub.

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

waybackmachine-0.4.0.tar.gz (6.8 kB view hashes)

Uploaded Source

Built Distribution

waybackmachine-0.4.0-py3-none-any.whl (5.2 kB view hashes)

Uploaded 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