|
|
|
|
@ -22,13 +22,14 @@ public class Sniffer { |
|
|
|
|
private static final String TAG = Sniffer.class.getSimpleName(); |
|
|
|
|
|
|
|
|
|
public static final Pattern CLICKER = Pattern.compile("\\[a=cr:(\\{.*?\\})\\/](.*?)\\[\\/a]"); |
|
|
|
|
public static final Pattern AI_PUSH = Pattern.compile("(http|https|rtmp|rtsp|smb|thunder|magnet|ed2k|mitv|tvbox-xg|jianpian):[^\\s]+", Pattern.MULTILINE); |
|
|
|
|
public static final Pattern SNIFFER = Pattern.compile("http((?!http).){12,}?\\.(m3u8|mp4|mkv|flv|mp3|m4a|aac)\\?.*|http((?!http).){12,}\\.(m3u8|mp4|mkv|flv|mp3|m4a|aac)|http((?!http).)*?video/tos*"); |
|
|
|
|
|
|
|
|
|
public static final List<String> THUNDER = Arrays.asList("thunder", "magnet", "ed2k"); |
|
|
|
|
|
|
|
|
|
public static String getUrl(String text) { |
|
|
|
|
if (Json.valid(text)) return text; |
|
|
|
|
Matcher m = Pattern.compile("(http|https|rtmp|rtsp|smb|thunder|magnet|ed2k|mitv|tvbox-xg|jianpian):[^\\s]+", Pattern.MULTILINE).matcher(text); |
|
|
|
|
Matcher m = AI_PUSH.matcher(text); |
|
|
|
|
if (m.find()) return m.group(0); |
|
|
|
|
return text; |
|
|
|
|
} |
|
|
|
|
|