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
To fetch the latest version from archive, simply use fetch()
function.
import waybackmachine as wm
url = "https://en.wikipedia.org/wiki/COVID-19"
latest = wm.fetch(url)
latest.response # requests.Response
latest.date # capture time
latest.url # url
Optionally you can specify date. The first version after this date is chosen.
may2020 = wm.fetch(url, date="2020-05-01")
Browsing
You can also iterate archived versions backwards in time.
for version in wm.browse(url):
version.response # requests.Response
version.date # capture time
version.url # url
This will iterate the screenshots from archive.org.
You can specify a custom date range as follows.
for version in wm.browse(url, start='2020-06-30', end='2020-03-01'):
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.5.0.tar.gz
(7.7 kB
view hashes)
Built Distribution
Close
Hashes for waybackmachine-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c74cad5dc0e465eba86f826e356ed6a44982f84bcd11caaa1846a6ce0ebcdab |
|
MD5 | 623540471ccbce1d591f7d16ab43a5d1 |
|
BLAKE2b-256 | 49c04b76c8856b8710aca29a4c375f5220414e089f0e44b135624cb6b9149333 |