Libraryless. Click here for Pure Java version (2151L/16K/49K).
1 | !7 |
2 | |
3 | p { |
4 | S html; |
5 | html = loadPage("https://www.youtube.com/watch?v=kTFS3V4PnQM"); |
6 | // showText(html); |
7 | L<S> tok = htmlTok(html); |
8 | int i = tok.indexOf([[<div class="watch-view-count">]]); |
9 | if (i >= 0) { |
10 | S s = tok.get(i+1); |
11 | print("Raw views: " + s); |
12 | print("Parsed: " + parseFirstInt(s)); |
13 | } |
14 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1006533 |
Snippet name: | Get number of views of YouTube video [WORKS] |
Eternal ID of this version: | #1006533/1 |
Text MD5: | 7ad6a9077de5067f58ac8190800bcc8c |
Transpilation MD5: | c261f1136b5a1cd7de4cc71958ab156c |
Author: | stefan |
Category: | javax / networking |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-01-15 17:43:03 |
Source code size: | 322 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 515 / 580 |
Referenced in: | [show references] |