!747 m { static class Party { S name, link, weblink; } static new L parties; static S html; // can set this from client programs !include #1000850 // TableFinder p { // get html if (html == null) { S htmlID = "#3000025"; if (args.length != 0) htmlID = args[0]; html = loadSnippet(htmlID); } // analysis new TableFinder tf; tf.go(html); for (int i = 1; i < tf.data.size(); i++) { S cell = tf.data.get(i).get(0); parseParty(htmlcoarsetok(cell)); } // print success! print(parties.size() + " parties found!"); } static void parseParty(L tok) { if (tok.size() == 1) return; new Party p; p.name = htmldecode(tok.get(2)); p.link = linkFrom(tok.get(1)); if (tok.size() > 5) p.weblink = linkFrom(tok.get(5)); print("Party found! " + structure(p)); parties.add(p); } }