curl with gallica now gives tiny images.

Advice and Help

Moderator: kcleung

Post Reply
coulonnus
active poster
Posts: 1681
Joined: Thu Jul 12, 2007 8:53 am
notabot: 42
notabot2: Human
Location: Nice, France
Contact:

curl with gallica now gives tiny images.

Post by coulonnus »

Since a few weeks.

e.g. curl https://gallica.bnf.fr//iiif/ark:/12148 ... 0542322t/f[14-14]/full/full/0/native.jpg -o q#1.jpg
(only one page to make things simpler)

Note that https://gallica.bnf.fr//iiif/ark:/12148 ... native.jpg works well if you copy-paste it into the banner of your browser.
Pnorcks
regular poster
Posts: 46
Joined: Tue Jun 27, 2023 4:29 am
notabot: 42
notabot2: Human

Re: curl with gallica now gives tiny images.

Post by Pnorcks »

I suspect this is a server-side change to help prevent scraping from AI bots... For a while, I've not been able to download Gallica's IIIF manifests with curl, due to the captcha, so I was downloading the manifests through the web interface. But at that time, curl was still able to download the full-size images themselves. Apparently that's now changed... I have not downloaded from Gallica in a while, so not sure when the behavior changed (again), but I now see 403 error responses when attempting to download the images with curl. And similar to what you report, if I copy/paste the image URLs in a web browser, they download successfully.
Post Reply