pull/137/head
FongMi 2 years ago
parent f39c826a44
commit 24bff9eca7
  1. 6
      catvod/src/main/java/com/github/catvod/spider/Proxy.java
  2. 2
      drpy/src/main/java/com/hiker/drpy/method/Global.java
  3. 2
      pyramid/src/main/java/com/undcover/freedom/pyramid/Spider.java

@ -19,12 +19,12 @@ public class Proxy {
}
}
public static String getUrl(String type) {
public static String getUrl() {
try {
adjustPort();
return "http://127.0.0.1:" + port + "/proxy?do=" + type;
return "http://127.0.0.1:" + port + "/proxy";
} catch (Exception e) {
return "http://127.0.0.1:9978/proxy?do=" + type;
return "http://127.0.0.1:9978/proxy";
}
}
}

@ -69,7 +69,7 @@ public class Global {
@Keep
@JSMethod
public String getProxy(boolean local) {
return Proxy.getUrl("js");
return Proxy.getUrl() + "?do=js";
}
@Keep

@ -110,6 +110,6 @@ public class Spider extends com.github.catvod.crawler.Spider {
}
private String replaceUrl(String content) {
return content.replace("http://127.0.0.1:UndCover/proxy", Proxy.getUrl("py"));
return content.replace("http://127.0.0.1:UndCover/proxy", Proxy.getUrl());
}
}

Loading…
Cancel
Save