!7 p { //set loadPage_debug; S baseURL = "http://legend.freebooks2017.org/Legend_1/"; int page = 1; while licensed { S html = loadPageWithUserAgent(pageURL(baseURL, page), "Mac Safari"); L paragraphs = map(f htmldecode_dropAllTags, contentsOfPTags(html)); //printNumberedLines(paragraphs); print("\n#PAGE " + page + "#"); for (S p : paragraphs) { print("#P#"); print(p); } ++page; if (!html.contains("index_" + page + ".html")) break; } } sS pageURL(S baseURL, int page) { baseURL = addSlash(baseURL); if (page <= 0) fail("woot"); else if (page == 1) ret baseURL; else ret baseURL + "index_" + page + ".html"; }