auino / cookidump

Easily dump cookidoo recipes
MIT License
147 stars 34 forks source link

Issues with images #14

Open NightProgramming opened 2 years ago

NightProgramming commented 2 years ago

It seems the dumped images in the image folder aren't really used by the dumped HTML files. Instead the img tags look something like this:

<img srcset="https://assets.tmecosys.com/image/upload/t_web600x528/img/recipe/ras/Assets/11D4ECD1-EBF7-4E26-A71C-31B3E4020CCC/Derivates/acc08e97-6b82-4dd6-b22b-25fd4430867b.jpg 600w, https://assets.tmecosys.com/image/upload/t_web667x528/img/recipe/ras/Assets/11D4ECD1-EBF7-4E26-A71C-31B3E4020CCC/Derivates/acc08e97-6b82-4dd6-b22b-25fd4430867b.jpg 667w, https://assets.tmecosys.com/image/upload/t_web496x528/img/recipe/ras/Assets/11D4ECD1-EBF7-4E26-A71C-31B3E4020CCC/Derivates/acc08e97-6b82-4dd6-b22b-25fd4430867b.jpg 496w, https://assets.tmecosys.com/image/upload/t_web767x639/img/recipe/ras/Assets/11D4ECD1-EBF7-4E26-A71C-31B3E4020CCC/Derivates/acc08e97-6b82-4dd6-b22b-25fd4430867b.jpg 767w, https://assets.tmecosys.com/image/upload/t_web575x575/img/recipe/ras/Assets/11D4ECD1-EBF7-4E26-A71C-31B3E4020CCC/Derivates/acc08e97-6b82-4dd6-b22b-25fd4430867b.jpg 575w" sizes="(min-width: 1333px) 600px, (min-width: 992px) 667px, (min-width: 768px) 496px, (min-width: 576px) 767px, (min-width: 0px) 575px" src="https://assets.tmecosys.com/image/upload/t_web767x639/img/recipe/ras/Assets/11D4ECD1-EBF7-4E26-A71C-31B3E4020CCC/Derivates/acc08e97-6b82-4dd6-b22b-25fd4430867b.jpg" alt="Crevetten süss-sauer" title="Crevetten süss-sauer">

So the image source is still the CDN, not the images in the image folder.

Also some of those small images in the gallery aren't working. The img tags look like this:

<img class="core-tile__image" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAQAAAA3fa6RAAAAEElEQVR42mN8/58BCBghFAAizwPfChHPggAAAABJRU5ErkJggg==" alt="Wan-Tan-Ravioli mit Ziegenkäse und Sauce Pistou" title="Wan-Tan-Ravioli mit Ziegenkäse und Sauce Pistou" data-src="https://assets.tmecosys.com/image/upload/t_web276x230/img/recipe/ras/Assets/6D58F319-5004-44D1-9679-EC0D741B899E/Derivates/0f137a02-dbdc-4859-ad53-711d03177273" data-srcset="https://assets.tmecosys.com/image/upload/t_web276x230/img/recipe/ras/Assets/6D58F319-5004-44D1-9679-EC0D741B899E/Derivates/0f137a02-dbdc-4859-ad53-711d03177273 276w,https://assets.tmecosys.com/image/upload/t_web378x315/img/recipe/ras/Assets/6D58F319-5004-44D1-9679-EC0D741B899E/Derivates/0f137a02-dbdc-4859-ad53-711d03177273 378w,
                       https://assets.tmecosys.com/image/upload/t_web276x230%402x/img/recipe/ras/Assets/6D58F319-5004-44D1-9679-EC0D741B899E/Derivates/0f137a02-dbdc-4859-ad53-711d03177273 552w" data-sizes="(min-width: 1333px) 276px,(min-width: 1024px) 286px,(min-width: 768px) 220px, 140px">

It seems like the client-side framework didn't have enough time yet to properly set the src/srcset attributes before creating the dumped HTML. That's why there are still data-srcset and data-src attributes present in those gallery images which don't work.