Skip to main content

trove-newspaper-images

Background and alternatives

There’s no reliable way of downloading an image of a Trove newspaper article from the web interface. The image download option produces an HTML page with embedded images, and the article is often sliced into pieces to fit the page.

This package includes tools to download articles as complete JPEG images. If an article is printed across multiple newspaper pages, multiple images will be downloaded – one for each page. It’s intended for integration into other tools and processing workflows, or for people who like working on the command line.

If you just want to quickly download an article as an image without installing anything, you can use this web app in the GLAM Workbench. To download images of all articles returned by a search in Trove, you can also use the Trove Newspaper and Gazette Harvester.

See the documentation for more information.

Install

pip install trove-newspaper-images

Download articles as images

Use as a library

from trove_newspaper_images.articles import download_images

images = download_images('107024751')
images
['nla.news-article107024751-11565831.jpg']

Use from the command line

Just call trove_newspaper_images.download from the command line with an article identifier. You can use the --output_dir parameter to specify a directory for the downloaded images. For example:

trove_newspaper_images.download 107024751 --output_dir images

Add the --masked parameter to try and remove content from neighbouring articles.

trove_newspaper_images.download 107024751 --masked

Created by Tim Sherratt (@wragge) for the GLAM Workbench.

Release files for trove-newspaper-images 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for trove-newspaper-images 0.3.1
File Size Uploaded
trove_newspaper_images-0.3.1.tar.gz 8.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for trove-newspaper-images 0.3.1
File Interpreter ABI Platform
trove_newspaper_images-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.3 kB

Release files / trove_newspaper_images-0.3.1.tar.gz

Download URL trove_newspaper_images-0.3.1.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
be34e2819edad672d1a904fa63169b08b9333b5f41482a6e34bb1a7b8ee68554
BLAKE2b-256 checksum
How to use checksums
1d7e032036c1d3b1098ded5cdbcf4f52ad79af75f8143a92b071d2007abd3f39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Release files / trove_newspaper_images-0.3.1-py3-none-any.whl

Download URL trove_newspaper_images-0.3.1-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2eda61a7f7dd9a18f31156464d693d978b401ba9e6fe81f7f5b6006405da9e1a
BLAKE2b-256 checksum
How to use checksums
d401aa8459d71fd87bdfe3b624d777a7593934bb19a2f930f97984044eb60076
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page