samedi 28 mars 2015

Download AJAX generated content using java

I have a webpage on which a list of movies is being displayed. The content is created using AJAX (as far as my limited knowledge would suggest...).


I want to download the content, in this case the movie playing times, using Java. I know how to download a simple website, but here my solution only gives me the following as an result instead of the playing times:



ajaxpage('http://ift.tt/1D0IccR', "kinoprogramm");



How do I make my program download the results this AJAX function gives?


Here is the code I use:



String line = "";
URL myUrl = http://ift.tt/1BEJ9De;
BufferedReader in = null;
try {
myUrl = new URL(URL);
in = new BufferedReader(new InputStreamReader(myUrl.openStream()));

while ((line = in.readLine()) != null) {
System.out.println(line);
}
} finally {
if (in != null) {
in.close();
}
}




Aucun commentaire:

Enregistrer un commentaire