[fix] bing engine: query string only support 2 letter language code

The 'language:xx' query string in the request() function does only support the 2
letter language codes from the "Display languages" list.

Examples of items from the "Display languages" not sopported in the query
string:

  pt-BR, pt-BR, mn-Cyrl-MN, chr-cher, zh-Hans, ha-latn, ca-es-valencia

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2022-04-10 15:43:41 +02:00
parent 864aeebc2f
commit d97e1a479f
3 changed files with 64 additions and 83 deletions

View file

@ -4,14 +4,13 @@
"am",
"ar",
"as",
"az-latn",
"az",
"be",
"bg",
"bn",
"bs-latn",
"bs",
"ca",
"ca-es-valencia",
"chr-cher",
"chr",
"cs",
"cy",
"da",
@ -29,7 +28,7 @@
"gd",
"gl",
"gu",
"ha-latn",
"ha",
"he",
"hi",
"hr",
@ -46,7 +45,7 @@
"kn",
"ko",
"kok",
"ku-arab",
"ku",
"ky",
"lb",
"lo",
@ -55,7 +54,7 @@
"mi",
"mk",
"ml",
"mn-Cyrl-MN",
"mn",
"mr",
"ms",
"mt",
@ -65,29 +64,26 @@
"nn",
"nso",
"or",
"pa-arab",
"pa-guru",
"pa",
"pl",
"prs",
"pt-BR",
"pt-PT",
"pt",
"quc",
"quz",
"ro",
"ru",
"rw",
"sd-arab",
"sd",
"si",
"sk",
"sl",
"sq",
"sr-cyrl",
"sr-latn",
"sr",
"sv",
"sw",
"ta",
"te",
"tg-cyrl",
"tg",
"th",
"ti",
"tk",
@ -97,13 +93,12 @@
"ug",
"uk",
"ur",
"uz-latn",
"uz",
"vi",
"wo",
"xh",
"yo",
"zh-Hans",
"zh-Hant",
"zh",
"zu"
],
"bing images": [
@ -111,14 +106,13 @@
"am",
"ar",
"as",
"az-latn",
"az",
"be",
"bg",
"bn",
"bs-latn",
"bs",
"ca",
"ca-es-valencia",
"chr-cher",
"chr",
"cs",
"cy",
"da",
@ -136,7 +130,7 @@
"gd",
"gl",
"gu",
"ha-latn",
"ha",
"he",
"hi",
"hr",
@ -153,7 +147,7 @@
"kn",
"ko",
"kok",
"ku-arab",
"ku",
"ky",
"lb",
"lo",
@ -162,7 +156,7 @@
"mi",
"mk",
"ml",
"mn-Cyrl-MN",
"mn",
"mr",
"ms",
"mt",
@ -172,29 +166,26 @@
"nn",
"nso",
"or",
"pa-arab",
"pa-guru",
"pa",
"pl",
"prs",
"pt-BR",
"pt-PT",
"pt",
"quc",
"quz",
"ro",
"ru",
"rw",
"sd-arab",
"sd",
"si",
"sk",
"sl",
"sq",
"sr-cyrl",
"sr-latn",
"sr",
"sv",
"sw",
"ta",
"te",
"tg-cyrl",
"tg",
"th",
"ti",
"tk",
@ -204,13 +195,12 @@
"ug",
"uk",
"ur",
"uz-latn",
"uz",
"vi",
"wo",
"xh",
"yo",
"zh-Hans",
"zh-Hant",
"zh",
"zu"
],
"bing news": [
@ -218,14 +208,13 @@
"am",
"ar",
"as",
"az-latn",
"az",
"be",
"bg",
"bn",
"bs-latn",
"bs",
"ca",
"ca-es-valencia",
"chr-cher",
"chr",
"cs",
"cy",
"da",
@ -243,7 +232,7 @@
"gd",
"gl",
"gu",
"ha-latn",
"ha",
"he",
"hi",
"hr",
@ -260,7 +249,7 @@
"kn",
"ko",
"kok",
"ku-arab",
"ku",
"ky",
"lb",
"lo",
@ -269,7 +258,7 @@
"mi",
"mk",
"ml",
"mn-Cyrl-MN",
"mn",
"mr",
"ms",
"mt",
@ -279,29 +268,26 @@
"nn",
"nso",
"or",
"pa-arab",
"pa-guru",
"pa",
"pl",
"prs",
"pt-BR",
"pt-PT",
"pt",
"quc",
"quz",
"ro",
"ru",
"rw",
"sd-arab",
"sd",
"si",
"sk",
"sl",
"sq",
"sr-cyrl",
"sr-latn",
"sr",
"sv",
"sw",
"ta",
"te",
"tg-cyrl",
"tg",
"th",
"ti",
"tk",
@ -311,13 +297,12 @@
"ug",
"uk",
"ur",
"uz-latn",
"uz",
"vi",
"wo",
"xh",
"yo",
"zh-Hans",
"zh-Hant",
"zh",
"zu"
],
"bing videos": [
@ -325,14 +310,13 @@
"am",
"ar",
"as",
"az-latn",
"az",
"be",
"bg",
"bn",
"bs-latn",
"bs",
"ca",
"ca-es-valencia",
"chr-cher",
"chr",
"cs",
"cy",
"da",
@ -350,7 +334,7 @@
"gd",
"gl",
"gu",
"ha-latn",
"ha",
"he",
"hi",
"hr",
@ -367,7 +351,7 @@
"kn",
"ko",
"kok",
"ku-arab",
"ku",
"ky",
"lb",
"lo",
@ -376,7 +360,7 @@
"mi",
"mk",
"ml",
"mn-Cyrl-MN",
"mn",
"mr",
"ms",
"mt",
@ -386,29 +370,26 @@
"nn",
"nso",
"or",
"pa-arab",
"pa-guru",
"pa",
"pl",
"prs",
"pt-BR",
"pt-PT",
"pt",
"quc",
"quz",
"ro",
"ru",
"rw",
"sd-arab",
"sd",
"si",
"sk",
"sl",
"sq",
"sr-cyrl",
"sr-latn",
"sr",
"sv",
"sw",
"ta",
"te",
"tg-cyrl",
"tg",
"th",
"ti",
"tk",
@ -418,13 +399,12 @@
"ug",
"uk",
"ur",
"uz-latn",
"uz",
"vi",
"wo",
"xh",
"yo",
"zh-Hans",
"zh-Hant",
"zh",
"zu"
],
"dailymotion": [