A library to interact with the archive.org Wayback Machine CDX server.
Project description
A library to interact with the archive.org Wayback Machine CDX server.
How to
archivecdx.Listing is the basic list class.
Pass CDX URL arguments as keyword args. (For arguments that are Python keywords, append an underscore and the library will automatically remove it for you.)
Special args:
url - the url param
delay - the delay between automatic page count detection and grabbing the first page
import archivecdx
listing = archivecdx.Listing("archive.org",fl=["original","timestamp","digest"])
print(listing[0]) # "Row(original='http://www.archive.org:80/',timestamp='19970126045828',digest='Q4YULN754FHV2U6Q5JUT6Q2P57WEWNNY')"
archivecdx.PaginatedListing uses the Pagination API to return less values at once.
It supports the page keyword argument and adds a next_page attribute, which will automatically pull the next page from the API.
import archivecdx
listing = archivecdx.PaginatedListing("archive.org",page=1,fl=["original","timestamp","digest"])
print(len(listing.listing)) # 15000
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
File details
Details for the file archive-cdx-0.2.0.tar.gz
.
File metadata
- Download URL: archive-cdx-0.2.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af4bf00454ca1837dc0b75fa532c401a5eccb92e673164a80cb059f7c7b5a7b6 |
|
MD5 | 3bf49ae7b9f07bfc94530970b6e0abbf |
|
BLAKE2b-256 | 299a7420a70baefeba557887add07542e0537f96c297c3cf3cf7ffc2b6dda3cd |