Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

digital.onb.ac.at #703

Closed
bachelorbob opened this issue Feb 22, 2023 · 13 comments
Closed

digital.onb.ac.at #703

bachelorbob opened this issue Feb 22, 2023 · 13 comments

Comments

@bachelorbob
Copy link

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
Copy link

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
Copy link
Author

Worked like a charm. Many thanks.

@bachelorbob
Copy link
Author

bachelorbob commented Apr 1, 2023

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
Copy link

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
Copy link
Author

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
Copy link

barryspearce commented Apr 2, 2023

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
Copy link
Author

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
Copy link

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
Copy link
Author

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

@bachelorbob
Copy link
Author

Reported MacOS dezoomify-rs issue at lovasoa/dezoomify-rs#202, but no movement there.

@MrChrisWin
Copy link
Collaborator

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
Copy link
Author

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
Copy link
Owner

lovasoa commented May 1, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants