We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I make a class for mixdrop getter, add in project :D
/* This is direct link getter for Mixdrop By LordzSpectron */ public class Mixdrop { public static void fetch(String url, final LowCostVideo.OnTaskCompleted onComplete){ AndroidNetworking.get(url) .setUserAgent(agent) .build() .getAsString(new StringRequestListener() { @Override public void onResponse(String response) { ArrayList<XModel> xModels = parse(response); if (xModels!=null){ onComplete.onTaskCompleted(xModels,false); }else onComplete.onError(); } @Override public void onError(ANError anError) { onComplete.onError(); Log.d("Mixdrop", String.valueOf(anError)); } }); } private static ArrayList<XModel> parse(String response){ JSUnpacker jsUnpacker = new JSUnpacker(getEvalCode(response)); if(jsUnpacker.detect()) { String src = getSrc(jsUnpacker.unpack()); if (src!=null && src.length()>0){ XModel xModel = new XModel(); src = "https:" + src; xModel.setUrl(src); xModel.setQuality("Normal"); ArrayList<XModel> xModels = new ArrayList<>(); xModels.add(xModel); return xModels; } }else { return null; } return null; } private static String getSrc(String code){ final String regex = "wurl=?\"(.*?)\";"; final Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE); final Matcher matcher = pattern.matcher(code); if (matcher.find()) { return matcher.group(1); } return null; } private static String getEvalCode(String html){ final String regex = "eval(.*)"; final Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE); final Matcher matcher = pattern.matcher(html); if (matcher.find()) { return matcher.group(0); } return null; } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I make a class for mixdrop getter, add in project :D
The text was updated successfully, but these errors were encountered: