HEmile / obsidian-search-on-internet

Add context menu items in Obsidian to search the internet.
https://publish.obsidian.md/semantic-obsidian/Search+on+Internet+Plugin
108 stars 7 forks source link

Google not working #5

Open nhaouari opened 3 years ago

nhaouari commented 3 years ago

Hey, Thank you for the plugin, it works like a charm for other websites but for google I get the following error:

image

Environment:

HEmile commented 3 years ago

Hi! Are you using the default query for Google or have you modified it?

nhaouari commented 3 years ago

Hi! Are you using the default query for Google or have you modified it?

I use the default query for google.

HEmile commented 3 years ago

Hi! Is this still an issue :)?

nhaouari commented 3 years ago

I have updated Obsidian to version 0.11.1, unfortunately, there is another error:

webhp:130 Blocked autofocusing on a <input> element in a cross-origin subframe.

image

HEmile commented 3 years ago

Hi, you don't seem to be using the correct query for Google. It should be https://www.google.com/search?&q={{query}}, not https://www.google.com/search{{query}}

nhaouari commented 3 years ago

https://www.google.com/search?&q={{query}}

I have tried many alternatives, with google, it always shows a page that looks like this: image

phibr0 commented 3 years ago

same error for me

kinoc commented 3 years ago

I had a problem with patents.google.com, where it seemed to execute the query, but "{{query}}" was displayed in the search box.

https://patents.google.com/?q={{query}}&oq={{query}}

I changed it to the following and it seem to both execute the query and display it in the search box.

https://patents.google.com/?q={{query}}&oq={{title}}

Maybe it was only doing one replace for each substitution, so it only did one for each possibility (limit one per string). The regular search

https://www.google.com/search?&q={{query}}

appears to work for me.

HEmile commented 3 years ago

@kinoc Indeed, that's a bug on my part: It only replaces {{query}} a single time and {{title}} a single time... So I'm impressed you found that workaround...! I didn't realize this would be something common.

@nhaouari @phibr0 The error you're getting is the cookie screen of Google. I think you might be able to work around this by accepting the cookies on another Google site, like calendar. Otherwise, you'll have to do with eg DuckDuckGo