!752 m { static bool real = false; static S html; static class Headline { S title, link, date, time; } static new L headlines; p { html = real ? loadPage("http://tinybrain.blog.de") : loadSnippet("#3000133"); // puts all tags on even indices, all text on odd indices L tok = htmlcoarsetok(html); //print(fromLines(tok)); S link = null; Headline hl = null; for (int i = 1; i < l(tok); i += 2) { S t = tok.get(i); if (tagIs(t, "a")) link = "http://tinybrain.blog.de" + tagGet(t, "href"); if (eqic(t, "")) { headlines.add(hl = new Headline); hl.link = link; hl.title = htmldecode(tok.get(i+1)); print("Headline: " + hl.title); print(" Link: " + link); } if (eqic(t, "") && hl != null && match("*-*-*", tok.get(i+1))) { hl.date = tok.get(i+1); print(" Date: " + hl.date); } if (eqic(t, "") && hl != null) { int j = i+1; while (j < l(tok) && !match("*:*:*", tok.get(j))) j += 2; if (j < l(tok)) { hl.time = tok.get(j); print(" Time: " + hl.time); } } } } }