Merge branch 'main' of https://github.com/FongMi/CatVodSpider
This commit is contained in:
commit
0e794d7427
|
|
@ -11,7 +11,7 @@ android {
|
||||||
minSdk 17
|
minSdk 17
|
||||||
targetSdk 29
|
targetSdk 29
|
||||||
ndk { abiFilters "armeabi-v7a" }
|
ndk { abiFilters "armeabi-v7a" }
|
||||||
buildConfigField "String", "APP_ID", "\"5dde4e1bdf9e4966b387ba58f4b3fdc3\""
|
buildConfigField("String", "APP_ID", "\"${appId}\"")
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ public class Item {
|
||||||
private String insertTime;
|
private String insertTime;
|
||||||
|
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
return TextUtils.isEmpty(title) ? "" : title;
|
return TextUtils.isEmpty(title) ? "" : title.replaceAll("<em>", "").replaceAll("</em>", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPageUrl() {
|
public String getPageUrl() {
|
||||||
|
|
@ -26,8 +26,9 @@ public class Item {
|
||||||
return TextUtils.isEmpty(insertTime) ? "" : insertTime;
|
return TextUtils.isEmpty(insertTime) ? "" : insertTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAli() {
|
public Item url(String pageUrl) {
|
||||||
return getPageUrl().contains("www.aliyundrive.com");
|
this.pageUrl = pageUrl;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Vod getVod() {
|
public Vod getVod() {
|
||||||
|
|
|
||||||
|
|
@ -1,38 +1,41 @@
|
||||||
package com.github.catvod.spider;
|
package com.github.catvod.spider;
|
||||||
|
|
||||||
import android.util.Base64;
|
|
||||||
|
|
||||||
import com.github.catvod.bean.Result;
|
import com.github.catvod.bean.Result;
|
||||||
import com.github.catvod.bean.Vod;
|
import com.github.catvod.bean.Vod;
|
||||||
import com.github.catvod.bean.upyun.Data;
|
import com.github.catvod.bean.upyun.Data;
|
||||||
import com.github.catvod.bean.upyun.Item;
|
import com.github.catvod.bean.upyun.Item;
|
||||||
import com.github.catvod.net.OkHttp;
|
import com.github.catvod.net.OkHttp;
|
||||||
import com.github.catvod.utils.Utils;
|
import com.google.common.io.BaseEncoding;
|
||||||
|
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
import javax.crypto.Cipher;
|
||||||
|
import javax.crypto.spec.IvParameterSpec;
|
||||||
|
import javax.crypto.spec.SecretKeySpec;
|
||||||
|
|
||||||
public class UpYun extends Ali {
|
public class UpYun extends Ali {
|
||||||
|
|
||||||
private final String siteUrl = "https://www.upyunso.com/";
|
|
||||||
private final String apiUrl = "https://api.upyunso2.com/";
|
|
||||||
|
|
||||||
private Map<String, String> getHeaders() {
|
|
||||||
HashMap<String, String> headers = new HashMap<>();
|
|
||||||
headers.put("User-Agent", Utils.CHROME);
|
|
||||||
headers.put("Referer", siteUrl);
|
|
||||||
return headers;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String searchContent(String key, boolean quick) {
|
public String searchContent(String key, boolean quick) throws Exception {
|
||||||
String url = apiUrl + "search?keyword=" + URLEncoder.encode(key) + "&page=1&s_type=2";
|
String res = decode(OkHttp.string("https://zyb.upyunso.com/v15/search?keyword=" + URLEncoder.encode(key) + "&page=1&s_type=2"));
|
||||||
String res = new String(Base64.decode(OkHttp.string(url, getHeaders()), Base64.DEFAULT));
|
|
||||||
List<Vod> list = new ArrayList<>();
|
List<Vod> list = new ArrayList<>();
|
||||||
for (Item item : Data.objectFrom(res).getResult().getItems()) if (item.isAli() && item.getTitle().contains(key)) list.add(item.getVod());
|
for (Item item : Data.objectFrom(res).getResult().getItems()) {
|
||||||
|
String url = decode(item.getPageUrl());
|
||||||
|
if (!url.contains("www.aliyundrive.com")) continue;
|
||||||
|
if (item.getTitle().contains(key)) list.add(item.url(url).getVod());
|
||||||
|
}
|
||||||
return Result.string(list);
|
return Result.string(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String decode(String data) throws Exception {
|
||||||
|
SecretKeySpec keySpec = new SecretKeySpec("qq1920520460qqzz".getBytes(), "AES");
|
||||||
|
IvParameterSpec ivSpec = new IvParameterSpec("qq1920520460qqzz".getBytes());
|
||||||
|
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
|
||||||
|
cipher.init(Cipher.DECRYPT_MODE, keySpec, ivSpec);
|
||||||
|
byte[] encryptDataBytes = BaseEncoding.base16().decode(data.toUpperCase());
|
||||||
|
byte[] decryptData = cipher.doFinal(encryptDataBytes);
|
||||||
|
return new String(decryptData, "UTF-8");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -18,4 +18,5 @@ android.useAndroidX=true
|
||||||
# Enables namespacing of each library's R class so that its R class includes only the
|
# Enables namespacing of each library's R class so that its R class includes only the
|
||||||
# resources declared in the library itself and none from the library's dependencies,
|
# resources declared in the library itself and none from the library's dependencies,
|
||||||
# thereby reducing the size of the R class for that library
|
# thereby reducing the size of the R class for that library
|
||||||
android.nonTransitiveRClass=true
|
android.nonTransitiveRClass=true
|
||||||
|
appId=5dde4e1bdf9e4966b387ba58f4b3fdc3
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
798306224186a353374b7bbaed582bde
|
dfb5901a5b7325e193395db4ae6541b4
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"spider": "https://gh-proxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;798306224186a353374b7bbaed582bde",
|
"spider": "https://gh-proxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;dfb5901a5b7325e193395db4ae6541b4",
|
||||||
"wallpaper": "https://gao.chuqiuyu.tk",
|
"wallpaper": "https://gao.chuqiuyu.tk",
|
||||||
"lives": [
|
"lives": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,16 @@
|
||||||
{
|
{
|
||||||
"spider": "https://gh-proxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;798306224186a353374b7bbaed582bde",
|
"spider": "https://gh-proxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;dfb5901a5b7325e193395db4ae6541b4",
|
||||||
"wallpaper": "http://www.kf666888.cn/api/tvbox/img",
|
"wallpaper": "http://www.kf666888.cn/api/tvbox/img",
|
||||||
"lives": [
|
"lives": [
|
||||||
{
|
{
|
||||||
"name": "直播",
|
"name": "TXT",
|
||||||
|
"type": 0,
|
||||||
|
"url": "http://home.jundie.top:81/Cat/tv/live.txt",
|
||||||
|
"epg": "http://epg.51zmt.top:8000/api/diyp/?ch={name}&date={date}",
|
||||||
|
"logo": "https://epg.112114.xyz/logo/{name}.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Json",
|
||||||
"type": 1,
|
"type": 1,
|
||||||
"url": "https://gh-proxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/json/live.json",
|
"url": "https://gh-proxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/json/live.json",
|
||||||
"epg": "http://epg.51zmt.top:8000/api/diyp/?ch={epg}&date={date}",
|
"epg": "http://epg.51zmt.top:8000/api/diyp/?ch={epg}&date={date}",
|
||||||
|
|
|
||||||
3237
json/live.json
3237
json/live.json
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue