Envelope for archive.org API.
Project description
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
Release history Release notifications | RSS feed
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.3.0.tar.gz
(6.5 kB
view hashes)
Built Distribution
Close
Hashes for waybackmachine-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 300cc93c84feb72d9c120b5e60c1eb198d603fffb4fedd6659b0b9d008086528 |
|
MD5 | 2d3dbe27f25aaf4ec5f5b362a1025ad2 |
|
BLAKE2b-256 | 233de7f25b0774c2fd73e0fed8cb15266917f2e44054dbec99acd4588c636c7b |