summaryrefslogtreecommitdiff
path: root/searx/engines/google.py
AgeCommit message (Collapse)Author
2021-04-19Merge remote-tracking branch 'searx/master'Alexandre Flament
2021-04-11Fix grammar mistake in debug log outputRobin Schneider
2021-04-10[enh] replace requests by httpxAlexandre Flament
2021-02-01[mod] dynamically set language_support variableAlexandre Flament
The language_support variable is set to True by default, and set to False in only 5 engines. Except the documentation and the /config URL, this variable is not used. This commit remove the variable definition in the engines, and set value according to supported_languages length: False when the length is 0, True otherwise. Close #2485
2021-01-28[fix] google: avoid unnecessary SearxEngineXPathException errorsMarkus Heiser
Avoid SearxEngineXPathException errors when parsing non valid results:: .//div[@class="yuRUbf"]//a/@href index 0 not found Traceback (most recent call last): File "./searx/engines/google.py", line 274, in response url = eval_xpath_getindex(result, href_xpath, 0) File "./searx/searx/utils.py", line 608, in eval_xpath_getindex raise SearxEngineXPathException(xpath_spec, 'index ' + str(index) + ' not found') searx.exceptions.SearxEngineXPathException: .//div[@class="yuRUbf"]//a/@href index 0 not found Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-01-28[fix] normalize the language & region aspects of all google enginesMarkus Heiser
BTW: make the engines ready for search.checker: - replace eval_xpath by eval_xpath_getindex and eval_xpath_list - google_images: remove outer try/except block Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-01-22[fix] revise of the google-news engineMarkus Heiser
This revise is based on the methods developed in the revise of the google engine (see commit 410c2f9). Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-01-14[enh] engines: add about variableAlexandre Flament
move meta information from comment to the about variable so the preferences, the documentation can show these information
2020-12-03[mod] various engines: use eval_xpath* functions and searx.exceptions.*Alexandre Flament
Engine list: ahmia, duckduckgo_images, elasticsearch, google, google_images, google_videos, youtube_api
2020-10-02[mod] move extract_text, extract_url to searx.utilsAlexandre Flament
2020-10-01[fix] google engine - div classes has been renamed in HTML reultMarkus Heiser
Since 1. October 2020 google has changed the 'class' attribute of the HTML result page. Fix the xpath expressions and ignore <div class="g" ../> sections which do not match to title's xpath expression. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-09-22fetch google's search langs rather than ui langsMarc Abonce Seguin
2020-09-10Drop Python 2 (1/n): remove unicode string and url_utilsDalf
2020-07-08[fix] pep8Adam Tauber
2020-07-07[fix] revise google engineMarkus Heiser
this commit is picked from #1985
2019-12-07[fix] update xpaths for new google results pageMarc Abonce Seguin
2019-12-02Merge pull request #1744 from dalf/optimizationsAdam Tauber
[mod] speed optimization
2019-11-22[fix] Force Google old UI with a new user agentEmilien Devos
2019-11-15[mod] speed optimizationDalf
compile XPath only once avoid redundant call to urlparse get_locale(webapp.py): avoid useless call to request.accept_languages.best_match
2019-05-29[fix] Force Google old UI (#1597)Emilien Devos
2019-01-07Revert "remove 'all' option from search languages"Noémi Ványi
This reverts commit 4d1770398a6af8902e75c0bd885781584d39e796.
2019-01-06[fix] fetch google's supported languagesMarc Abonce Seguin
2019-01-06[fix] check language aliases when setting search languageMarc Abonce Seguin
2018-04-18[fix] force English results in Google when using en-USMarc Abonce Seguin
2018-03-27refactor engine's search language handlingMarc Abonce Seguin
Add match_language function in utils to match any user given language code with a list of engine's supported languages. Also add language_aliases dict on each engine to translate standard language codes into the custom codes used by the engine.
2018-03-20fix fetch_langauges to be more accurateMarc Abonce Seguin
Add languages supported by either all default general engines or 10 engines.
2017-12-18send constant cookie with query to GoogleNoémi Ványi
2017-12-06remove 'all' option from search languagesmarc
2017-12-05[fix] handle /sorry redirectsAdam Tauber
2017-11-22[fix] use english in google engine if no language was set - this prevents ↵Adam Tauber
guessing the language by the IP of the instance
2017-11-22[fix] revert language changes to prevent CAPTCHAsAdam Tauber
2017-11-21[fix] fix language support of googleAdam Tauber
2017-05-15[enh] py3 compatibilityAdam Tauber
2017-01-27[enh] add result number parsing to google engineAdam Tauber
2017-01-16[enh] show spelling correctionsDavid A Roberts
2017-01-05[enh] add instant answers to google engineAdam Tauber
2016-12-15tests for _fetch_supported_languages in enginesmarc
and refactor method to make it testable without making requests
2016-12-13[mod] fetch supported languages for several enginesmarc
utils/fetch_languages.py gets languages supported by each engine and generates engines_languages.json with each engine's supported language.
2016-12-13filter langaugesmarc
2016-12-13[enh] add supported_languages on engines and auto-generate languages.pymarc
2016-12-11add year to time range to engines which support "Last year"Noémi Ványi
Engines: * Bing images * Flickr (noapi) * Google * Google Images * Google News
2016-12-09[mod] do not escape html content in enginesAdam Tauber
2016-07-26[fix] time range detectionAdam Tauber
2016-07-25add time range search for googleNoemi Vanyi
2016-07-11Fix anomalous backslash in stringstepshal
2016-04-14Merge pull request #526 from ukwt/animeAdam Tauber
Add a few search engines
2016-04-13Fix a few typos in Google search engineKirill Isakov
2016-03-25[fix] no more redirect ++ explicitly specify search language to avoid ↵Adam Tauber
googles ip based heuristics
2016-01-18[fix] temporary disable googles inner links - #491Adam Tauber
2016-01-10[fix] google markup change - closes #489Adam Tauber