2017-03-10 11:19:46 +01:00
|
|
|
DEFAULT_USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)'
|
2015-07-06 07:31:08 +02:00
|
|
|
|
2015-07-17 17:19:16 +02:00
|
|
|
SPECIAL_CASES = {
|
|
|
|
'ee': 'et',
|
|
|
|
}
|
|
|
|
|
2015-07-06 07:31:08 +02:00
|
|
|
LANGUAGES = {
|
|
|
|
'af': 'afrikaans',
|
|
|
|
'sq': 'albanian',
|
2017-08-08 13:42:33 +02:00
|
|
|
'am': 'amharic',
|
2015-07-06 07:31:08 +02:00
|
|
|
'ar': 'arabic',
|
2017-08-08 13:42:33 +02:00
|
|
|
'hy': 'armenian',
|
|
|
|
'az': 'azerbaijani',
|
|
|
|
'eu': 'basque',
|
2015-07-06 07:31:08 +02:00
|
|
|
'be': 'belarusian',
|
2017-08-08 13:42:33 +02:00
|
|
|
'bn': 'bengali',
|
|
|
|
'bs': 'bosnian',
|
2015-07-06 07:31:08 +02:00
|
|
|
'bg': 'bulgarian',
|
|
|
|
'ca': 'catalan',
|
2017-08-08 13:42:33 +02:00
|
|
|
'ceb': 'cebuano',
|
|
|
|
'ny': 'chichewa',
|
2017-08-09 13:58:08 +02:00
|
|
|
'zh-cn': 'chinese (simplified)',
|
|
|
|
'zh-tw': 'chinese (traditional)',
|
2017-08-08 13:42:33 +02:00
|
|
|
'co': 'corsican',
|
2015-07-06 07:31:08 +02:00
|
|
|
'hr': 'croatian',
|
|
|
|
'cs': 'czech',
|
|
|
|
'da': 'danish',
|
|
|
|
'nl': 'dutch',
|
|
|
|
'en': 'english',
|
|
|
|
'eo': 'esperanto',
|
|
|
|
'et': 'estonian',
|
|
|
|
'tl': 'filipino',
|
|
|
|
'fi': 'finnish',
|
|
|
|
'fr': 'french',
|
2017-08-08 13:42:33 +02:00
|
|
|
'fy': 'frisian',
|
2015-07-06 07:31:08 +02:00
|
|
|
'gl': 'galician',
|
2017-08-08 13:42:33 +02:00
|
|
|
'ka': 'georgian',
|
2015-07-06 07:31:08 +02:00
|
|
|
'de': 'german',
|
|
|
|
'el': 'greek',
|
2017-08-08 13:42:33 +02:00
|
|
|
'gu': 'gujarati',
|
2017-08-09 13:58:08 +02:00
|
|
|
'ht': 'haitian creole',
|
2017-08-08 13:42:33 +02:00
|
|
|
'ha': 'hausa',
|
|
|
|
'haw': 'hawaiian',
|
2015-07-06 07:31:08 +02:00
|
|
|
'iw': 'hebrew',
|
2020-06-08 12:09:24 +02:00
|
|
|
'he': 'hebrew',
|
2015-07-06 07:31:08 +02:00
|
|
|
'hi': 'hindi',
|
2017-08-08 13:42:33 +02:00
|
|
|
'hmn': 'hmong',
|
2015-07-06 07:31:08 +02:00
|
|
|
'hu': 'hungarian',
|
|
|
|
'is': 'icelandic',
|
2017-08-08 13:42:33 +02:00
|
|
|
'ig': 'igbo',
|
2015-07-06 07:31:08 +02:00
|
|
|
'id': 'indonesian',
|
|
|
|
'ga': 'irish',
|
|
|
|
'it': 'italian',
|
|
|
|
'ja': 'japanese',
|
2017-08-08 13:42:33 +02:00
|
|
|
'jw': 'javanese',
|
|
|
|
'kn': 'kannada',
|
|
|
|
'kk': 'kazakh',
|
|
|
|
'km': 'khmer',
|
2015-07-06 07:31:08 +02:00
|
|
|
'ko': 'korean',
|
2017-08-09 13:58:08 +02:00
|
|
|
'ku': 'kurdish (kurmanji)',
|
2017-08-08 13:42:33 +02:00
|
|
|
'ky': 'kyrgyz',
|
|
|
|
'lo': 'lao',
|
2015-07-06 07:31:08 +02:00
|
|
|
'la': 'latin',
|
|
|
|
'lv': 'latvian',
|
|
|
|
'lt': 'lithuanian',
|
2017-08-08 13:42:33 +02:00
|
|
|
'lb': 'luxembourgish',
|
2015-07-06 07:31:08 +02:00
|
|
|
'mk': 'macedonian',
|
2017-08-08 13:42:33 +02:00
|
|
|
'mg': 'malagasy',
|
2015-07-06 07:31:08 +02:00
|
|
|
'ms': 'malay',
|
2017-08-08 13:42:33 +02:00
|
|
|
'ml': 'malayalam',
|
2015-07-06 07:31:08 +02:00
|
|
|
'mt': 'maltese',
|
2017-08-08 13:42:33 +02:00
|
|
|
'mi': 'maori',
|
|
|
|
'mr': 'marathi',
|
|
|
|
'mn': 'mongolian',
|
2017-08-09 13:58:08 +02:00
|
|
|
'my': 'myanmar (burmese)',
|
2017-08-08 13:42:33 +02:00
|
|
|
'ne': 'nepali',
|
2015-07-06 07:31:08 +02:00
|
|
|
'no': 'norwegian',
|
2017-08-08 13:42:33 +02:00
|
|
|
'ps': 'pashto',
|
2015-07-06 07:31:08 +02:00
|
|
|
'fa': 'persian',
|
|
|
|
'pl': 'polish',
|
|
|
|
'pt': 'portuguese',
|
2017-08-08 13:42:33 +02:00
|
|
|
'pa': 'punjabi',
|
2015-07-06 07:31:08 +02:00
|
|
|
'ro': 'romanian',
|
|
|
|
'ru': 'russian',
|
2017-08-08 13:42:33 +02:00
|
|
|
'sm': 'samoan',
|
2017-08-09 13:58:08 +02:00
|
|
|
'gd': 'scots gaelic',
|
2015-07-06 07:31:08 +02:00
|
|
|
'sr': 'serbian',
|
2017-08-08 13:42:33 +02:00
|
|
|
'st': 'sesotho',
|
|
|
|
'sn': 'shona',
|
|
|
|
'sd': 'sindhi',
|
|
|
|
'si': 'sinhala',
|
2015-07-06 07:31:08 +02:00
|
|
|
'sk': 'slovak',
|
|
|
|
'sl': 'slovenian',
|
2017-08-08 13:42:33 +02:00
|
|
|
'so': 'somali',
|
2015-07-06 07:31:08 +02:00
|
|
|
'es': 'spanish',
|
2017-08-08 13:42:33 +02:00
|
|
|
'su': 'sundanese',
|
2015-07-06 07:31:08 +02:00
|
|
|
'sw': 'swahili',
|
|
|
|
'sv': 'swedish',
|
2017-08-08 13:42:33 +02:00
|
|
|
'tg': 'tajik',
|
|
|
|
'ta': 'tamil',
|
|
|
|
'te': 'telugu',
|
2015-07-06 07:31:08 +02:00
|
|
|
'th': 'thai',
|
|
|
|
'tr': 'turkish',
|
|
|
|
'uk': 'ukrainian',
|
2017-08-08 13:42:33 +02:00
|
|
|
'ur': 'urdu',
|
|
|
|
'uz': 'uzbek',
|
2015-07-06 07:31:08 +02:00
|
|
|
'vi': 'vietnamese',
|
|
|
|
'cy': 'welsh',
|
2017-08-08 13:42:33 +02:00
|
|
|
'xh': 'xhosa',
|
2015-07-06 07:31:08 +02:00
|
|
|
'yi': 'yiddish',
|
2017-08-08 13:42:33 +02:00
|
|
|
'yo': 'yoruba',
|
2017-10-23 05:41:59 +02:00
|
|
|
'zu': 'zulu',
|
2017-08-08 13:42:33 +02:00
|
|
|
}
|
2017-06-01 15:50:13 +02:00
|
|
|
|
|
|
|
LANGCODES = dict(map(reversed, LANGUAGES.items()))
|