I need to send a request from the backend I'm doing in Python to an API via URL.
The method requests.get(URL)
automatically makes the respective encoding to UTF-8.
The problem is that the API page, when they are special characters, such as in Russian, German, Spanish, etc.... in the address goes the parameter (query, for example) and it is already sent encoded.
For example, the Russian word "Бавария Мюнхен" in UTF-8 becomes:
"%D0%91%D0%B0%D0%B2%D0%B0%D1%80%D0%B8%D1%8F%20%D0%9C%D1%8E%D0%BD%D1%85%D0%B5%D0%BD"
but it turns out that the url when entering manually from the website, to each % adds a 25, that is, it remains as %25 plus the letter that follows in the query encoded.
The website is RSS Dog.
Questions:
- How do I manually add that "%25"?
- Is a coding method that does that in Python.
Translated with www.DeepL.com/Translator :v