Wayback Machine News Archive Client
🚧 under construction 🚧
A simple client 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
pytestto 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 sdistto 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
- v1.2.1 - fix paging bug triggered by no results
- v1.2.0 - add support for new
expandedresults, and more integration testing - v1.1.0 - add new
paged_articlesmethod to allow paging over all results - v1.0.3 - add 30 sec timeout, remove extra params mcproviders library might be adding
- v1.0.2 - fix to article endpoint
- v1.0.1 - automatically escape '/' in query strings, test case for
urlfield search - v1.0.0 - update to public API endpoint
- v0.1.5 - simpler return for top terms
- v0.1.4 - better error handling
- v0.1.3 - allow overriding base api URL
- v0.1.2 - fix
articleendpoint, test case for fetching content (snippet) viaarticle_urlproperty - v0.1.1 - more consistent method names
- v0.1.0 - initial test-only release
Metadata
Release files for wayback-news-search 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wayback-news-search-1.2.1.tar.gz | 8.9 kB | Without provenance | Details for wayback-news-search-1.2.1.tar.gz |
Release files / wayback-news-search-1.2.1.tar.gz
| Download URL | wayback-news-search-1.2.1.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c29d53d7ee79cbbbe5da43bc9d6b1b9838ac92d536cc649f7c43b2e725e4817
|
|
BLAKE2b-256 checksum How to use checksums |
3aa79e0fde439099b9bc4ebca633667ef42e056d92d8c0580e71414e2d62c61a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|
Security for wayback-news-search 1.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.