From 7e20035b01686089fa546b4690ad82bedce1e0f3 Mon Sep 17 00:00:00 2001 From: Equip de Desenvolupadors de PBE Date: Wed, 28 Nov 2012 13:26:35 +0000 Subject: [PATCH] HTMLParser versio final (en teoria) --- src/com/upc/pbe/upcnews/HTMLParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/upc/pbe/upcnews/HTMLParser.java b/src/com/upc/pbe/upcnews/HTMLParser.java index 8dd255f..419de40 100644 --- a/src/com/upc/pbe/upcnews/HTMLParser.java +++ b/src/com/upc/pbe/upcnews/HTMLParser.java @@ -19,7 +19,7 @@ public class HTMLParser { //Si hi ha un directori, tallem l'string per obtenir-ne el nom. for(int i = 0; i < split.length; i++){ if(split[i].contains("href") && split[i].contains("/\"")){ - directoris.add(split[i].substring(split[i].indexOf('>', 5), split[i].indexOf('<', 5)-1)); + directoris.add(split[i].substring((split[i].indexOf("href="))+2, (split[i].indexOf("/\"")))); } } return directoris; -- libgit2 0.22.2