Pessoal, seguinte:
Meu programa esta parseando com um site, e as informacoes que eu tiro do site sao carregados no console.
Porem esta aparecendo assim, Produto: Smartphone Apple iPhone 5 16GB Desbloqueado por “at&ea.cute(sem o ponto);” R$ 3.400,00".
Gostaria de saber como posso substituir esse ““at&ea.cute(sem o ponto);”” por um até
Grato
Abaixo esta meu codigo:
public static void main(String[] args) throws Exception {
DefaultHttpClient httpclient = new DefaultHttpClient();
String busca = "Iphone";
HttpGet httpGet = new HttpGet("http://www.buscape.com.br/cprocura/"+busca+".html");
try {
ResponseHandler<String> manipulador = new BasicResponseHandler();
String resposta = httpclient.execute(httpGet,manipulador);
int inicio = resposta.indexOf("até:");
while(inicio != -1){
resposta = resposta.substring(inicio);
String titulo = resposta.substring(resposta.indexOf("até:"), resposta.indexOf("/span"));
titulo = titulo.substring(titulo.indexOf("title"),titulo.indexOf("href"));
titulo = titulo.substring(titulo.indexOf(">")+8);
System.out.println("Produto: "+titulo);
resposta = resposta.substring(resposta.indexOf("até:")+1);
inicio = resposta.indexOf("até:");
}
} finally {
httpGet.releaseConnection();
}
}