Merge branch 'main' of https://github.com/FongMi/CatVodSpider
This commit is contained in:
commit
3439f4c4b7
|
|
@ -83,7 +83,7 @@ public class API {
|
||||||
tempIds = new ArrayList<>();
|
tempIds = new ArrayList<>();
|
||||||
oauth = OAuth.objectFrom(FileUtil.read(getOAuthCache()));
|
oauth = OAuth.objectFrom(FileUtil.read(getOAuthCache()));
|
||||||
user = User.objectFrom(FileUtil.read(getUserCache()));
|
user = User.objectFrom(FileUtil.read(getUserCache()));
|
||||||
drive = Drive.objectFrom(FileUtil.read(getUserCache()));
|
drive = Drive.objectFrom(FileUtil.read(getDriveCache()));
|
||||||
quality = new HashMap<>();
|
quality = new HashMap<>();
|
||||||
quality.put("4K", "UHD");
|
quality.put("4K", "UHD");
|
||||||
quality.put("2k", "QHD");
|
quality.put("2k", "QHD");
|
||||||
|
|
@ -227,11 +227,11 @@ public class API {
|
||||||
String result = auth("https://user.aliyundrive.com/v2/user/get", "{}", false);
|
String result = auth("https://user.aliyundrive.com/v2/user/get", "{}", false);
|
||||||
drive = Drive.objectFrom(result).save();
|
drive = Drive.objectFrom(result).save();
|
||||||
driveId = drive.getResourceDriveId().isEmpty() ? drive.getDriveId() : drive.getResourceDriveId();
|
driveId = drive.getResourceDriveId().isEmpty() ? drive.getDriveId() : drive.getResourceDriveId();
|
||||||
return true;
|
return false;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
drive.clean().save();
|
drive.clean().save();
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -376,7 +376,7 @@ public class API {
|
||||||
public String getDownloadUrl(String fileId) {
|
public String getDownloadUrl(String fileId) {
|
||||||
try {
|
try {
|
||||||
SpiderDebug.log("getDownloadUrl..." + fileId);
|
SpiderDebug.log("getDownloadUrl..." + fileId);
|
||||||
if (!getDriveId()) throw new Exception("unable obtain drive id");
|
if (getDriveId()) throw new Exception("unable obtain drive id");
|
||||||
tempIds.add(0, copy(fileId));
|
tempIds.add(0, copy(fileId));
|
||||||
JSONObject body = new JSONObject();
|
JSONObject body = new JSONObject();
|
||||||
body.put("file_id", tempIds.get(0));
|
body.put("file_id", tempIds.get(0));
|
||||||
|
|
@ -394,7 +394,7 @@ public class API {
|
||||||
public JSONObject getVideoPreviewPlayInfo(String fileId) {
|
public JSONObject getVideoPreviewPlayInfo(String fileId) {
|
||||||
try {
|
try {
|
||||||
SpiderDebug.log("getVideoPreviewPlayInfo..." + fileId);
|
SpiderDebug.log("getVideoPreviewPlayInfo..." + fileId);
|
||||||
if (!getDriveId()) throw new Exception("unable obtain drive id");
|
if (getDriveId()) throw new Exception("unable obtain drive id");
|
||||||
tempIds.add(0, copy(fileId));
|
tempIds.add(0, copy(fileId));
|
||||||
JSONObject body = new JSONObject();
|
JSONObject body = new JSONObject();
|
||||||
body.put("file_id", tempIds.get(0));
|
body.put("file_id", tempIds.get(0));
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
dc65fa8fabc0fba297b0dd6000af50be
|
f51d388e6b71feab1764866c37a7b84a
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue