lovasoa / dezoomify-rs

Zoomable image downloader for Google Arts & Culture, Zoomify, IIIF, and others
https://dezoomify-rs.ophir.dev
GNU General Public License v3.0
739 stars 66 forks source link

the extension doesn't work on trove.nla.gov.au #183

Open bruh-creater opened 2 years ago

bruh-creater commented 2 years ago

I tried zooming in and out and nothing happened. Also, I tried tiles.yauml method. Dezoomify wont download the image.

the yauml code

# This is a tiles.yaml file for dezoomify-rs
# For more information about how to adapt this file to your use case, see:
# https://github.com/lovasoa/dezoomify-rs/wiki/Usage-example-for-the-custom-YAML-dezoomer

# The url of individual tiles, where {{ expressions }} will be evaluated using the variables below
url_template: "https://trove.nla.gov.au/imageservice/nla.news-page5653/tile7-{{X}}-{{Y}}"

# x_template and y_template tell dezoomify-rs where to place a tile on the canvas once it has been downloaded
# Here, for instance, the tile at (x=1, y=1) goes to position (256, 256)
x_template: "x * tile_size"
y_template: "y * tile_size"

variables:
  - { name: x, from: 0, to: 23 } # Image width, in tiles
  - { name: y, from: 0, to: 26 } # Image height, in tiles
  - { name: tile_size, value: 256 }

headers:
  # Specifying a Referer makes the server believe we come from that URL.
  Referer: "https://trove.nla.gov.au/7"

# The title is not mandatory either, but it makes dezoomify-rs
# create a file with an appropriate filename
title: "A Palace"

Hello everyone,

I am having issues when trying to download https://trove.nla.gov.au/imageservice/nla.news-page5653/tile7-{{x}}-{{y}}

Dezoomify reports:

Uncaught Error: Unable to find a proper dezoomer for:
https://trove.nla.gov.au/newspaper/static/page.js?_=NEWS-11.2.0

(https://dezoomify.ophir.dev/dezoomers/automatic.js:30)

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

lovasoa commented 2 years ago

https://trove.nla.gov.au/imageservice/nla.news-page5653/tile7-{{X}}-{{Y}} doesn't seem to be a valid image pattern :

https://trove.nla.gov.au/imageservice/nla.news-page5653/tile7-0-0

bruh-creater commented 2 years ago

now I got this error Uncaught Error: Unable to find a proper dezoomer for: https://trove.nla.gov.au/imageservice/nla.news-page5653/tile7-0-0

(https://dezoomify.ophir.dev/dezoomers/automatic.js:30)

bruh-creater commented 2 years ago

here is what I got from network inspector so far https://trove.nla.gov.au/imageservice/nla.news-page5653/tile7-9-7 https://trove.nla.gov.au/imageservice/nla.news-page5653/tile7-10-7 https://trove.nla.gov.au/imageservice/nla.news-page5653/tile7-11-3 https://trove.nla.gov.au/imageservice/nla.news-page5653/tile4-5-5 https://trove.nla.gov.au/imageservice/nla.news-page5653/tile4-6-5 https://trove.nla.gov.au/imageservice/nla.news-page5653/tile4-7-5 https://trove.nla.gov.au/imageservice/nla.news-page5653/tile4-8-2 https://trove.nla.gov.au/imageservice/nla.news-page5653/tile4-8-3

bruh-creater commented 2 years ago

since tile7 is the highest quality image https://trove.nla.gov.au/imageservice/nla.news-page5653/tile7-7-3 https://trove.nla.gov.au/imageservice/nla.news-page5653/tile7-7-4 https://trove.nla.gov.au/imageservice/nla.news-page5653/tile7-7-5 https://trove.nla.gov.au/imageservice/nla.news-page5653/tile7-7-6 https://trove.nla.gov.au/imageservice/nla.news-page5653/tile7-7-7 https://trove.nla.gov.au/imageservice/nla.news-page5653/tile7-7-8 . . . https://trove.nla.gov.au/imageservice/nla.news-page5653/tile7-7-28

https://trove.nla.gov.au/imageservice/nla.news-page5653/tile7-7-3 https://trove.nla.gov.au/imageservice/nla.news-page5653/tile7-8-3 https://trove.nla.gov.au/imageservice/nla.news-page5653/tile7-9-3 https://trove.nla.gov.au/imageservice/nla.news-page5653/tile7-10-3 https://trove.nla.gov.au/imageservice/nla.news-page5653/tile7-11-3 . . . https://trove.nla.gov.au/imageservice/nla.news-page5653/tile7-24-3

I put those into the yauml file as follows...

This is a tiles.yaml file for dezoomify-rs

For more information about how to adapt this file to your use case, see:

https://github.com/lovasoa/dezoomify-rs/wiki/Usage-example-for-the-custom-YAML-dezoomer

The url of individual tiles, where {{ expressions }} will be evaluated using the variables below

url_template: "https://trove.nla.gov.au/imageservice/nla.news-page5653/tile7-{{X}}-{{Y}}"

x_template and y_template tell dezoomify-rs where to place a tile on the canvas once it has been downloaded

Here, for instance, the tile at (x=1, y=1) goes to position (256, 256)

x_template: "x tile_size" y_template: "y tile_size"

variables:

  • { name: x, from: 7, to: 24 } # Image width, in tiles
  • { name: y, from: 3, to: 28 } # Image height, in tiles
  • { name: tile_size, value: 256 }

headers:

Specifying a Referer makes the server believe we come from that URL.

Referer: "https://trove.nla.gov.au/7"

The title is not mandatory either, but it makes dezoomify-rs

create a file with an appropriate filename

title: "A Palace"


when I run the yauml file I got

Enter an URL or a path to a tiles.yaml file: D:\Downloads\tiles.yaml [ETA:0s] ######################################## 0/0 Computing the URLs of the image tiles... [2022-08-22T01:00:50Z ERROR dezoomify_rs::custom_yaml] Invalid tiles.yaml file: Variable identifier is not bound to anything by context: "X". ERROR PNG encoding error: Zero width not allowed Enter an URL or a path to a tiles.yaml file: D:\Downloads\tiles.yaml [ETA:0s] ######################################## 0/0 Computing the URLs of the image tiles... [2022-08-22T01:06:43Z ERROR dezoomify_rs::custom_yaml] Invalid tiles.yaml file: Variable identifier is not bound to anything by context: "X". ERROR PNG encoding error: Zero width not allowed Enter an URL or a path to a tiles.yaml file: