Test
This commit is contained in:
parent
74c6c6ab73
commit
f16cf64307
|
|
@ -50,7 +50,7 @@ public class Wogg extends Ali {
|
||||||
public String homeContent(boolean filter) {
|
public String homeContent(boolean filter) {
|
||||||
List<Class> classes = new ArrayList<>();
|
List<Class> classes = new ArrayList<>();
|
||||||
String url = extend.has("filter") ? extend.get("filter").getAsString() : "";
|
String url = extend.has("filter") ? extend.get("filter").getAsString() : "";
|
||||||
Document doc = Jsoup.parse(OkHttp.string(siteUrl, getHeader()));
|
Document doc = Jsoup.parse(OkHttp.string(client(), siteUrl, getHeader()));
|
||||||
Elements elements = doc.select(".nav-link");
|
Elements elements = doc.select(".nav-link");
|
||||||
for (Element e : elements) {
|
for (Element e : elements) {
|
||||||
Matcher mather = regexCategory.matcher(e.attr("href"));
|
Matcher mather = regexCategory.matcher(e.attr("href"));
|
||||||
|
|
@ -69,7 +69,7 @@ public class Wogg extends Ali {
|
||||||
urlParams[Integer.parseInt(key)] = extend.get(key);
|
urlParams[Integer.parseInt(key)] = extend.get(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Document doc = Jsoup.parse(OkHttp.string(String.format("%s/index.php/vodshow/%s.html", siteUrl, String.join("-", urlParams)), getHeader()));
|
Document doc = Jsoup.parse(OkHttp.string(client(), String.format("%s/index.php/vodshow/%s.html", siteUrl, String.join("-", urlParams)), getHeader()));
|
||||||
int page = Integer.parseInt(pg), limit = 72, total = 0;
|
int page = Integer.parseInt(pg), limit = 72, total = 0;
|
||||||
Matcher matcher = regexPageTotal.matcher(doc.html());
|
Matcher matcher = regexPageTotal.matcher(doc.html());
|
||||||
if (matcher.find()) total = Integer.parseInt(matcher.group(1));
|
if (matcher.find()) total = Integer.parseInt(matcher.group(1));
|
||||||
|
|
@ -93,7 +93,7 @@ public class Wogg extends Ali {
|
||||||
@Override
|
@Override
|
||||||
public String detailContent(List<String> ids) throws Exception {
|
public String detailContent(List<String> ids) throws Exception {
|
||||||
String vodId = ids.get(0);
|
String vodId = ids.get(0);
|
||||||
Document doc = Jsoup.parse(OkHttp.string(siteUrl + vodId, getHeader()));
|
Document doc = Jsoup.parse(OkHttp.string(client(), siteUrl + vodId, getHeader()));
|
||||||
|
|
||||||
Vod item = new Vod();
|
Vod item = new Vod();
|
||||||
item.setVodId(vodId);
|
item.setVodId(vodId);
|
||||||
|
|
@ -139,7 +139,7 @@ public class Wogg extends Ali {
|
||||||
|
|
||||||
private String searchContent(String key, String pg) {
|
private String searchContent(String key, String pg) {
|
||||||
String searchURL = siteUrl + String.format("/index.php/vodsearch/%s----------%s---.html", URLEncoder.encode(key), pg);
|
String searchURL = siteUrl + String.format("/index.php/vodsearch/%s----------%s---.html", URLEncoder.encode(key), pg);
|
||||||
String html = OkHttp.string(searchURL, getHeader());
|
String html = OkHttp.string(client(), searchURL, getHeader());
|
||||||
Elements items = Jsoup.parse(html).select(".module-search-item");
|
Elements items = Jsoup.parse(html).select(".module-search-item");
|
||||||
List<Vod> list = new ArrayList<>();
|
List<Vod> list = new ArrayList<>();
|
||||||
for (Element item : items) {
|
for (Element item : items) {
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
60d5e47e1bbfa645ee6fb5aa561eee28
|
0111bf77b42bfb642dd8217dc6606828
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue