+ 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:

5th Mar 2022, 11:51 AM
Janusz Bujak 🇵🇱 🇺🇦
Janusz Bujak 🇵🇱 🇺🇦 - avatar
3 Antworten
+ 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.
5th Mar 2022, 12:15 PM
Tibor Santa
Tibor Santa - avatar
+ 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
6th Mar 2022, 5:26 PM
Janusz Bujak 🇵🇱 🇺🇦
Janusz Bujak 🇵🇱 🇺🇦 - avatar
+ 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
6th Mar 2022, 6:28 PM
Tibor Santa
Tibor Santa - avatar