Skip to content
This repository has been archived by the owner on Aug 18, 2022. It is now read-only.

Wrong language parameter in Google's url #7

Open
ownchoice opened this issue Jul 13, 2019 · 1 comment
Open

Wrong language parameter in Google's url #7

ownchoice opened this issue Jul 13, 2019 · 1 comment

Comments

@ownchoice
Copy link

I found this error because while trying to use the module for language agnostic searches (I don't know if it's the right way to call them) in Spanish, I got all the questions in English. For example, names of things that are spelled the same in both English and Spanish.

For the selection of the language, the script uses the parameter hl but that is the web interface language, instead the lr parameter should be used since it sets the search language.

For reference: https://sites.google.com/site/tomihasa/google-language-codes

Now, my problem is, changing the line 78 of gquestions.py from:
browser.get("https://www.google.com?hl=es")
To:
browser.get("https://www.google.com?hl=es&lr=lang_es")
Does provide me with the search results in the correct language but I see no questions at the end and the script fails.

@ownchoice
Copy link
Author

Testing a little bit more, I guess I'm having this problem just because there are no questions in Spanish for the topic that I searched, because for other topics I do find questions in Spanish using lr=lang_es.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant