Sign up | Lost password? | Help

[ advanced search ]

Enabling google's I'm feeling lucky search after failed url attempt.

Forums » Opera Community » General Opera topics » Customizing Opera

Thursday, 22. June 2006, 17:30:02

shoust

Operaised

avatar

Posts: 3012

United Kingdom

Enabling google's I'm feeling lucky search after failed url attempt.

In opera 9 , its possible if you look in opera:config

opera:config#Network|EnableHostNameWebLookup

First tick that option, then if you don't want opera to search for domains .. untick "Enable Hostname expansion".

opera:config#Network|HostNameWebLookupAddress

Then enter an address in this field, remembering that %s is the search variable (I used googles I'm feeling lucky option).

http://www.google.com/search?hl=en&q=%s&btnI=I'm+Feeling+Lucky


And voila! A proper search after a failed url attempt!

Saturday, 24. June 2006, 14:05:37

Indyan

avatar

Posts: 455

India

Good trick.
Spotlighted

Tuesday, 26. September 2006, 14:36:24

Jadd

Red beast

avatar

Posts: 173

I didn't get what this tip was supposed to do at first, but now I do. (It's to go to a site using google search as if you clicked on I'm feeling lucky).
Thanks for this!:up:

Tuesday, 26. September 2006, 22:26:27

shoust

Operaised

avatar

Posts: 3012

United Kingdom

I suggest if you want to search multiple words, instead of putting space between them, put a + between them

Tuesday, 17. October 2006, 10:52:47

Cool 'n' Casua

New kid on the block!

avatar

Posts: 42

New Delhi, India

This does not do anything. I clicked the first link, unchecked 'Enable Hostname Expansion', checked 'Enable HostName Web Lookup' and saved the settings. Then I went to the second link, entered the URL you gave in the 'HostName Web Lookup Address' and saved it. Then I relaunched Opera and entered 'aayush+arya' in the search field (without the apostrophes). For a long time, it showed 'Looking up hostname www.aayush+arya.com...' and then showed the following error:

Error!
The address is not available from this machine.

You tried to access the address http://aayush+arya/, which is currently unavailable. Please make sure that the Web address (URL) is correctly spelled and punctuated, then try reloading the page.
Make sure your Internet connection is active and check whether other applications that rely on the same connection are working.
Check that the setup of any Internet security software is correct and does not interfere with ordinary Web browsing.
If you are behind a firewall on a Local Area Network and think this may be causing problems, talk to your systems administrator.
Try pressing Alt+F12 on your keyboard and disabling proxy servers, unless you know that you are required to use a proxy to connect to the Internet. Reload the page.
Need help?
Open the Opera Help.
Go to Opera's on-line support desk.


What am I doing wrong?

Tuesday, 17. October 2006, 14:21:45

shoust

Operaised

avatar

Posts: 3012

United Kingdom

settings.png


This is my settings section which work for me. Double check these settings with your opera:config to see if you got them alright.

Thursday, 19. October 2006, 09:48:12

Cool 'n' Casua

New kid on the block!

avatar

Posts: 42

New Delhi, India

Thanks! It is very slow but it works. :smile:

Monday, 4. December 2006, 21:19:47

bluephish

avatar

Posts: 14

is there a way to make it work without having to put a "+" between each word?

Tuesday, 5. December 2006, 23:11:00

FataL

Opera freak

avatar

Posts: 1301

USA

It works! :up: Slow but works. Now I should get used to type "+" instead of space...
And lets hope they do something with that issue in next version. :wait:

Sunday, 11. February 2007, 21:04:01 (edited)

Better variant (tnx to Козырь and netsharc)
Open english.lng, find 1150263995. Add this code:
1150263995="contains characters that are not valid in the location they are found."<script type="text/javascript">window.addEventListener('load',function() {var st = document.getElementsByTagName('cite')[0].innerHTML.substr(7); if(window.location.host!='www.google.com'){window.location = 'http://www.google.com/search?client=opera&rls=en&sourceid=opera&ie=utf-8&oe=utf-8&q=' + encodeURIComponent(st.replace(/ /,'+'))};},false)</script>

Sunday, 11. February 2007, 21:04:40 (edited)

And "I'm feeling lucky"
1150263995="contains characters that are not valid in the location they are found."<script type="text/javascript">window.addEventListener("load",function() {var st = document.getElementsByTagName("cite")[0].innerHTML.substr(7); if(window.location.host!="www.google.com"){window.location = "http://www.google.com/search?hl=en&q=" + encodeURIComponent(st.replace(/ /,"+")) + "&btnI=I'm+Feeling+Lucky"};},false)</script>

Tuesday, 20. February 2007, 16:15:36

Lars_M

avatar

Posts: 26

I don't get it. Sorry. Were do I add this code?

Tuesday, 20. February 2007, 20:09:04

In your .lng file. Search string 1150263995 . Add to the end this string
<script type="text/javascript">window.addEventListener("load",function() {var st = document.getElementsByTagName("cite")[0].innerHTML.substr(7); if(window.location.host!="www.google.com"){window.location = "http://www.google.com/search?hl=en&q=" + encodeURIComponent(st.replace(/ /,"+")) + "&btnI=I'm+Feeling+Lucky"};},false)</script>

Sample for English.

Wednesday, 21. February 2007, 08:21:55

Lars_M

avatar

Posts: 26

It works! Thanks alot :-)

Saturday, 24. March 2007, 15:06:19

epilos

avatar

Posts: 1518

excuse me, is there a solution apart from the one stated on the first post?

it doesnt work...

Sunday, 25. March 2007, 11:45:09

epilos

it doesnt work...


That exactly?

Monday, 26. March 2007, 00:15:53

epilos

avatar

Posts: 1518

Originally posted by Lex1:

epilos

it doesnt work...


That exactly?



Originally posted by epilos:

the one stated on the first post


Monday, 26. March 2007, 20:30:52

epilos
This work.

Originally posted by Lex1:

In your .lng file. Search string 1150263995 . Add to the end this string

<script type="text/javascript">window.addEventListener("load",function() {var st = document.getElementsByTagName("cite")[0].innerHTML.substr(7); if(window.location.host!="www.google.com"){window.location = "http://www.google.com/search?hl=en&q=" + encodeURIComponent(st.replace(/ /,"+")) + "&btnI=I'm+Feeling+Lucky"};},false)</script>

Sample for English.

Monday, 26. March 2007, 20:52:43

epilos

avatar

Posts: 1518

can you tell me a version of http://www.google.jp/search?q=s% and without feeling lucky?

thanks

Tuesday, 27. March 2007, 08:56:31

1150263995="contains characters that are not valid in the location they are found."<script type="text/javascript">window.addEventListener('load',function() {var st = document.getElementsByTagName('cite')[0].innerHTML.substr(7); if(window.location.host!='www.google.jp'){window.location = 'http://www.google.jp/search?client=opera&rls=en&sourceid=opera&ie=utf-8&oe=utf-8&q=' + encodeURIComponent(st.replace(/ /,'+'))};},false)</script>

Tuesday, 10. April 2007, 10:27:46

Danltn

avatar

Posts: 58

Originally posted by epilos:

an you tell me a version of http://www.google.jp/search?q=s% and without feeling lucky?



Just go to your search preferences and copy and paste one of those.

Thursday, 26. April 2007, 07:47:15 (edited)

AyushJ

avatar

Posts: 4754

This also works for 0pera 9.20 :yes:

btw, i am using :
http://www.google.com/search?sourceid=navclient&gfns=1&q=%s
How can i put opera between it so google knows an opera user used their search engine.

EDIT-
found it:
http://www.google.com/search?sourceid=opera&gfns=1&q=%s

Friday, 27. April 2007, 03:54:39

Darken

Dragonfly rulez!

avatar

Posts: 356

Canada

Originally posted by AyushJ:

EDIT-found it:http://www.google.com/search?sourceid=opera&gfns=1&q=%s


Thanx for the info. :yes:

Friday, 27. April 2007, 04:49:30

AyushJ

avatar

Posts: 4754

Originally posted by AyushJ:

found it:http://www.google.com/search?sourceid=opera&gfns=1&q=%s



:cry: changing navclient to opera breaks the gfns=1 feature.
try these-
http://www.google.com/search?sourceid=navclient&gfns=1&q=Opera%20Forums

http://www.google.com/search?sourceid=opera&gfns=1&q=Opera%20Forums

Friday, 27. April 2007, 05:22:38

Darken

Dragonfly rulez!

avatar

Posts: 356

Canada

hummmm,... I see.

Friday, 27. April 2007, 14:08:25

shoust

Operaised

avatar

Posts: 3012

United Kingdom

Originally posted by AyushJ:

Originally posted by AyushJ:

found it:http://www.google.com/search?sourceid=opera&gfns=1&q=%s



:cry: changing navclient to opera breaks the gfns=1 feature.
try these-
http://www.google.com/search?sourceid=navclient&gfns=1&q=Opera%20Forums

http://www.google.com/search?sourceid=opera&gfns=1&q=Opera%20Forums




I assume because sourceid=navclient is google itself, meaning there is no reason to show the google page but do google lucky instead. Whereas if say opera or firefox is the sourceid parameter, google might need a way to show its text ads somewhere so it disables google lucky. Try changing it to firefox and you'll see its the same thing.

Saturday, 12. May 2007, 14:53:10

Originally posted by bluephish:

is there a way to make it work without having to put a "+" between each word?


Thanks for the info, everyone, but I second bluephish's request: Can this be made to work with spaces instead of plusses?

Wednesday, 30. May 2007, 19:08:27

lostinmysphere

avatar

Posts: 5

How do you access the .lng file on a mac?

The first method did nothing, but I want to try the one suggested by Lex1. This lack of automatically using I'm Feeling Lucky is compeltely bugging me.

Monday, 4. June 2007, 18:41:41

VJgamer

avatar

Posts: 480

USA

To use this with spaces add this as a search engine:
http://www.google.com/search?hl=en&q=%s&btnI=I'm+Feeling+Lucky

And then set it as your default search engine. The newest version of opera automatically performs searches when more than one word is typed into the address bar. On the downside, it won't work with just one word, but if you combine this with the method above, it will work both ways!

Monday, 4. June 2007, 18:51:36

epilos

avatar

Posts: 1518

mm VJgamer, I didnt get this

you mean you found trigger a normal google search of a word(s) if you type a space in the address bar? either at the begining or at the end?

Monday, 4. June 2007, 20:37:05

VJgamer

avatar

Posts: 480

USA

Opera now does a search when you just type word in the address bar...

For example, typing opera.com will take you to the opera web site, but typing opera web browser will perform a search.

Opera uses your default search. So if you set I'm Feeling Lucky as your default search engine like this:

Tools > Preferences... > Search > Add...

Then make the dialog look like this:
http://i12.tinypic.com/6gmewjq.png

The last part is: http://www.google.com/search?hl=en&q=%s&btnI=I'm+Feeling+Lucky

Wednesday, 30. January 2008, 20:32:43

Hey, guys.

This is a great thread. I use this approach when running Opera in Windows, and it works great. But now I have installed Linux, and I can't get it to work. :frown: I have tried both the original method, as described in the opening post, and the alternative approach by editing the english.lng file.

But to no avail. The address field refuses to search. At least on single words.

Can anyone help? What might I be doing wrong?

Thanks in advance.
- Spectrum

Forums » Opera Community » General Opera topics » Customizing Opera