I'm new with Java and even more with jsoup, but I think I'm just stupid with files.
I'm wanting to create a file from parsing some HTML, but the .txt is only 80 kbs and I know should be more lines. Maybe is the size supported for Elements in jsoup or I'm just getting the buffer full.
This is the code i'm using:
public class RetrieveURLs
{
public static void main(String[] args)
throws FileNotFoundException
{
try {
PrintWriter out = new PrintWriter( "filename.txt" );
for (int i = 1; i < 80; i++) {
Document doc = Jsoup.connect(
"http://elbuenfin.org/buscar/ofertas/pagina/"+ i +"/?entidad_id=&municipio_id=&categoria_id=&descuento_id=&promocion_id=&meses_id=&fulltext=&orderby=&order=").get();
Element tienda = doc.select("div.product").first();
out.println(tienda);
}
} catch (IOException ex) {
Logger.getLogger(RetrieveURLs.class.getName()).log(Level.SEVERE, null, ex);
}
}
}