ContextSearch-web-ext icon indicating copy to clipboard operation
ContextSearch-web-ext copied to clipboard

Websites where the Add Custom Search fails

Open ssborbis opened this issue 7 years ago • 120 comments

If you come across any sites / forms that don't work with the Add Custom Search function, list them here. I have some workarounds in mind, but I need more examples.

news.google.com - main search form

ssborbis avatar Jul 10 '18 06:07 ssborbis

Other examples: cnil.fr jesuismort.com

Note: The "Find" button in advanced mode (search on MycroftProject) doesn't work (version 1.6.3).

DenB10 avatar Jul 10 '18 09:07 DenB10

Note: The "Find" button in advanced mode (search on MycroftProject) doesn't work (version 1.6.3).

Thanks. 1.6.3.1 going up. Dunno how some of this stuff gets by me and the linter

ssborbis avatar Jul 10 '18 09:07 ssborbis

Ok, new code works for those websites. Should work with all non-standard search forms using GET

ssborbis avatar Jul 12 '18 08:07 ssborbis

Works fine :) But tooltip "PerformASearchTooltip" doesn't appear!

DenB10 avatar Jul 12 '18 12:07 DenB10

But tooltip "PerformASearchTooltip" doesn't appear!

This is driving me nuts. I can't find the problem.

ssborbis avatar Jul 12 '18 13:07 ssborbis

nevermind, got it

ssborbis avatar Jul 12 '18 14:07 ssborbis

http://context.reverso.net/translation/

sojusnik avatar Aug 11 '18 16:08 sojusnik

http://context.reverso.net/translation/

Fix ready

ssborbis avatar Aug 11 '18 22:08 ssborbis

https://www.similarweb.com/

sojusnik avatar Aug 13 '18 07:08 sojusnik

Same fix seems to work for that one too. I'll get a new release in the next couple days

ssborbis avatar Aug 13 '18 07:08 ssborbis

After upgrading to version 1.7.0, it stopped working:

http://chomikuj.pl/action/SearchFiles

screen

But it works in version 1.6.9.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

This, for example, does not work either:

https://www.gry-online.pl/szukaj.asp

screen2

And there are more such search engines.

Tubelerczyk avatar Aug 16 '18 08:08 Tubelerczyk

Can confirm that with ContextSearch 1.7.0 on Firefox 61.0.1.

While all OpenSearch engine work fine, f.i. when searching from the address bar, some of the ContextSearch ones aren't. Here's a screenshot of one of them.

sojusnik avatar Aug 16 '18 08:08 sojusnik

I have Firefox version 61.0.2 (64bit). The 1.6.9 version of the plugin works well on this Firefox. Version 1.7.0 does not support some search engines. For now I am using version 1.6.9.

Tubelerczyk avatar Aug 16 '18 09:08 Tubelerczyk

hotfix going up 1.7.0.1

ssborbis avatar Aug 16 '18 10:08 ssborbis

https://who-called.co.uk/

GlasWolf avatar Sep 11 '18 12:09 GlasWolf

https://who-called.co.uk/

That site adds ok for me. It uses the alternative 'do a search' method, but it added. What happens when you try?

ssborbis avatar Sep 11 '18 18:09 ssborbis

That's odd - it worked this time. When I tried earlier it threw up an error, very roughly "ContextSearch was unable to create a search entry for that website".

Not wanting to hijack this thread but is there any way to simulate a search done from the search box, rather than simply insert the search term into the URL? Phone numbers are usually shown formatted with spaces, so that method doesn't work.

Oh and thanks for getting back to me!

GlasWolf avatar Sep 11 '18 18:09 GlasWolf

is there any way to simulate a search done from the search box, rather than simply insert the search term into the URL? Phone numbers are usually shown formatted with spaces, so that method doesn't work.

I'm not sure I know what you mean.

For that particular website, I see it will remove spaces and hyphens, effective defeating my fallback code which checks the url for the search terms. So if you entered 1-234-567-8910 the search results url would be https://who-called.co.uk/Number/12345678910 and my code wouldn't be able to pick out the search terms. I can't account for that kind of processing, be it client-side via javascript or server-side.

ssborbis avatar Sep 11 '18 21:09 ssborbis

Basically I want to be able to highlight and ContextSearch phone numbers which include hyphens and spaces. The {searchTerms} method gives a 404 but, as you say, the site's own search function automatically strips them. Can that be replicated somehow, maybe using POST?

GlasWolf avatar Sep 11 '18 21:09 GlasWolf

Ah, I see. I just tried a highlight search for 1-234-567-8910 and got the 404 error. I'd have to write some site-specific code or add an option for each engine to modify the search terms with a regex rule. Doable, but a bit time-consuming for a rare issue.

You might want to enable 'Manage With Bookmarks' and add a bookmarklet to the ContextSearch Menu folder with the following code as the URL. It won't be 100% what you want, but you'll be able to access it via ContextSearch

javascript:q = "" + (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text); if (q!=null) location="https://who-called.co.uk/Number/" + escape(q).replace(/[^0-9]/g, ""); void 0

or

javascript:q = "" + (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text); if (q!=null) window.open("https://who-called.co.uk/Number/" + escape(q).replace(/[^0-9]/g, ""), "_blank"); void 0

for opening in a new tab (popup blocker risk)

ssborbis avatar Sep 11 '18 22:09 ssborbis

Great idea to use bookmarklets. Edited the replace term to replace(/%25\d\d|[^\d]/g, "") to remove character codes, and it works perfectly - thanks so much for your help!

GlasWolf avatar Sep 12 '18 10:09 GlasWolf

@GlasWolf I've added a regex option to modify search terms for each engine. Look for it in the next release.

ssborbis avatar Sep 14 '18 02:09 ssborbis

Even easier! I'll check it out when it appears, thanks again.

GlasWolf avatar Sep 14 '18 20:09 GlasWolf

New regex option is live in 1.8.1. I tested the search engine for https://who-called.co.uk/ using the search regex "%25\\d\\d|[^\\d]", "" and it seems to work. I didn't actually get a proper result due to my ip being blocked (VPN) but the url looked good

searched for 1-234-567-8910 resulting url https://who-called.co.uk/Number/12345678910

ssborbis avatar Nov 01 '18 06:11 ssborbis

This professional medicines search engine uses the POST method. Would it be possible to add it to your complement? Thank you https://cima.aemps.es/cima/publico/buscadoravanzado.html

ernestobarrera avatar Nov 05 '18 11:11 ernestobarrera

@ebluser

I looked at https://cima.aemps.es/cima/publico/buscadoravanzado.html and I don't think it can work with ContextSearch. It seems to use javascript to fetch .json using a REST API.

You could, for example, use a template like this:

https://cima.aemps.es/cima/rest/medicamentos?multiple2={searchTerms}&cargaprincipiosactivos=true&nomostrarip=1&comerc=1

... and search for ABFENTIQ to receive this result: https://cima.aemps.es/cima/rest/medicamentos?multiple2=ABFENTIQ&cargaprincipiosactivos=true&nomostrarip=1&comerc=1

... but that .json may not be helpful to you.

ssborbis avatar Nov 05 '18 12:11 ssborbis

@ebluser

I looked at https://cima.aemps.es/cima/publico/buscadoravanzado.html and I don't think it can work with ContextSearch. It seems to use javascript to fetch .json using a REST API.

You could, for example, use a template like this:

https://cima.aemps.es/cima/rest/medicamentos?multiple2={searchTerms}&cargaprincipiosactivos=true&nomostrarip=1&comerc=1

... and search for ABFENTIQ to receive this result: https://cima.aemps.es/cima/rest/medicamentos?multiple2=ABFENTIQ&cargaprincipiosactivos=true&nomostrarip=1&comerc=1

... but that .json may not be helpful to you. Indeed, it is not. However, ContestSearch has been able to include other search engines with post method. If you could define technical specifications or prerequisites for ContestSearch, it might be useful if the search engine developers could include improvements. Thanks!

ernestobarrera avatar Nov 06 '18 09:11 ernestobarrera

@ebluser

Indeed, it is not. However, ContestSearch has been able to include other search engines with post method. If you could define technical specifications or prerequisites for ContestSearch, it might be useful if the search engine developers could include improvements. Thanks!

I'm not seeing where that engine uses POST. I'm looking at the network logs and only see GET requests to the REST API. Do you have a POST request I could look at?

ssborbis avatar Nov 06 '18 10:11 ssborbis

I'm not seeing where that engine uses POST. I'm looking at the network logs and only see GET requests to the REST API. Do you have a POST request I could look at?

Sorry, I misinterpreted the behaviour of this search engine. Thanks again for the analysis and for the firefox add-on.

ernestobarrera avatar Nov 06 '18 16:11 ernestobarrera

If you come across any sites / forms that don't work with the Add Custom Search function, list them here.

yandex.translate:

  1. entered text
  2. web page

githubeing avatar Mar 07 '19 11:03 githubeing