š§ Archived š§
The functionality of this package has been folded entierly into mediacloud/mc-providers. As development here will stop, the package is archived
A simple client library to access the Wayback Machine news archive search.
NB: TBD
pip install mediacloud-news-client
Counting matching stories:
from mcnews.searchapi import SearchApiClient
import datetime as dt
api = SearchApiClient("mediacloud_search_text_*")
api.count("coronavirus", dt.datetime(2023, 11, 1), dt.datetime(2023, 12, 1))
Paging over all matching results:
from mcnews.searchapi import SearchApiClient
import datetime as dt
api = SearchApiClient("mediacloud_search_text_*")
for page in api.all_articles("coronavirus", dt.datetime(2023, 11, 1), dt.datetime(2023, 12, 1)):
do_something(page)
Install the dependencies for dev: pip install -e .[dev]
pytest
to make sure all the test passmcnews/__init__.py
python setup.py sdist
to create an installation packagetwine upload --repository-url https://test.pypi.org/legacy/ dist/*
to upload it to PyPI's test platformtwine upload dist/*
to upload it to PyPIexpanded
results, and more integration testingpaged_articles
method to allow paging over all resultsurl
field searcharticle
endpoint, test case for fetching content (snippet
) via article_url
property