sclass CruddieFollower { S cookie; int n; swappable void newDialog() {} swappable void botUtterance(S html) {} *(S *cookie) {} // may block for 60 seconds. returns HTML public S get() { S src = loadPageWithParams("https://cruddie.site/bot/incremental", +cookie, n := zeroToNull(n)); S newN = firstIntAsString_regexp(src); if (nempty(newN)) { if (cic(src, "NEW DIALOG -->")) newDialog(); n = parseInt(newN); } else doForEach botUtterance(regexpExtractAll([[bot-utterance">(.*?)<]], src)); ret src; } }