summaryrefslogtreecommitdiff
path: root/cmd/iiifdownloader
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/iiifdownloader')
-rw-r--r--cmd/iiifdownloader/main.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/cmd/iiifdownloader/main.go b/cmd/iiifdownloader/main.go
index 507293b..737cdb5 100644
--- a/cmd/iiifdownloader/main.go
+++ b/cmd/iiifdownloader/main.go
@@ -153,7 +153,14 @@ func parseIIIFManifest(u string) ([]string, error) {
for _, canvas := range v.Sequences[0].Canvases {
for _, image := range canvas.Images {
- urls = append(urls, image.Resource.Id)
+ u := image.Resource.Id
+ // iiif.bodleian.ox.ac.uk serves manifests that use an ID which
+ // redirects to a info.json unless we manually add the appropriate
+ // iiif parameters.
+ if !strings.HasSuffix(u, ".jpg") && !strings.HasSuffix(u, ".jpeg") {
+ u += "/full/full/0/native.jpg"
+ }
+ urls = append(urls, u)
}
}