+ 6
How to programmaticall check in 🐍 & JS, if 2️⃣ different url addresses contain identical images⁉️ [🐍SOLVED] [JS ⁉️]
I have two different url's of images: https://api.sololearn.com/Uploads/Avatars/6698488.jpg https://api.sololearn.com/Uploads/Avatars/5037670.jpg I want to check if they contain the same pictures. Of course I can look at them: urlretrieve (f'https: //api.sololearn.com/Uploads/Avatars/6698488.jpg ', f'img.png') but I want to check them programmatically like this: if image1 == image2:
5 odpowiedzi
+ 5
https://stackoverflow.com/questions/35176639/compare-images-JUMP_LINK__&&__python__&&__JUMP_LINK-pil
You definitely need to download both images (programmatically), then you can use Pillow (PIL) library to compare.
+ 6
Tibor Santa Thanks to your tip, I solved this problem in 🐍 but it lasts too long in Playground. Maybe you know how to do the same in JS⁉️🤔
https://code.sololearn.com/caW7TeDOLM6W/?ref=app
+ 2
Janusz Bujak 🇵🇱 🇺🇦 if you just want to embed the pictures in a web page, use the IMG tag like this
<img src='https://api.sololearn.com/Uploads/Avatars/748195.jpg' />
And of course you can dynamically add those tags with JavaScript
https://www.tutorialspoint.com/how-to-add-a-new-element-to-html-dom-in-javascript