Japan-Digital-Archives / Japan-Digital-Archive

Digital Archive of Japan's 2011 Disasters
6 stars 18 forks source link

Some "Sakura On" Project images have no thumbnail image #792

Open nickkapur opened 10 years ago

nickkapur commented 10 years ago

But they do have images in the popup. Weird.

corinnecurcie commented 10 years ago

This is probably something in their API... typically we take separate images for the thumbnail and the actual picture... so if there is no thumbnail in their API, we will not have it on our end, even if we get the regular picture. This also happened with the thumbnail issue in the Michinoku photos.

corinnecurcie commented 10 years ago

After further investigation: it turns out that Sakura On uses the tumblr API, and we import the data with a script: Japan-Digital-Archives/scripts/sakura.py. It looks like the thumbnail_url is being found with "thumbnail_url = results["response"]["posts"][post_offset]["photos"][photo_offset]["alt_sizes"][2]["url"]". It clearly works for most of the pictures, and the line above is under a "try" clause, with an "except" giving the empty string for the thumbnail_url variable. So it's probable that there are no specific thumbnails for these images that don't have them - NOT that there's something wrong with our script. So I imagine this is on their end. I can confirm, but that seems the most probable case to me.