Wayback Machine news archive search api client
Project description
Wayback Machine News Archive Search
🚧 under construction 🚧
A simple library to access the Wayback Machine news archive search.
Installation
pip install wayback-news-search
Basic Usage
Counting matching stories:
from waybacknews.searchapi import SearchApiClient
import datetime as dt
api = SearchApiClient("mediacloud")
api.count("coronavirus", dt.datetime(2022, 3, 1), dt.datetime(2022, 4, 1))
Paging over all matching results:
from waybacknews.searchapi import SearchApiClient
import datetime as dt
api = SearchApiClient("mediacloud")
for page in api.all_articles("coronavirus", dt.datetime(2022, 3, 1), dt.datetime(2022, 4, 1)):
do_something(page)
Dev Installation
Install the dependencies for dev: pip install -e .[dev]
Distribution
- Run
pytest
to make sure all the test pass - Update the version number in
waybacknews/__init__.py
- Make a brief note in the version history section below about the changes
- Commit the changes
- Tag the commit with a semantic version number - 'v*..'
- Push to repo to GitHub
- Run
python setup.py sdist
to create an installation package - Run
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
to upload it to PyPI's test platform - Run
twine upload dist/*
to upload it to PyPI
Version History
- v0.1.4 - better error handling
- v0.1.3 - allow overriding base api URL
- v0.1.2 - fix
article
endpoint, test case for fetching content (snippet
) viaarticle_url
property - v0.1.1 - more consistent method names
- v0.1.0 - initial test-only release
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
Close
Hashes for wayback-news-search-0.1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82e763071326f4f30361ed96636a6fe48e631bea6ef4f84132e9869e491daec4 |
|
MD5 | 8c84027d02fbf3af0547e86b72f9c18f |
|
BLAKE2b-256 | 9c3d5f183791f5ad964680e3f3dc61c0c78b6a80665461c85ba5018cee21ed4a |