Libraryless. Click here for Pure Java version (2681L/18K/60K).
1 | !752 |
2 | |
3 | sbool live = false; |
4 | |
5 | p { |
6 | S html = live ? loadPage_utf8("http://kermitproject.org/utf8.html") : loadNTSnippet("#3000405"); |
7 | print(html); |
8 | L<S> tok = htmlTok(html); |
9 | print("ol: " + tok.indexOf("<ol>")); |
10 | print("ol end: " + tok.indexOf("</ol>")); |
11 | L<L<S>> ols = findContainerTag(html, "ol"); |
12 | L<S> ol = unwrapContainerTag(first(ols)); |
13 | psl(ol); |
14 | int i = 0; |
15 | while ((i = indexOf(ol, "<b>", i+1)) >= 0) { |
16 | int j = indexOf(ol, "</b>", i); |
17 | if (j < 0) break; |
18 | S language = join(subList(ol, i+1, j)); |
19 | print("Language: " + language); |
20 | i = j; |
21 | } |
22 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005228 |
Snippet name: | Load "I can eat glass" phrase in many languages [dev., utf encoding problem] |
Eternal ID of this version: | #1005228/1 |
Text MD5: | ebf25964299f0307d6a308ec49589178 |
Transpilation MD5: | aac4ca7b4e9f91dfead34bad5e0678fa |
Author: | stefan |
Category: | javax / web scraping |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-10-25 18:01:50 |
Source code size: | 592 bytes / 22 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 515 / 598 |
Referenced in: | [show references] |