AtlasOfLivingAustralia / image-service

Image repository and tiling services
https://images.ala.org.au
0 stars 17 forks source link

Add user-agent to image-service to solve the image retrieval issue #178

Closed sat01a closed 11 months ago

sat01a commented 1 year ago

Museum Victoria and some of the other web services block downloading images from them as the image-service doesn't have a User-Agent. After investigating the issue and with the Help of Simon and Dave, we realised that the user-agent needs to be specified in the image-service. Simon tested the following script and it worked for MV:

#!/bin/env groovy

def url = 'https://collections.museumsvictoria.com.au/content/media/6/1090906-large.jpg'.toURL()
def con = url.openConnection()
con.setRequestProperty('User-Agent', 'ALA-Image-Service/1.0')
println con.inputStream.getBytes().encodeHex()
sat01a commented 1 year ago

reported by @sadeghim

sughics commented 11 months ago

Released with 2.0.4