Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

25
LINES

< > BotCompany Repo | #1020025 // snippetsFromLoadedHTML (grabs everything but text)

JavaX fragment (include)

scope snippetsFromLoadedHTML.

sbool #rowPrinted;

// assumes withmd5=1
static L<Snippet> snippetsFromLoadedHTML(S html) {
  new L<Snippet> l;
  for (L<S> row : dropFirst(new TableFinder(html).rows())) {
    if (!rowPrinted) {
      print("snippetsFromLoadedHTML: " + row);
      set rowPrinted;
    }
    
    new Snippet s;
    s.title = dropAllTags(htmldecode(row.get(0)));
    s.id = dropAllTags(row.get(1));
    s.md5 = dropAllTags(row.get(2));
    s.type = dropAllTags(row.get(3));
    s.isPublic = isYes(row.get(6));
    l.add(s);
  }
  ret l;
}

end scope

Author comment

Began life as a copy of #1003520

download  show line numbers  debug dex  old transpilations   

Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1020025
Snippet name: snippetsFromLoadedHTML (grabs everything but text)
Eternal ID of this version: #1020025/5
Text MD5: 04bf6b27b7a024ac0408d952e9e83fba
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-08 22:49:21
Source code size: 587 bytes / 25 lines
Pitched / IR pitched: No / No
Views / Downloads: 325 / 385
Version history: 4 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)