Greasy Fork is available in English.

Google Images direct link

NOTE: Since July 2016 this script is unmaintained. It is here just for historical purposes and to let other people fork it. Adds direct links to images and pages in google image search

< Отзив за Google Images direct link

Въпрос/коментар

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

Version 7 does not work with "search by image"

sample link: http://tinyurl.com/gu5v58u

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

I can attest

Deleted user 128
§
Публикуван на: 09.04.2016

Confirmed

Lorentz83Автор
§
Публикуван на: 09.04.2016

It is one of the feature lost during the code rewriting. I'll work on it the next days.
Thank you for the report

§
Публикуван на: 11.04.2016
Редактиран на: 11.04.2016

Tested and Work perfect, thanks.
Can you add in the description of the script an quick explanation about how it work:
It is very simple but the first time i use it i wanted find an icon "direct to the page link" or "direct to the image"
:-)


Report just a little bug on a a result.

If you search:
https://www.google.fr/search?q=rose&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjulZLx4YXMAhXEfRoKHUVICx4Q_AUIBygB

The 5th "rose" image direct link - Résultat de recherche d'images pour "rose"
2272 × 1704 - l-unite.ning.com - send to a 404 page:
https://upload.wikimedia.org/wikipedia/commons/5/51/Small_Red_Rose.JPG%3Fwidth%3D570?iact=rc&uact=3&page=1&start=0&ndsp=47&ved=0ahUKEwjw6q314oXMAhWBnA8KHeLsDKUQMwg6KAQwBA

Without your script , we can see the result as usual:
http://images.google.fr/imgres?imgurl=http://upload.wikimedia.org/wikipedia/commons/5/51/Small_Red_Rose.JPG%253Fwidth%253D570&imgrefurl=http://l-unite.ning.com/xn/detail/6449619:Topic:165692&h=1704&w=2272&tbnid=vvzCDxby-i-RLM:&docid=2vhyR8cxPqJQLM&ei=7ywLV4KDAsXuO7SkvNgF&tbm=isch

I am on firefox / win7
I tested with and without GoogleMonkeyR (Kilvoctu version)

Lorentz83Автор
§
Публикуван на: 11.04.2016

@decembre thank you for the report, but for the next time consider opening a new thread when your problem is not related to the one already discussed.

By the way, unfortunately google customizes the results according to your location, therefore using your search I cannot find the image you mention. But it should be the first one in this search.
http://bit.ly/1VN6PlA
Can you check if it works?
I had in the past problems with non-ascii characters in the urls, but it seems working now.


To all the others, the old code works almost out of the box, I just want to do few minor tweaks and more testing, but I should be able to reintroduce the feature very soon.

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

Thank you Lorentz!

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

" But it should be the first one in this search.
http://bit.ly/1VN6PlA":
yes that's this one and the direct link don't work for me ....

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

It works for me. Maybe something else in your FF profile conflicts with SBI?

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

I need to see that ....

Lorentz83Автор
§
Публикуван на: 13.04.2016

@decembre these encoding problems are very hard to debug, because they depend on many different environment variables.
My suggestion is that you try creating a new profile and installing only greasemonkey and my script. If it works, then you install one by one all the other extensions and scripts you use until you find the one that conflicts. If it doesn't I need as many details you can give me to try to reproduce the error, because if I cannot reproduce it I cannot fix it.

To everyone else, sorry but these are very busy days, I'll publish the new version as soon as I have a little time to polish it.

§
Публикуван на: 15.04.2016
Редактиран на: 15.04.2016

:-)
Tested on a fresh profile with firefox 45.0.2 (with only greasemonkey and profile switcher addon)
and firefox Beta 46.0b 10 (with very few addon enable and only about firefox aspect ).
I have always the same problem on this Rose":
Error message:
"404 Not Found
The resource could not be found.
File not found: /v1/AUTH_mw/wikipedia-commons-local-public.51/5/51/Small_Red_Rose.JPG%3Fwidth%3D570 "


Here With Google Image Direct Link (.newcont) in firebug:




Résultat de recherche d'images pour
Lorentz83Автор
§
Публикуван на: 15.04.2016

To everyone, the visually similar search has been fixed in 7.1.

@decembre the problem I see is that part of the google url remains inside the image url. I need some extra details to understand better what is the problem and why it happens only to you.
You can try to disable the script and give me the url google links from that image. Copy it with right click and "copy link location", because the one you see in the url bar after clicking on the image may be changed by a redirect.
And since you know how to use firebug, you can try adding this line
console.log(url, par)
before the last return in parseUrl and check on the firebug console what is the value returned for that image.
The problem must be in that function, which splits the original url to find the two different links. In your case the split goes wrong for some reason I don't understand.

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

Firefox 46 Beta:
The url google links from that image (Script disable):
http://upload.wikimedia.org/wikipedia/commons/5/51/Small_Red_Rose.JPG%3Fwidth%3D570


I add your line here, that's correct ?:
var parseUrl = function (url) {
var pos = url.indexOf('?');
if (pos < 0) {
console.log(url, par)
return {};
}


If it's that, i don't see something useful (for me) in the console...
Nothing related to your script i think :
What and where in the console i need to search ?
Sorry, I am not an expert , right?
;-)

Lorentz83Автор
§
Публикуван на: 16.04.2016

Yes, sorry, I didn't explain it too detailed because I assumed you were already expert :)

Let's be more precise.

You put that function in the wrong place (there are two "return"s). The right code is this:
var parseUrl = function (url) {
var pos = url.indexOf('?');
if (pos < 0) {
return {};
}
var qparms = url.substring(pos + 1);
var rawparams = qparms.split('&');
var par = {};
for (var i = 0; i < rawparams.length; i++) {
var p = rawparams[i].split('=');
var key = decodeURIComponent(p[0]);
var value = decodeURIComponent(p[1]);
par[key] = value;
}
console.log('copy this',url, par)
return par;
}

and copy from the console the line that starts with 'copy this' and contains the link of the image which creates problem (they are ordered, so if you use my search it should be the first one you see). In doubt copy all of them, I'll find the right one.

While I need the url that google uses to identify the image, not the actual image.
Something like
https://www.google.com/imgres?imgurl=http%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%...
When you are in the google search page (with the script disabled) you right click on the image and choose "copy link location".

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

I see something interesting when i want copy this link:

In first i see a link similar to your example, but i can't copy it (too fast).
And after , i see (at the bottom of the page , when i am hover this same link) a quick ref to:
"Wait google-encrypted"
And after that, the link became:
http://upload.wikimedia.org/wikipedia/commons/5/51/Small_Red_Rose.JPG%3Fwidth%3D570

Finally, the link of the image which creates problem (copy in Firebug console):
copy this http://images.google.fr/imgres?imgurl=http://upload.wikimedia.org/wikipedia/commons/5/51/Small_Red_Rose.JPG%253Fwidth%253D570&imgrefurl=http://l-unite.ning.com/xn/detail/6449619:Topic:165692&h=1704&w=2272&tbnid=vvzCDxby-i-RLM:&docid=2vhyR8cxPqJQLM&ei=JnoSV6vFGoeoUYaGmOgB&tbm=isch Object { imgurl="http://upload.wikimedia...._Rose.JPG%3Fwidth%3D570", imgrefurl="http://l-unite.ning.com/...il/6449619:Topic:165692", h="1704", plus...}

Lorentz83Автор
§
Публикуван на: 19.04.2016

@decembre, I found the problem. We are acutally using two different versions of google images. If you change that url from google.fr to google.com you can probably notice it by yourself (or probably not, google changes the results also according to your location). The problem you describe is the behavior of the old version. Therefore it will probably be fixed as soon as goolge rolls over the new version to all the countries. If in a couple of weeks it still doesn't work I can start working on a fix. But considering that I cannot reproduce the bug (even visiting google.fr) I'll need your help in debugging.

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

;-)

§
Публикуван на: 26.04.2016
Редактиран на: 26.04.2016

:blush:
Another probably problem:
I tested this famous search "rose" with the encrypted version of google and when i click on a result (image or links), it re-open the same google results page:

https://encrypted.google.com/search?q=rose&biw=1920&bih=916&noj=1&tbm=isch&tbo=u&source=univ&sa=X&ved=0ahUKEwjd4-e0n6vMAhVBvRoKHT6rANAQ7AkIKA

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

I think it's just slow. Wait a bit before clicking.
(You can tell that it hasn't finished loading by the fact that pointing at the page link does not change the cursor).

§
Публикуван на: 26.04.2016
Редактиран на: 26.04.2016

I let it open a long time and no change.
I thinks it's more an incompatibility with:
GM : Linkify Plus Plus

If i disable it , your script work like a charm...
:smile:

PS:
About the first problem about this rose image:
It open perfectly with encrypted google...

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

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