uc bug
This commit is contained in:
parent
be0fd5f6ff
commit
239b2fa129
|
|
@ -47,7 +47,7 @@ public class UCApi {
|
||||||
private List<String> subtitleExts = Arrays.asList(".srt", ".ass", ".scc", ".stl", ".ttml");
|
private List<String> subtitleExts = Arrays.asList(".srt", ".ass", ".scc", ".stl", ".ttml");
|
||||||
private Map<String, String> saveFileIdCaches = new HashMap<>();
|
private Map<String, String> saveFileIdCaches = new HashMap<>();
|
||||||
private String saveDirId = null;
|
private String saveDirId = null;
|
||||||
private String saveDirName = "TV";
|
private final String saveDirName = "TV";
|
||||||
private boolean isVip = false;
|
private boolean isVip = false;
|
||||||
private final Cache cache;
|
private final Cache cache;
|
||||||
private ScheduledExecutorService service;
|
private ScheduledExecutorService service;
|
||||||
|
|
@ -267,11 +267,11 @@ public class UCApi {
|
||||||
|
|
||||||
private void initUserInfo() {
|
private void initUserInfo() {
|
||||||
try {
|
try {
|
||||||
SpiderDebug.log("initUserInfo...");
|
SpiderDebug.log("uc initUserInfo...");
|
||||||
|
|
||||||
//extend没有cookie,从缓存中获取
|
//extend没有cookie,从缓存中获取
|
||||||
if (StringUtils.isAllBlank(cookie)) {
|
if (StringUtils.isAllBlank(cookie)) {
|
||||||
SpiderDebug.log(" cookie from ext is empty...");
|
SpiderDebug.log("uc cookie from ext is empty...");
|
||||||
cookie = cache.getUser().getCookie();
|
cookie = cache.getUser().getCookie();
|
||||||
}
|
}
|
||||||
//获取到cookie,初始化uc,并且把cookie缓存一次
|
//获取到cookie,初始化uc,并且把cookie缓存一次
|
||||||
|
|
@ -284,8 +284,8 @@ public class UCApi {
|
||||||
|
|
||||||
//没有cookie,也没有serviceTicket,抛出异常,提示用户重新登录
|
//没有cookie,也没有serviceTicket,抛出异常,提示用户重新登录
|
||||||
if (StringUtils.isAllBlank(cookie) && StringUtils.isAllBlank(serviceTicket)) {
|
if (StringUtils.isAllBlank(cookie) && StringUtils.isAllBlank(serviceTicket)) {
|
||||||
SpiderDebug.log("cookie为空");
|
SpiderDebug.log("uccookie为空");
|
||||||
throw new RuntimeException("cookie为空");
|
throw new RuntimeException("uccookie为空");
|
||||||
}
|
}
|
||||||
|
|
||||||
String token = serviceTicket;
|
String token = serviceTicket;
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,9 @@
|
||||||
package com.github.catvod.utils;
|
package com.github.catvod.utils;
|
||||||
|
|
||||||
import android.os.Environment;
|
import android.os.Environment;
|
||||||
|
import com.github.catvod.crawler.SpiderDebug;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.*;
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.FileOutputStream;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -67,6 +64,8 @@ public class Path {
|
||||||
fos.close();
|
fos.close();
|
||||||
return file;
|
return file;
|
||||||
} catch (Exception ignored) {
|
} catch (Exception ignored) {
|
||||||
|
ignored.printStackTrace();
|
||||||
|
SpiderDebug.log("写入文件出错:" + ignored.getMessage());
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
3af27a422f8b3a1364db578ccabd2b22
|
0439cfe9d4680c40a374aa309835fbf0
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"spider": "https://androidcatvodspider.pages.dev/jar/custom_spider.jar;md5;3af27a422f8b3a1364db578ccabd2b22",
|
"spider": "https://ghp.ci/https://raw.githubusercontent.com/lushunming/AndroidCatVodSpider/dev/jar/custom_spider.jar;md5;0439cfe9d4680c40a374aa309835fbf0",
|
||||||
"lives": [
|
"lives": [
|
||||||
{
|
{
|
||||||
"name": "直播ipv6",
|
"name": "直播ipv6",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"spider": "https://androidcatvodspider.pages.dev/jar/custom_spider.jar;md5;3af27a422f8b3a1364db578ccabd2b22",
|
"spider": "https://androidcatvodspider.pages.dev/jar/custom_spider.jar;md5;0439cfe9d4680c40a374aa309835fbf0",
|
||||||
"lives": [
|
"lives": [
|
||||||
{
|
{
|
||||||
"name": "直播ipv6",
|
"name": "直播ipv6",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"spider": "https://androidcatvodspider.pages.dev/jar/custom_spider.jar;md5;3af27a422f8b3a1364db578ccabd2b22",
|
"spider": "https://androidcatvodspider.pages.dev/jar/custom_spider.jar;md5;0439cfe9d4680c40a374aa309835fbf0",
|
||||||
"lives": [
|
"lives": [
|
||||||
{
|
{
|
||||||
"name": "直播ipv6",
|
"name": "直播ipv6",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue