@skirt_owner said: status code 422
Hello! I have a problems with symbols with my get/search. could you plz answer: which symbols are allowed?
I never came across this problem. As far as I know everyone is allowed.
Please post a Requisition that you made that gave a problem because of symbol usage.
In order for someone to help you with API Request questions,
it is critical that you post here the API Request you are using.
Not the programming code you used to build the API Request.
But the API Request that is sent to the TMDb server.
Remember to replace your Key with THE_KEY , or something like that.
Hi @skirt_owner, you need to escape your query string. Pretty much all languages have this as a built in function. Just as a simple example, in Ruby, it would look like this:
irb(main):001:0> string = "7 aГ±os de matrimonio"
=> "7 aГ±os de matrimonio"
irb(main):002:0> CGI.escape(string)
=> "7+a%D0%93%C2%B1os+de+matrimonio"
There's a also a built in URI.encode_www_form_component function which you can use in Ruby. Again though, this is just a single example in one programming language, you'll have to figure what the equivalent is for you.
Ответ от ticao2 🇧🇷 pt-BR
, 29 июля 2021 в 09:54
I never came across this problem. As far as I know everyone is allowed.
Please post a Requisition that you made that gave a problem because of symbol usage.
In order for someone to help you with API Request questions,
it is critical that you post here the API Request you are using.
Not the programming code you used to build the API Request.
But the API Request that is sent to the TMDb server.
Remember to replace your Key with THE_KEY , or something like that.
Ответ от skirt_owner
, 29 июля 2021 в 10:34
"7 aГ±os de matrimonio " or smth like this "PolГcia Federal - A Lei Г© Para Todos " but i found out that its incorrect movie title. it happend due to making the database i used with help of usual users. and i just playing with regex to get normal string and find right title with tmdb api so... i just forgot to close my problem
Ответ от skirt_owner
, 29 июля 2021 в 10:36
if its working with your api, i think problem could be with my inplication into get/search
Ответ от Travis Bell
, 29 июля 2021 в 10:44
Hi @skirt_owner, you need to escape your query string. Pretty much all languages have this as a built in function. Just as a simple example, in Ruby, it would look like this:
There's a also a built in
URI.encode_www_form_component
function which you can use in Ruby. Again though, this is just a single example in one programming language, you'll have to figure what the equivalent is for you.Ответ от skirt_owner
, 29 июля 2021 в 10:45
thx a lot!
Ответ от skirt_owner
, 29 июля 2021 в 10:58
im using python and here is solution for all
Ответ от Travis Bell
, 29 июля 2021 в 11:30
That's not quite right, although might get you most of the way there. You don't need to inherently worry about unicode, that's a different problem.
This would be what you're looking for: https://docs.python.org/3/library/urllib.parse.html#urllib.parse.quote