lovasoa / dezoomify

Dezoomify is a web application to download zoomable images from museum websites, image galleries, and map viewers. Many different zoomable image technologies are supported.
https://dezoomify.ophir.dev
GNU General Public License v2.0
670 stars 76 forks source link

digital.onb.ac.at #703

Closed bachelorbob closed 1 year ago

bachelorbob commented 1 year ago

Hello everyone,

I am having issues when trying to download https://digital.onb.ac.at/rep/osd/?10E26509

Dezoomify reports:

Uncaught Error: Invalid XML:
https://digital.onb.ac.at/rep/osd/?10E26509

(https://dezoomify.ophir.dev/zoommanager.js:217)

I don't understand this message. Can someone please help me ?

barryspearce commented 1 year ago

Yes the website version of dezoomify fails to find the right url. Put this one in instead: https://digital.onb.ac.at/rep/access/iiif/image/v2/5af078d19f16830d522bf27bbabeb3355b51786ac06f78702c6b3ba170c2ca166d92edb4b4fc53d9a3a2a0fa428eb98222c349076c37/info.json

You can find these URLs by going into Developer mode on the browser, going to the Network tab, filtering on Fetch/XHR and finding the info.json urls.

This works for all IIIF based sources.

bachelorbob commented 1 year ago

Worked like a charm. Many thanks.

bachelorbob commented 1 year ago

I'm having troubles with another site. While your instructions worked on the first site, the same method fails on this one:

https://www.bavarikon.de/object/bav:BBR-MUS-00000BAV80055719

Fetch/XHRshows: https://api.digitale-sammlungen.de/iiif/image/v2/bav:BBR-MUS-00000BAV80055719_bav80055719_00001/info.json

Help?

barryspearce commented 1 year ago

So this is Standard IIIF protocol. There are two methods to dezoom on IIIF, one is to use a dezoom tool like dezoomify to load the tiles, the other is URL manipulation as the IIIF standard allows for requesting the whole image. In this case URL modification is also scuppered - So it will be header related. Looking at the headers no cookies are used, so I traced this to a Referer header issue.

This would need specific support as the server requires the HTTP Referer Header to be set.

However, this can be done with the Dezoomify command line tool. You can pass it the correct Referer:

dezoomify-rs -H "Referer: https://www.bavarikon.de/" https://api.digitale-sammlungen.de/iiif/image/v2/bav:BBR-MUS-00000BAV80055719_bav80055719_00001/info.json

The command line version is available on github here (Same github user but a different project, so it can be trusted the same as this project is): https://github.com/lovasoa/dezoomify-rs

You will find instructions there, downloads available for Mac, Linux and Windows.

bachelorbob commented 1 year ago

Would have never figured most of that out on my own, but still not having any success.

Enter an URL or a path to a tiles.yaml file: dezoomify-rs -H "https://www.bavarikon.de/" https://api.digitale-sammlungen.de/iiif/image/v2/bav:BBR-MUS-00000BAV80055718_bav80055718_00005/info.json test.png ERROR Dezoomer error: Unable to create the dezoomer: Tried all of the dezoomers, none succeeded. They returned the following errors:

  • custom: The 'custom' dezoomer cannot handle this URI
  • google_arts_and_culture: The 'google_arts_and_culture' dezoomer cannot handle this URI
  • zoomify: The 'zoomify' dezoomer cannot handle this URI
  • generic: The 'generic' dezoomer cannot handle this URI
  • pff: The 'pff' dezoomer cannot handle this URI
  • IIPImage: The 'IIPImage' dezoomer cannot handle this URI
  • nypl: The 'nypl' dezoomer cannot handle this URI
  • iiif: Unable to download required data: Input/Output error: No such file or directory (os error 2)
  • deepzoom: Unable to download required data: Input/Output error: No such file or directory (os error 2)
  • krpano: Unable to download required data: Input/Output error: No such file or directory (os error 2)

dezoomify-rs expects a zoomable image meta-information file URL. To find this URL, you can use the dezoomify browser extension, which you can download at

barryspearce commented 1 year ago

The command you are using has an error. The -H is a header specification and must have the form name: value You have just the URL in there. It needs to be:

Referer: https://www.bavarikon.de/

i.e dezoomify-rs -H "Referer: https://www.bavarikon.de/" https://api.digitale-sammlungen.de/iiif/image/v2/bav:BBR-MUS-00000BAV80055718_bav80055718_00005/info.json

Just in case you weren't aware, if you do specify PNG as an output filename you file will be 10x larger than if you use JPG. Although of course pixel degradation won't be an issue with PNG if that's important to you (special cases which most folks wont care about).

Hope that helps!

bachelorbob commented 1 year ago

I get the exact same error message in dezoomify-rs using the corrected command line. Does it work for you?

As an aside, I am aware of PNG v. JPG and, needing lossless digital editing and saving, only use PNG.

barryspearce commented 1 year ago

Yes.

dezoomify-rs -H "Referer: https://www.bavarikon.de/" https://api.digitale-sammlungen.de/iiif/image/v2/bav:BBR-MUS-00000BAV80055718_bav80055718_00005/info.json text.png

I just cut & pasted this command from here and it works fine for me on Linux.

bachelorbob commented 1 year ago

Then something is wrong with the MacOS build of dezoomify-rs.

bachelorbob commented 1 year ago

Reported MacOS dezoomify-rs issue at https://github.com/lovasoa/dezoomify-rs/issues/202, but no movement there.

MrChrisWin commented 1 year ago

Yes.

dezoomify-rs -H "Referer: https://www.bavarikon.de/" https://api.digitale-sammlungen.de/iiif/image/v2/bav:BBR-MUS-00000BAV80055718_bav80055718_00005/info.json text.png

I just cut & pasted this command from here and it works fine for me on Linux.

Also worked fine in Windows and produces this image: https://i.imgur.com/9kuLOWw.jpg

bachelorbob commented 1 year ago

Then I am baffled. Cut & paste of that command line fails for me in Mac's Terminal and on Windows 10 Ed inside Parallels Desktop (with and without PNG file type).

lovasoa commented 1 year ago

Closing as a duplicate of #676 , feel free to continue the discussion there.