sclass OneLiner { S userName; S contents; // html } // get the 5 one-liners from home page static L pouetOneLiners() { ret pouetOneLiners(loadPageWithUserAgent("http://pouet.net", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0")); } static L pouetOneLiners(S html) { new L out; L tok = htmlTok(html); int i = tok.indexOf("
"); if (i >= 0) { int j = findEndOfContainerTag(tok, i); if (j >= 0) { L tok2 = subList(tok, i+1, j-1); //psl(tok2); L> l = unwrapContainerTags(findContainerTag(tok2, "li")); for (L tok3 : l) pcall { psl(tok3); int k = indexOf(tok3, ""); new OneLiner o; o.userName = getHtmlTagParameter(tok3.get(1), "title"); o.contents = trim(join(subList(tok3, k+1))); out.add(o); } } } ret out; }