trove-newspaper-harvester
The Trove Newspaper (& Gazette) Harvester makes it easy to download large quantities of digitised articles from Trove’s newspapers and gazettes. Just give it a search from the Trove web interface, and the harvester will save the metadata of all the articles in a CSV (spreadsheet) file for further analysis. You can also save the full text of every article, as well as copies of the articles as JPG images, and even PDFs. While the web interface will only show you the first 2,000 results matching your search, the Newspaper Harvester will get everything.
No installation required!
If you want to use the harvester without installing anything, just head over to the Trove Newspaper Harvester section in my GLAM Workbench.
Installation
pip install trove-newspaper-harvester
Before you do any harvesting you need to get yourself a Trove API key.
Use as a library
from trove_newspaper_harvester.core import prepare_query, Harvester
Generate a set of query parameters using
prepare_query.
my_query = "https://trove.nla.gov.au/search/category/newspapers?keyword=wragge"
my_api_key = "mYSecREtkEy"
my_query_params = prepare_query(query=my_query)
Initialise the
Harvester
with your query parameters and api key.
harvester = Harvester(query_params=my_query_params, key=my_api_key)
Start the harvest!
harvester.harvest()
If the harvest fails just run
Harvester.harvest
again.
See the core module documentation for more options and examples.
Use as a command-line tool
There are three basic commands:
- start – start a new harvest
- restart – restart a stalled harvest
- report – view harvest details
Start a harvest
To start a new harvest you can just do:
troveharvester start "[Trove query]" [Trove API key]
The Trove query can either be a url copied and pasted from a search in the Trove web interface, or a Trove API query url constructed using something like the Trove API Console. Enclose the url in double quotes.
See the CLI module documentation for more details.
Created by Tim Sherratt for the GLAM Workbench. Support this project by becoming a GitHub sponsor.
Metadata
Release files for trove-newspaper-harvester 0.7.2
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 |
|---|---|---|---|---|
| trove-newspaper-harvester-0.7.2.tar.gz | 15.6 kB | Without provenance | Details for trove-newspaper-harvester-0.7.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| trove_newspaper_harvester-0.7.2-py3-none-any.whl | Python 3 | none | any | Details for trove_newspaper_harvester-0.7.2-py3-none-any.whl |
Total release size: 30.2 kB
Release files / trove-newspaper-harvester-0.7.2.tar.gz
| Download URL | trove-newspaper-harvester-0.7.2.tar.gz |
|---|---|
| Size | 15.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
403463d21d1b611fd1a38619bf505ac93771d7ed92bdf83617b9678b4d1feb23
|
|
BLAKE2b-256 checksum How to use checksums |
9d98973eef4f8ae16318b9d4ea8f31be9a8fb017fdc5645f70538f106f5fd566
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.12
|
Release files / trove_newspaper_harvester-0.7.2-py3-none-any.whl
| Download URL | trove_newspaper_harvester-0.7.2-py3-none-any.whl |
|---|---|
| Size | 14.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6eafdb8ec732de84bb6c9d0e0e1c65c91f4fa44f6888c11ec4491f345298f78
|
|
BLAKE2b-256 checksum How to use checksums |
d2b1d95353398994f097e299d4001e39d0d7f0210a5b4260e4ed54bf5657b730
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.12
|
Security for trove-newspaper-harvester 0.7.2
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.