Home python Search by picture yandex images python

Search by picture yandex images python




I need to implement the search by picture using the Yandex Images service. Do Yandex have for this API. Please see the video: https://yadi.sk/i/sxmwhuq4v9ieqg . There everything is clearly shown that I need to achieve.

You need to search for Yandex pictures on the image. API did not find it, then we try somehow differently. I tried to make some manipulations with the URL, but I did not succeed. The poker in the picture gives such a URL: https://yandex.ru/images/search* chttps://upload.wikimedia.org/wikipedia/commons/b /B3/Tom_ellis_%282016%29.jpg&rpt=imageView&amp ;cbir_id=2473989%2fk1thfjk4h_-rsqpdcktcza . I tried to change the URL parameter in the link above, but nothing came out, I came to the old search page, with an old picture. You understood me, or you need more details

I want to make cross-platform search on pictures. On Android and iOS Selenium will not get off. But, if possible, write, Issue Selenium. But, while SELENIUM is an extreme case. There is a bot: https://t.me/eyegodsbot . He is looking for a picture using the Yandex Images service. When I send a picture to a picture, it gives it this: url: https://yandex.ru/images/touch/search?source=collections&amp ; url = https: //eyegod.info/amazon.com/cloud/getFiles/722371882/1595068745 token = 6364d3f0f495b6ab9dcf8d3b5c6e0b01 & amp; rpt = imageview & amp; redircnt = 1595577295.1 & amp; cbir_id = 3052891 / 8EczY91CDxYat0pODfSxHg ?. This URL differs greatly from the other above the translated. Seeing this URL I thought that Yandex has pictures of the API. But while I did not find it. Further, on this URL, Bot look for similar pictures. In general, the URL that uses the Bot has parameter: token. This is usually observed in the API.

Answer 1, Authority 100%

It works. Further simply praise

import requests
From BS4 Import Beautifulsoup
URL = R'Https: //yandex.ru/images/Search? Source = Collections & amp; RPT = imageView & amp; url = https: //canon-fan.com/sites/default/files/imagecache/small_image/moon.jpg '
Soup = Beautifulsoup (Requests.get (URL) .Text, 'LXML')
similar = Soup.find_all ('Li', class _ = 'cbir-similar__thumb')
For i in Similar:
  Print (F "https://yandex.ru {i.find ('a') .get ('href')} \ n")

This code issues links to “Similar features”

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions