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

26
LINES

< > BotCompany Repo | #1004412 // P0rn Widget :)

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (910L/7K/22K).

!752

import android.graphics.*;

  psvm {
    S p;
    List<String> matches = matchAll("x1?.fap.to/images/thumb/([0-9/]+)\\.jpg", p = loadPage("imagefap.com/random.php"));
    saveTextFile (getProgramFile ("random.txt"), p);
    //for (String match : matches)
     // print(match);
    if (empty(matches)) fail(p);
    S url = oneOf(matches);
    
    print("URL: " + url);
    byte [] x = loadBinaryPage("http://"+url);
    Bitmap b = BitmapFactory.decodeByteArray(x, 0, l(x));
    call(androidContext(), "updateWidgetWithBitmap", b);
  }
  
  static List<String> matchAll(String pattern, String text) {
    List<String> matches = new ArrayList<String>();
    Matcher matcher = Pattern.compile(pattern).matcher(text);
    while (matcher.find())
      matches.add(matcher.group());
    return matches;
  }

Author comment

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: 514 / 591
Referenced in: #1004413 - P0rn Widget :) 2