Skip to main content

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

from waybackmachine import WaybackMachine

url = "https://www.folkhalsomyndigheten.se/smittskydd-beredskap/utbrott/aktuella-utbrott/covid-19/bekraftade-fall-i-sverige/"
for response in WaybackMachine(url):
    # process response
    pass

In the code the requests are being done from the newest (to the url itself) and then back in history to older and older versions saved on archive.

Parameterization will be later broaden to be more general. Currently the project is used for fetching COVID-19 data.

pip install --upgrade waybackmachine

Parametrization

date

By default the start date is today. End date is currently set to 2020-03-01.

Date will be more general in the future.

from waybackmachine import WaybackMachine

url = "https://www.folkhalsomyndigheten.se/smittskydd-beredskap/utbrott/aktuella-utbrott/covid-19/bekraftade-fall-i-sverige/"

for response in WaybackMachine(url, "2020-04-01"): # start from 1st April 2020 and go back
    # process response
    pass

Contribution

Developed by Martin Benes.

Join on GitHub.

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.0.1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

waybackmachine-0.0.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file waybackmachine-0.0.1.tar.gz.

File metadata

  • Download URL: waybackmachine-0.0.1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3rc1

File hashes

Hashes for waybackmachine-0.0.1.tar.gz
Algorithm Hash digest
SHA256 66ac490558de23e8a3838db849c260771053b72d3a637c51cf698bd626de938e
MD5 c5a396b9e2fe42817fa9cd5dffca87bb
BLAKE2b-256 d3e129ca6ef197f511f944194fb490e64b8ecc868c408127149dde6c413ea5b0

See more details on using hashes here.

File details

Details for the file waybackmachine-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: waybackmachine-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3rc1

File hashes

Hashes for waybackmachine-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 978b61ed13a1b32650b8ed319a975830e26bef6a3190288bdcb9ed9b3dd6a349
MD5 043a6a09710ea9f25ea6b8a82878c83a
BLAKE2b-256 1fc22d4573234e354ede5019c0a136fb8b6cb921b943b5a95b8f7792135e396a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page