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)

1  
scope snippetsFromLoadedHTML.
2  
3  
sbool #rowPrinted;
4  
5  
// assumes withmd5=1
6  
static L<Snippet> snippetsFromLoadedHTML(S html) {
7  
  new L<Snippet> l;
8  
  for (L<S> row : dropFirst(new TableFinder(html).rows())) {
9  
    if (!rowPrinted) {
10  
      print("snippetsFromLoadedHTML: " + row);
11  
      set rowPrinted;
12  
    }
13  
    
14  
    new Snippet s;
15  
    s.title = dropAllTags(htmldecode(row.get(0)));
16  
    s.id = dropAllTags(row.get(1));
17  
    s.md5 = dropAllTags(row.get(2));
18  
    s.type = dropAllTags(row.get(3));
19  
    s.isPublic = isYes(row.get(6));
20  
    l.add(s);
21  
  }
22  
  ret l;
23  
}
24  
25  
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: 324 / 385
Version history: 4 change(s)
Referenced in: [show references]