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
657 stars 71 forks source link

https://ndhadeliver.natlib.govt.nz [new site support] #772

Open smith2228 opened 7 months ago

smith2228 commented 7 months ago

https://ndhadeliver.natlib.govt.nz The National Library of New Zealand website has stopped working. It has been functional with dezoomify for multiple months until recently.

It uses IIPImage: https://ndhadeliver.natlib.govt.nz/delivery/DeliveryManagerServlet?dps_pid=IE6457324&dps_custom_att_1=emu I grab the actual image using the browser extension, giving me: https://ndhadeliver.natlib.govt.nz/iipsrv?FIF=2013/04/19/ac_3/V1-FL16627598.jp2

On the website, it returns:

Oops, we have a problem An error occured while trying to dezoomify your image. This is probably because dezoomify did not manage to find a zoomable image at the address you gave.

In dezoomify-rs, I get:

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: Unable to create the dezoomer: Invalid meta information file: missing field file
  • nypl: The 'nypl' dezoomer cannot handle this URI
  • iiif: Unable to create the dezoomer: Invalid IIIF info.json file: expected value at line 1 column 1
  • deepzoom: Unable to create the dezoomer: Unable to parse the dzi file: Syntax: 7:14 Unexpected closing tag: html != META
  • krpano: Unable to create the dezoomer: Unable to parse the krpano xml file: Syntax: 7:14 Unexpected closing tag: html != META
  • IIPImage: Unable to create the dezoomer: missing key 'Max-size' in the IIPImage metadata file

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

Enter an URL or a path to a tiles.yaml file:

It worked for an image a few days ago very briefly in-between fail after fail, so I'm not sure what might be causing this. Any one else having problems with IIPimage recently, or might it be a change to this particular website?

stevedunford commented 6 months ago

I can confirm this site has been working fine for me since forever... but for the last 2 months(ish) it's been consistently failing - I haven't been able to download any images. Another failing example: https://ndhadeliver.natlib.govt.nz/delivery/DeliveryManagerServlet?dps_pid=IE3482538&dps_custom_att_1=emu

Dezoomify traps this file: https://ndhadeliver.natlib.govt.nz/iipsrv?FIF=2013/05/09/ac_21/V1-FL17024838.jp2

Which it classifies as an IIPImage, but comes up with 'Oops, we have a problem', and the following error:

Uncaught Error: Invalid IIPImage information file.

(https://dezoomify.ophir.dev/dezoomers/iipimage.js:40)
lovasoa commented 6 months ago

Here are the contents of the file you reference:

Content-Disposition: inline;filename="IIPisAMadGameClosedToOurUnderstanding.netfpx"

Error/42:2 1 FIF=2013/05/09/ac_
lovasoa commented 6 months ago

Looks like they started using incapsula to try and prevent bots to access the resources. It should be possible to work around it with https://github.com/lovasoa/dezoomify/wiki/How-to-access-protected-pages

lovasoa commented 6 months ago

Just got it to work by using dezoomify-rs and copying the cookie from my browser session :

image

❯ ./dezoomify-rs 'https://ndhadeliver.natlib.govt.nz/iipsrv?FIF=2013/05/09/ac_21/V1-FL17024838.jp2&obj=IIP,1.0&obj=Max-size&obj=Tile-size&obj=Resolution-number' --header 'Cookie: incap_ses_2224_227072=WCzGUfAbhw0BZ2oyPDzdHsIS02UAAAAAmtHdBpAw2kcbTquGguLgQA==;'

Found the following zoom levels:
 0. IIPImage (   97 x   134 pixels,     1 tiles)
 1. IIPImage (  195 x   268 pixels,     2 tiles)
 2. IIPImage (  390 x   537 pixels,     6 tiles)
 3. IIPImage (  780 x  1075 pixels,    20 tiles)
 4. IIPImage ( 1560 x  2151 pixels,    63 tiles)
 5. IIPImage ( 3120 x  4302 pixels,   221 tiles)
Which level do you want to download? 
5
[ETA:0s] ########################################  221/221  Finished tile download                                                                                                                                                                            
Image successfully saved to '/home/olojkine/dev/dezoomify-rs/dezoomified.jpg' (current working directory: /home/olojkine/dev/dezoomify-rs)

dezoomified

dvmace09 commented 6 months ago

I'm having similar issues with https://ndhadeliver.natlib.govt.nz/delivery/DeliveryManagerServlet?dps_pid=IE820472&dps_custom_att_1=emu - Dezoomify Chrome plugin gives me https://ndhadeliver.natlib.govt.nz/iipsrv?FIF=2021/07/24/ac_140/V1-FL73864973.jp2 but also comes up with the same error messages.

Any assistance would be much appreciated

lovasoa commented 6 months ago

You should be able to do the same as I did above, with dezoomify-rs

tomrishworth commented 6 months ago

I was having the same issue, and tried adding the cookie header and it worked for me. Thanks @lovasoa