LuanRT / google-this

A simple yet powerful module to retrieve organic search results and much more from Google.

Home Page:https://www.npmjs.com/package/googlethis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reverse image search: Direct image upload

Randomblock1 opened this issue · 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 'encoded_image=@image.jpg' 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

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

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.
Emilundpixeln@17ee891

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.