Commit 7e20035b01686089fa546b4690ad82bedce1e0f3

Authored by Imanol-Mikel Barba Sabariego
1 parent e6cc84e6

HTMLParser versio final (en teoria)

src/com/upc/pbe/upcnews/HTMLParser.java
@@ -19,7 +19,7 @@ public class HTMLParser { @@ -19,7 +19,7 @@ public class HTMLParser {
19 //Si hi ha un directori, tallem l'string per obtenir-ne el nom. 19 //Si hi ha un directori, tallem l'string per obtenir-ne el nom.
20 for(int i = 0; i < split.length; i++){ 20 for(int i = 0; i < split.length; i++){
21 if(split[i].contains("href") && split[i].contains("/\"")){ 21 if(split[i].contains("href") && split[i].contains("/\"")){
22 - directoris.add(split[i].substring(split[i].indexOf('>', 5), split[i].indexOf('<', 5)-1)); 22 + directoris.add(split[i].substring((split[i].indexOf("href="))+2, (split[i].indexOf("/\""))));
23 } 23 }
24 } 24 }
25 return directoris; 25 return directoris;