Libraryless. Click here for Pure Java version (910L/7K/22K).
1 | !752 |
2 | |
3 | import android.graphics.*; |
4 | |
5 | psvm { |
6 | S p; |
7 | List<String> matches = matchAll("x1?.fap.to/images/thumb/([0-9/]+)\\.jpg", p = loadPage("imagefap.com/random.php")); |
8 | saveTextFile (getProgramFile ("random.txt"), p); |
9 | //for (String match : matches) |
10 | // print(match); |
11 | if (empty(matches)) fail(p); |
12 | S url = oneOf(matches); |
13 | |
14 | print("URL: " + url); |
15 | byte [] x = loadBinaryPage("http://"+url); |
16 | Bitmap b = BitmapFactory.decodeByteArray(x, 0, l(x)); |
17 | call(androidContext(), "updateWidgetWithBitmap", b); |
18 | } |
19 | |
20 | static List<String> matchAll(String pattern, String text) { |
21 | List<String> matches = new ArrayList<String>(); |
22 | Matcher matcher = Pattern.compile(pattern).matcher(text); |
23 | while (matcher.find()) |
24 | matches.add(matcher.group()); |
25 | return matches; |
26 | } |
Began life as a copy of #1004411
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, crvwmplrxojx, gwrvuhgaqvyk, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1004412 |
Snippet name: | P0rn Widget :) |
Eternal ID of this version: | #1004412/1 |
Text MD5: | 30c184572794f267aa536397d27f211d |
Transpilation MD5: | e6374c82478664b067a0bdd6a239b502 |
Author: | stefan |
Category: | |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-08-16 04:37:50 |
Source code size: | 833 bytes / 26 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 567 / 659 |
Referenced in: | [show references] |