Дискусии » Разработка

How can do an image search on "ascii2d.net"?

§
Публикуван на: 17.04.2015

How can do an image search on "ascii2d.net"?

How can do an image search on "ascii2d.net"?

On Google it is done like so:
http://google.com/searchbyimage?hl=en&site=search&image_url=https://i.imgur.com/RqikjW1.jpg

On 'Generic Image Viewer', currently supporting:

  • Google
  • IQDB
  • ImgOps
  • SauceNAO
  • TinEye

If you can think of any other reverse image search sites I can add, share.

Another problem, how I can stop Google redirection for the search above?

Thanks

woxxomМод
§
Публикуван на: 17.04.2015

image search on "ascii2d.net"?

GM_xmlhttpRequest({
  method: 'POST',
  url: 'http://ascii2d.net/imagesearch/search',
  data: 'uri=https://i.imgur.com/RqikjW1.jpg',
  headers: {'Content-Type': 'multipart/form-data'},
  onload: function(r) {
    //parse r.responseText
  }
});

stop Google redirection for the search above

Some details/example, please.

§
Публикуван на: 18.04.2015

Thank you.
I actually was hoping a URL similar to google. So there no actual way to do it through URL bar, I have to use xmlhttprequest? (Typing this in URL bar, does not work.)

As to google example. If you click on the link below and you do not live in the USA and have no cookies, you get a 302 and get redirected to your local top domain.

Example the link below:
http://google.com/searchbyimage?hl=en&site=search&image_url=https://i.imgur.com/RqikjW1.jpg

get redirected to the UK domain.
http://google.co.uk/searchbyimage?hl=en&site=search&image_url=https://i.imgur.com/RqikjW1.jpg

woxxomМод
§
Публикуван на: 18.04.2015
Редактиран на: 18.04.2015

So there no actual way to do it through URL bar

That site uses POST search method, so I guess no other way. Unless there is some proxy service that converts GET searches to POST.

redirected to your local top domain

If GM_xmlhttpRequest could be used then try to set google's "no country redirect" cookie for the request. To get the cookie, open https://www.google.com/ncr (delete the cookies before opening) and I guess it'll be there...

§
Публикуван на: 19.04.2015

Thank you again. :)

Публикувайте отговор

Влезте, за да публикувате отговор.