Libraryless. Click here for Pure Java version (741L/7K/20K).
!747 m { static class Party { S name, link, weblink; } static new L<Party> 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<S> 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); } }
Began life as a copy of #1000846
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment