Ver Mensaje Individual
  #1  
Antiguo 09-04-2020
MaxiDucoli MaxiDucoli is offline
Miembro
 
Registrado: feb 2006
Posts: 134
Reputación: 19
MaxiDucoli Va por buen camino
Datos de respuesta de un TidHTTP.Get()

Buenas.
Estoy tratando de hacer un tipo traductor para un proyecto personal de juegos Retro.
Mi idea es cargado algunos datos, obtener el nombre del juego, a que consola pertenece y en base a eso obtener la descripción.
Bueno, en eso estoy casi listo y se me ocurrió hacerlo mas "internacional" como para una vez obtenida la descripción del juego, esta pueda ser traducida a varios idiomas
Se me ocurrió usar google y después de varios intentos y frustraciones, logré con una simple línea de código obtener el resultado que quería. (SÍ 1 SIMPLE LINEA...... UNA!!!!!)

Pero el problema es que la respuesta que obtengo, NO LA ENTIENDO.
Bah! si se entiende, pero no me imagino o no se me estaría ocurriendo como hacer para "armarla" y así poder utilizar el texto traducido.

Les dejo lo que estoy poniendo para traducir y la respuesta que obtengo con el GET

MI TEXTO:

"Combat Chess places two players, or the solitaire game, at the head of an army of tanks and armored cars in a fast moving game that requires a lot of skill and a little luck to win. Each game of Combat Chess will be different because the players choose the rules ! - You select the playing field - consisting of natural or abstract terrain - from a library of ten boards. - You select how much the units can move each turn, and when and how they fire. Destroy your oponent's Battle Cruiser and you win : Each games promises to be a challenging puzzle with the subtle tactics of chess. Because the rules are so simple, more attention has been devoted to making the computer a very intelligent opponent !"


LA RESPUESTA:

[[["Combat Chess coloca a dos jugadores, o el juego de solitario, a la cabeza de un ejército de tanques y carros blindados en un juego de rápido movimiento que requiere mucha habilidad y un poco de suerte para ganar. ","Combat Chess places two players, or the solitaire game, at the head of an army of tanks and armored cars in a fast moving game that requires a lot of skill and a little luck to win.",null,null,3,null,null,null,[[["f16caa8d292961aa55f7ae83b3ec9001","en_es_2019q2.md"]
]
]
]
,["¡Cada juego de Combat Chess será diferente porque los jugadores eligen las reglas! ","Each game of Combat Chess will be different because the players choose the rules !",null,null,3,null,null,null,[[["f16caa8d292961aa55f7ae83b3ec9001","en_es_2019q2.md"]
]
]
]
,["- Selecciona el campo de juego, que consiste en terreno natural o abstracto, de una biblioteca de diez tableros. ","- You select the playing field - consisting of natural or abstract terrain - from a library of ten boards.",null,null,3,null,null,null,[[["f16caa8d292961aa55f7ae83b3ec9001","en_es_2019q2.md"]
]
]
]
,["- Selecciona cuánto pueden mover las unidades en cada turno, y cuándo y cómo disparan. ","- You select how much the units can move each turn, and when and how they fire.",null,null,3,null,null,null,[[["f16caa8d292961aa55f7ae83b3ec9001","en_es_2019q2.md"]
]
]
]
,["Destruye el crucero de batalla de tu oponente y ganarás: cada juego promete ser un rompecabezas desafiante con las sutiles tácticas del ajedrez. ","Destroy your oponent's Battle Cruiser and you win : Each games promises to be a challenging puzzle with the subtle tactics of chess.",null,null,3,null,null,null,[[["f16caa8d292961aa55f7ae83b3ec9001","en_es_2019q2.md"]
]
]
]
,["¡Debido a que las reglas son tan simples, se ha dedicado más atención a hacer de la computadora un oponente muy inteligente!","Because the rules are so simple, more attention has been devoted to making the computer a very intelligent opponent !",null,null,3,null,null,null,[[["f16caa8d292961aa55f7ae83b3ec9001","en_es_2019q2.md"]
]
]
]
]
,null,"en",null,null,[["Combat Chess places two players, or the solitaire game, at the head of an army of tanks and armored cars in a fast moving game that requires a lot of skill and a little luck to win.",null,[["Combat Chess coloca a dos jugadores, o el juego de solitario, a la cabeza de un ejército de tanques y carros blindados en un juego de rápido movimiento que requiere mucha habilidad y un poco de suerte para ganar.",0,true,false]
,["lugares de ajedrez de combate dos jugadores, o el juego de solitario, a la cabeza de un ejército de tanques y vehículos blindados en un juego de movimiento rápido que requiere de mucha habilidad y un poco de suerte para ganar.",0,true,false]
]
,[[0,181]
]
,"Combat Chess places two players, or the solitaire game, at the head of an army of tanks and armored cars in a fast moving game that requires a lot of skill and a little luck to win.",0,0]
,["Each game of Combat Chess will be different because the players choose the rules !",null,[["¡Cada juego de Combat Chess será diferente porque los jugadores eligen las reglas!",0,true,false]
,["Cada juego de ajedrez combate será diferente debido a que los jugadores eligen las reglas!",0,true,false]
]
,[[0,82]
]
,"Each game of Combat Chess will be different because the players choose the rules !",0,0]
,["- You select the playing field - consisting of natural or abstract terrain - from a library of ten boards.",null,[["- Selecciona el campo de juego, que consiste en terreno natural o abstracto, de una biblioteca de diez tableros.",0,true,false]
,["- Se selecciona el campo de juego - que consiste en terreno natural o abstracto - de una biblioteca de tablas de diez.",0,true,false]
]
,[[0,106]
]
,"- You select the playing field - consisting of natural or abstract terrain - from a library of ten boards.",0,0]
,["- You select how much the units can move each turn, and when and how they fire.",null,[["- Selecciona cuánto pueden mover las unidades en cada turno, y cuándo y cómo disparan.",0,true,false]
,["- Se selecciona la cantidad de las unidades pueden mover cada turno, y cuándo y cómo el fuego.",0,true,false]
]
,[[0,79]
]
,"- You select how much the units can move each turn, and when and how they fire.",0,0]
,["Destroy your oponent's Battle Cruiser and you win : Each games promises to be a challenging puzzle with the subtle tactics of chess.",null,[["Destruye el crucero de batalla de tu oponente y ganarás: cada juego promete ser un rompecabezas desafiante con las sutiles tácticas del ajedrez.",0,true,false]
,["Destruir de su oponente crucero de batalla y se gana: cada Juego promete ser un juego de puzzle con las tácticas sutiles de ajedrez.",0,true,false]
]
,[[0,132]
]
,"Destroy your oponent's Battle Cruiser and you win : Each games promises to be a challenging puzzle with the subtle tactics of chess.",0,0]
,["Because the rules are so simple, more attention has been devoted to making the computer a very intelligent opponent !",null,[["¡Debido a que las reglas son tan simples, se ha dedicado más atención a hacer de la computadora un oponente muy inteligente!",0,true,false]
,["Debido a que las reglas son tan simples, más atención se ha dedicado a hacer del equipo un rival muy inteligente!",0,true,false]
]
,[[0,117]
]
,"Because the rules are so simple, more attention has been devoted to making the computer a very intelligent opponent !",0,0]
]
,1.0,[]
,[["en"]
,null,[1.0]
,["en"]
]
,null,null,null,null,null,null,null,null,null,[null,3]
]


A alguien se le ocurre qué es lo que necesito o como puedo hacer para armar ese texto?
Quizás esos números que tira son de algún código como para usarlos y que los acomode o no sé.
La verdad es que intento e intento pero no se me ocurre nada.

Les dejo como solucioné el tema de obtener ese código. Usé FIDDLER para obtener los movimientos WEB y así pude saber a donde enviar el GET para obtener la respuesta.

Memo1.Text := idhttp1.Get(Edit1.Text);


Les agradezco de ante mano!!!!!!
Responder Con Cita