Merge branch 'main' of https://github.com/FongMi/CatVodSpider
This commit is contained in:
commit
f6a71102d4
|
|
@ -40,7 +40,7 @@ import java.util.regex.Pattern;
|
||||||
*/
|
*/
|
||||||
public class Ali {
|
public class Ali {
|
||||||
|
|
||||||
private final Pattern pattern = Pattern.compile("www.aliyundrive.com/s/([^/]+)(/folder/([^/]+))?");
|
public static final Pattern pattern = Pattern.compile("www.aliyundrive.com/s/([^/]+)(/folder/([^/]+))?");
|
||||||
private ScheduledExecutorService service;
|
private ScheduledExecutorService service;
|
||||||
private final Auth auth;
|
private final Auth auth;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ public class PanSou extends Spider {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String detailContent(List<String> ids) throws Exception {
|
public String detailContent(List<String> ids) throws Exception {
|
||||||
|
if (Ali.pattern.matcher(ids.get(0)).find()) return Ali.get().detailContent(ids);
|
||||||
String url = siteUrl + ids.get(0).replace("/s/", "/cv/");
|
String url = siteUrl + ids.get(0).replace("/s/", "/cv/");
|
||||||
Map<String, List<String>> respHeaders = new HashMap<>();
|
Map<String, List<String>> respHeaders = new HashMap<>();
|
||||||
OkHttp.stringNoRedirect(url, getHeaders(ids.get(0)), respHeaders);
|
OkHttp.stringNoRedirect(url, getHeaders(ids.get(0)), respHeaders);
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import org.jsoup.nodes.Element;
|
||||||
|
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -25,6 +26,8 @@ public class Zhaozy extends Spider {
|
||||||
private final Pattern regexAli = Pattern.compile("(https://www.aliyundrive.com/s/[^\"]+)");
|
private final Pattern regexAli = Pattern.compile("(https://www.aliyundrive.com/s/[^\"]+)");
|
||||||
private final Pattern regexVid = Pattern.compile("(\\S+)");
|
private final Pattern regexVid = Pattern.compile("(\\S+)");
|
||||||
private final String siteUrl = "https://zhaoziyuan.la/";
|
private final String siteUrl = "https://zhaoziyuan.la/";
|
||||||
|
private String username = "nikalo8893@bitvoo.com";
|
||||||
|
private String password = "P@ssw0rd";
|
||||||
|
|
||||||
private Map<String, String> getHeader() {
|
private Map<String, String> getHeader() {
|
||||||
Map<String, String> headers = new HashMap<>();
|
Map<String, String> headers = new HashMap<>();
|
||||||
|
|
@ -36,8 +39,8 @@ public class Zhaozy extends Spider {
|
||||||
|
|
||||||
private String getCookie() {
|
private String getCookie() {
|
||||||
Map<String, String> params = new HashMap<>();
|
Map<String, String> params = new HashMap<>();
|
||||||
params.put("username", "nikalo8893@bitvoo.com");
|
params.put("username", username);
|
||||||
params.put("password", "P@ssw0rd");
|
params.put("password", password);
|
||||||
Map<String, String> headers = new HashMap<>();
|
Map<String, String> headers = new HashMap<>();
|
||||||
headers.put("User-Agent", Misc.CHROME);
|
headers.put("User-Agent", Misc.CHROME);
|
||||||
headers.put("Referer", siteUrl + "login.html");
|
headers.put("Referer", siteUrl + "login.html");
|
||||||
|
|
@ -51,15 +54,20 @@ public class Zhaozy extends Spider {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(Context context, String extend) {
|
public void init(Context context, String extend) {
|
||||||
Ali.get().init(extend);
|
String[] split = extend.split("\\$\\$\\$");
|
||||||
|
Ali.get().init(split[0]);
|
||||||
|
if (split.length > 2) {
|
||||||
|
username = split[1];
|
||||||
|
password = split[2];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String detailContent(List<String> ids) throws Exception {
|
public String detailContent(List<String> ids) throws Exception {
|
||||||
|
if (Ali.pattern.matcher(ids.get(0)).find()) return Ali.get().detailContent(ids);
|
||||||
Matcher matcher = regexAli.matcher(OkHttp.string(siteUrl + ids.get(0), getHeader()));
|
Matcher matcher = regexAli.matcher(OkHttp.string(siteUrl + ids.get(0), getHeader()));
|
||||||
if (!matcher.find()) return "";
|
if (matcher.find()) return Ali.get().detailContent(Arrays.asList(matcher.group(1)));
|
||||||
ids.set(0, matcher.group(1));
|
return "";
|
||||||
return Ali.get().detailContent(ids);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
a84fef826cb82da525469e8acf1e7d9a
|
d5d77424e72a6ade93621611b1114875
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"spider": "https://gh-proxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;a84fef826cb82da525469e8acf1e7d9a",
|
"spider": "https://gh-proxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;35197828e17d4bdf2e5ad4b91e5f2071",
|
||||||
"wallpaper": "https://gao.chuqiuyu.tk",
|
"wallpaper": "https://gao.chuqiuyu.tk",
|
||||||
"lives": [
|
"lives": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"spider": "https://gh-proxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;a84fef826cb82da525469e8acf1e7d9a",
|
"spider": "https://gh-proxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;35197828e17d4bdf2e5ad4b91e5f2071",
|
||||||
"wallpaper": "http://www.kf666888.cn/api/tvbox/img",
|
"wallpaper": "http://www.kf666888.cn/api/tvbox/img",
|
||||||
"lives": [
|
"lives": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue