Answer the question
In order to leave comments, you need to log in
How to fix incorrect output of a get-request in the presence of Cyrillic characters?
Hello! I need help, when compiling a get-request with parameters with Latin characters, there are no problems, and when characters from Cyrillic come across, I get abra-kadabra, thus I can’t get data from the server. Googled it and couldn't find answers. Help fix the problem with the encoding, still quite green)
import requests
prms= {'trademark': 'Мечта'}
# prms= {'trademark': 'Mechta'}
url = 'http://api.site.kz/api/snn'
r = requests.get(url, params=prms)
print(r.url)
api.site.kz/api/snn?trademark=%D0%9C%D0%B5%D1%87%D1%82%D0%B0
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question