Merge branch 'main' of https://github.com/FongMi/CatVodSpider
This commit is contained in:
commit
cc8e76ceb6
|
|
@ -38,9 +38,9 @@ dependencies {
|
||||||
debugImplementation 'org.chromium.net:cronet-embedded:101.4951.41'
|
debugImplementation 'org.chromium.net:cronet-embedded:101.4951.41'
|
||||||
implementation('com.github.thegrizzlylabs:sardine-android:0.8') { exclude group: 'com.squareup.okhttp3', module: 'okhttp' }
|
implementation('com.github.thegrizzlylabs:sardine-android:0.8') { exclude group: 'com.squareup.okhttp3', module: 'okhttp' }
|
||||||
implementation 'com.googlecode.juniversalchardet:juniversalchardet:1.0.3'
|
implementation 'com.googlecode.juniversalchardet:juniversalchardet:1.0.3'
|
||||||
implementation('com.squareup.okhttp3:okhttp:3.12.13') { force = true }
|
|
||||||
implementation 'wang.harlon.quickjs:wrapper-android:0.21.1'
|
implementation 'wang.harlon.quickjs:wrapper-android:0.21.1'
|
||||||
implementation 'com.google.net.cronet:cronet-okhttp:0.1.0'
|
implementation 'com.google.net.cronet:cronet-okhttp:0.1.0'
|
||||||
|
implementation 'com.squareup.okhttp3:okhttp:3.12.13'
|
||||||
implementation 'com.google.code.gson:gson:2.8.6'
|
implementation 'com.google.code.gson:gson:2.8.6'
|
||||||
implementation 'cn.wanghaomiao:JsoupXpath:2.5.1'
|
implementation 'cn.wanghaomiao:JsoupXpath:2.5.1'
|
||||||
implementation 'com.google.zxing:core:3.3.0'
|
implementation 'com.google.zxing:core:3.3.0'
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ public class Bili extends Spider {
|
||||||
private JsonObject extend;
|
private JsonObject extend;
|
||||||
private String cookie;
|
private String cookie;
|
||||||
private boolean login;
|
private boolean login;
|
||||||
|
private static boolean AskOnlyOnce = false;
|
||||||
|
|
||||||
private Map<String, String> getHeader(String cookie) {
|
private Map<String, String> getHeader(String cookie) {
|
||||||
Map<String, String> headers = new HashMap<>();
|
Map<String, String> headers = new HashMap<>();
|
||||||
|
|
@ -145,7 +146,7 @@ public class Bili extends Spider {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String detailContent(List<String> ids) throws Exception {
|
public String detailContent(List<String> ids) throws Exception {
|
||||||
if (!login) checkLogin();
|
if (!login && !AskOnlyOnce) checkLogin();
|
||||||
|
|
||||||
String[] split = ids.get(0).split("@");
|
String[] split = ids.get(0).split("@");
|
||||||
String id = split[0];
|
String id = split[0];
|
||||||
|
|
@ -262,7 +263,8 @@ public class Bili extends Spider {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void getQRCode() {
|
private void getQRCode() {
|
||||||
if (login || getUserCache().exists() && COOKIE.equals(cookie)) return;
|
if (login) return;
|
||||||
|
AskOnlyOnce = true;
|
||||||
String json = OkHttp.string("https://passport.bilibili.com/x/passport-login/web/qrcode/generate?source=main-mini");
|
String json = OkHttp.string("https://passport.bilibili.com/x/passport-login/web/qrcode/generate?source=main-mini");
|
||||||
Data data = Resp.objectFrom(json).getData();
|
Data data = Resp.objectFrom(json).getData();
|
||||||
Init.run(() -> openApp(data));
|
Init.run(() -> openApp(data));
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ package com.github.catvod.utils;
|
||||||
|
|
||||||
public class Image {
|
public class Image {
|
||||||
|
|
||||||
public static final String FOLDER = "https://s1.ax1x.com/2023/05/04/p9tgI81.png";
|
public static final String FOLDER = "https://x.imgs.ovh/x/2023/09/05/64f680bb030b4.png";
|
||||||
public static final String VIDEO = "https://s1.ax1x.com/2023/05/04/p9tgogx.png";
|
public static final String VIDEO = "https://x.imgs.ovh/x/2023/09/05/64f67fe2e7720.png";
|
||||||
|
|
||||||
public static String getIcon(boolean folder) {
|
public static String getIcon(boolean folder) {
|
||||||
return folder ? FOLDER : VIDEO;
|
return folder ? FOLDER : VIDEO;
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ public class Utils {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isSub(String ext) {
|
public static boolean isSub(String ext) {
|
||||||
return ext.equals("srt") || ext.equals("ass") || ext.equals("ssa");
|
return ext.equals("srt") || ext.equals("ass") || ext.equals("ssa") || ext.equals("vtt");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getExt(String name) {
|
public static String getExt(String name) {
|
||||||
|
|
@ -196,6 +196,8 @@ public class Utils {
|
||||||
try {
|
try {
|
||||||
Matcher matcher = Pattern.compile(".*(1080|720|2160|4k|4K).*").matcher(text);
|
Matcher matcher = Pattern.compile(".*(1080|720|2160|4k|4K).*").matcher(text);
|
||||||
if (matcher.find()) text = matcher.group(1) + " " + text;
|
if (matcher.find()) text = matcher.group(1) + " " + text;
|
||||||
|
matcher = Pattern.compile("^([0-9]+)").matcher(text);
|
||||||
|
if (matcher.find()) text = matcher.group(1) + " " + text;
|
||||||
return text.replaceAll("\\D+", "");
|
return text.replaceAll("\\D+", "");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return "";
|
return "";
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,6 @@ plugins {
|
||||||
id 'com.android.library' version '7.2.2' apply false
|
id 'com.android.library' version '7.2.2' apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
tasks.register('clean', Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
0cd8dd32e89511058fd8e6bceb586a28
|
bb25b79fe383dfe57c8d984824e700e2
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;0cd8dd32e89511058fd8e6bceb586a28",
|
"spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;bb25b79fe383dfe57c8d984824e700e2",
|
||||||
"wallpaper": "https://gao.chuqiuyu.tk",
|
"wallpaper": "https://gao.chuqiuyu.tk",
|
||||||
"sites": [
|
"sites": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"vodPic": "https://s1.ax1x.com/2023/05/04/p9tgI81.png",
|
"vodPic": "https://x.imgs.ovh/x/2023/09/05/64f680bb030b4.png",
|
||||||
"drives": [
|
"drives": [
|
||||||
{
|
{
|
||||||
"name": "小雅",
|
"name": "小雅",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;0cd8dd32e89511058fd8e6bceb586a28",
|
"spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;bb25b79fe383dfe57c8d984824e700e2",
|
||||||
"wallpaper": "http://饭太硬.top/深色壁纸/api.php",
|
"wallpaper": "http://饭太硬.top/深色壁纸/api.php",
|
||||||
"sites": [
|
"sites": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue