Commit 499ae9f80ed2b1a9f373acc405b87c50705cc828

Authored by Imanol-Mikel Barba Sabariego
1 parent c10d965e

--no commit message

src/com/upc/pbe/upcnews/HTMLParser.java
... ... @@ -15,6 +15,8 @@ public class HTMLParser {
15 15 public ArrayList<String> parse(){
16 16 //Separem el codi en linies
17 17 String[] split = code.split("\n");
  18 + //Mirem a cada linia si conté un href, i hi haurà un directori si conté el conjunt /"
  19 + //Si hi ha un directori, tallem l'string per obtenir-ne el nom.
18 20 for(int i = 0; i < split.length; i++){
19 21 if(split[i].contains("href") && split[i].contains("/\"")){
20 22 directoris.add(split[i].substring(split[i].indexOf('>', 5), split[i].indexOf('<', 5)-1));
... ...