diff options
-rw-r--r-- | res/values/all_search_engines.xml | 6 | ||||
-rwxr-xr-x | tools/get_search_engines.py | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/res/values/all_search_engines.xml b/res/values/all_search_engines.xml index 3a17bd9f..08cf7631 100644 --- a/res/values/all_search_engines.xml +++ b/res/values/all_search_engines.xml @@ -206,11 +206,11 @@ http://www.opensearch.org/Specifications/OpenSearch/1.1/Draft_4#OpenSearch_1.1_p </string-array> <string-array name="google" translatable="false"> <item>Google</item> - <item></item> + <item>google.com</item> <item>http://www.google.com/favicon.ico</item> - <item>{google:baseURL}search?{google:RLZ}{google:acceptedSuggestion}{google:originalQueryForSuggestion}sourceid=chrome&ie={inputEncoding}&q={searchTerms}</item> + <item>http://www.google.com/m?hl={language}&ie={inputEncoding}&source=android-browser&q={searchTerms}</item> <item>UTF-8</item> - <item>{google:baseSuggestURL}search?client=chrome&hl={language}&q={searchTerms}</item> + <item>http://www.google.com/complete/search?hl={language}&json=true&q={searchTerms}</item> </string-array> <string-array name="bing_en_NZ" translatable="false"> <item>Bing</item> diff --git a/tools/get_search_engines.py b/tools/get_search_engines.py index 2eecec3a..cd73423c 100755 --- a/tools/get_search_engines.py +++ b/tools/get_search_engines.py @@ -37,6 +37,12 @@ locales = ["cs-CZ", "da-DK", "de-AT", "de-CH", "de-DE", "el-GR", "en-AU", "it-IT", "ja-JP", "ko-KR", "nb-NO", "nl-BE", "nl-NL", "pl-PL", "pt-PT", "pt-BR", "ru-RU", "sv-SE", "tr-TR", "zh-CN", "zh-HK", "zh-MO", "zh-TW"] +google_data = ["google", "Google", "google.com", + "http://www.google.com/favicon.ico", + "http://www.google.com/m?hl={language}&ie={inputEncoding}&source=android-browser&q={searchTerms}", + "UTF-8", + "http://www.google.com/complete/search?hl={language}&json=true&q={searchTerms}"] + class SearchEngineManager(object): """Manages list of search engines and creates locale specific lists. @@ -92,6 +98,10 @@ class SearchEngineManager(object): except that the internal name of the search engine is inserted at the beginning of the list. """ + + if name == "google": + return google_data + # Find the first occurance of this search engine name in the form # " <name> =" in the chrome data file. re_exp = '\s' + name + '\s*=' |