C-SPAN thumbnails
wybiral opened this issue · 2 comments
These are broken. Their server is returning a 403. The URLs contain base64-encoded JSON so maybe it's possible to parse those and retrieve a working image link?
This looks like a processing delay on their side. Eventually the items get a proper thumbnail (as far as I can tell) but there's a delay. For example:
- Initial URL (A): https://ximage.c-spanvideo.org/eyJidWNrZXQiOiJwaWN0dXJlcy5jLXNwYW52aWRlby5vcmciLCJrZXkiOiJkZWZhdWx0c1wvQm9va1RWX2RlZmF1bHQtaW1hZ2UuanBnIiwiZWRpdHMiOnsicmVzaXplIjp7ImZpdCI6ImNvdmVyIiwiaGVpZ2h0IjoxMzUsIndpZHRoIjoyNDB9fX0=
- Eventual URL (B): https://ximage.c-spanvideo.org/eyJidWNrZXQiOiJwaWN0dXJlcy5jLXNwYW52aWRlby5vcmciLCJrZXkiOiJGaWxlc1wvN2E1XC8yMDIwMDMxNTIzMDYzNjAwMl9oZC5qcGciLCJlZGl0cyI6eyJyZXNpemUiOnsiZml0IjoiY292ZXIiLCJoZWlnaHQiOjEzNSwid2lkdGgiOjI0MH19fQ==
If you decode the base64 from each you find:
- A:
{"bucket":"pictures.c-spanvideo.org","key":"defaults\/BookTV_default-image.jpg","edits":{"resize":{"fit":"cover","height":135,"width":240}}}
- B:
{"bucket":"pictures.c-spanvideo.org","key":"Files\/7a5\/20200315230636002_hd.jpg","edits":{"resize":{"fit":"cover","height":135,"width":240}}}
This indicates that the initial URL is a default image and for some reason their default images are broken.
The best fix for now is probably just to ignore the thumbnails if they use a default key prefix like this. Otherwise we'd need a more complicated system to go back and correct the thumbnails once they get uploaded which doesn't seem worth it for this specific case.