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;