google-this icon indicating copy to clipboard operation
google-this copied to clipboard

Reverse image search: Direct image upload

Open Randomblock1 opened this issue 2 years ago • 1 comments

Describe your suggestion

Google offers an image upload option in addition to a URL. It's pretty simple to do this with CURL: curl -F '[email protected]' https://images.google.com/searchbyimage/upload and it responds with:

<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="https://www.google.com/search?tbs=sbi:random_string_you_get_the_idea">here</A>.
</BODY></HTML>

It shouldn't be too hard to add this, it should check if it's being passed a string (url) or buffer (image) and act accordingly.

Other details

No response

Checklist

  • [X] I am running the latest version.
  • [X] I checked the documentation and found no answer.
  • [X] I have searched the existing issues and made sure this is not a duplicate.
  • [X] I have provided sufficient information.

Randomblock1 avatar Aug 23 '22 21:08 Randomblock1

Currently, direct image upload doesn't support pagination, which would be nice to have.

I have an idea how to fix this using the fingerprint that gets returned (redirected to) by searchbyimage/upload. https://github.com/Emilundpixeln/google-this-ris-preview-img/commit/17ee8911d6999ce797b999b8ba71d4a2011a6711

Emilundpixeln avatar Sep 21 '22 03:09 Emilundpixeln

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Nov 21 '22 03:11 github-actions[bot]