opsdisk / yagooglesearch

Yet another googlesearch - A Python library for executing intelligent, realistic-looking, and tunable Google searches.
BSD 3-Clause "New" or "Revised" License
252 stars 43 forks source link

Add Language Support for Search Results #25

Closed jboarman closed 1 year ago

jboarman commented 1 year ago

The current hl language option refers to the language of the HTML UI. However, to search for results in a particular language, the lr parameter must be set.

Please add support for both language options:

image

For references, the enumeration of supported languages for results are as follows:

lang_af=Afrikaans
lang_ar=Arabic
lang_hy=Armenian
lang_be=Belarusian
lang_bg=Bulgarian
lang_ca=Catalan
lang_zh-CN=Chinese (Simplified)
lang_zh-TW=Chinese (Traditional)
lang_hr=Croatian
lang_cs=Czech
lang_da=Danish
lang_nl=Dutch
lang_en=English
lang_eo=Esperanto
lang_et=Estonian
lang_tl=Filipino
lang_fi=Finnish
lang_fr=French
lang_de=German
lang_el=Greek
lang_iw=Hebrew
lang_hi=Hindi
lang_hu=Hungarian
lang_is=Icelandic
lang_id=Indonesian
lang_it=Italian
lang_ja=Japanese
lang_ko=Korean
lang_lv=Latvian
lang_lt=Lithuanian
lang_no=Norwegian
lang_fa=Persian
lang_pl=Polish
lang_pt=Portuguese
lang_ro=Romanian
lang_ru=Russian
lang_sr=Serbian
lang_sk=Slovak
lang_sl=Slovenian
lang_es=Spanish
lang_sw=Swahili
lang_sv=Swedish
lang_th=Thai
lang_tr=Turkish
lang_uk=Ukrainian
lang_vi=Vietnamese
opsdisk commented 1 year ago

Thanks for taking the time to submit an issue @jboarman - might be a few days before I can take a look.

opsdisk commented 1 year ago

@jboarman take a look at https://github.com/opsdisk/yagooglesearch/pull/30