pull/137/head
FongMi 3 years ago
parent 86fe76f187
commit 44b1599842
  1. 4
      app/src/main/java/com/fongmi/android/tv/player/Source.java
  2. 4
      catvod/src/main/java/com/github/catvod/utils/Util.java

@ -36,8 +36,8 @@ public class Source {
}
public String fetch(String url) throws Exception {
String host = Util.host(url).trim();
String scheme = Util.scheme(url).trim();
String host = Util.host(url);
String scheme = Util.scheme(url);
for (Extractor extractor : extractors) if (extractor.match(scheme, host)) return extractor.fetch(url.trim());
return url;
}

@ -46,12 +46,12 @@ public class Util {
public static String scheme(String url) {
String scheme = Uri.parse(url).getScheme();
return scheme == null ? "" : scheme.toLowerCase();
return scheme == null ? "" : scheme.toLowerCase().trim();
}
public static String host(String url) {
String host = Uri.parse(url).getHost();
return host == null ? "" : host.toLowerCase();
return host == null ? "" : host.toLowerCase().trim();
}
public static String md5(String src) {

Loading…
Cancel
Save