Iceloof / GoogleNews

Script for GoogleNews
https://pypi.org/project/GoogleNews/
MIT License
316 stars 88 forks source link

Cyrillic search does not work #32

Closed alexisakov closed 3 years ago

alexisakov commented 3 years ago

googlenew.search('МАЗ') does not return results.

However, encoding the string into the CP1251 works is per this SO: https://stackoverflow.com/questions/24234987/urlencode-cyrillic-characters-in-python

May be you should add search key encoding before consutructing the URL:

from urllib import request

key = request.quote(key.encode('cp1251'))

HurinHu commented 3 years ago

New version is release with encoding setting.