google-images-download icon indicating copy to clipboard operation
google-images-download copied to clipboard

Does the language field has any impact?

Open lthiet opened this issue 4 years ago • 3 comments

Seems like whichever language I choose the result are always the same.

lthiet avatar Dec 25 '20 22:12 lthiet

Yes it does have an impact.

            lang = "&lr="
            lang_param = {"Arabic": "lang_ar", "Chinese (Simplified)": "lang_zh-CN",
                          "Chinese (Traditional)": "lang_zh-TW", "Czech": "lang_cs", "Danish": "lang_da",
                          "Dutch": "lang_nl", "English": "lang_en", "Estonian": "lang_et", "Finnish": "lang_fi",
                          "French": "lang_fr", "German": "lang_de", "Greek": "lang_el", "Hebrew": "lang_iw ",
                          "Hungarian": "lang_hu", "Icelandic": "lang_is", "Italian": "lang_it", "Japanese": "lang_ja",
                          "Korean": "lang_ko", "Latvian": "lang_lv", "Lithuanian": "lang_lt", "Norwegian": "lang_no",
                          "Portuguese": "lang_pt", "Polish": "lang_pl", "Romanian": "lang_ro", "Russian": "lang_ru",
                          "Spanish": "lang_es", "Swedish": "lang_sv", "Turkish": "lang_tr"}
            lang_url = lang + lang_param[arguments['language']]
        else:
            lang_url = ''

This is the code. Make sure your language is one of the one specified in the lang_param dictionary.

Joeclinton1 avatar Jan 02 '21 19:01 Joeclinton1

I'm guessing the library would perform the search in Google's selected language domain, so for example with the language flag set to "Japanese" it should be making the query to google.co.jp isn't it? But what would be the proper way to make a query then @Joeclinton1? In the documentation it mentions that by giving the arguments -k "北极熊" -l 5 (i.e. using non-English keywords for image search) it will produce non-English results retrieved from the english language domain of Google google.com, so using non-English keywords and setting the language flag to a non-English language will produce non-English results from the selected language domain, is that correct?

JulianJB avatar Apr 08 '21 07:04 JulianJB

@JulianJB Sorry I don’t know much about this topic only that it is possible to set the language param. I’m pretty sure doing that doesn’t change the domain. I don’t know about the effect of non-english keywords but it should have the same effect as doing this with regular google images.

Joeclinton1 avatar Apr 08 '21 08:04 Joeclinton1