This commit is contained in:
parent
4cb62ebba6
commit
dc70fd77d5
|
|
@ -392,7 +392,7 @@ public class QuarkApi {
|
|||
|
||||
public List<String> getPlayFormatList() {
|
||||
if (this.isVip) {
|
||||
return Arrays.asList("4K", "超清", "高清", "普画");
|
||||
return Arrays.asList("4K"/*, "超清", "高清", "普画"*/);
|
||||
} else {
|
||||
return Collections.singletonList("普画");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ import static com.github.catvod.api.TianyiApi.URL_START;
|
|||
*/
|
||||
public class Cloud extends Spider {
|
||||
private Quark quark = null;
|
||||
private Ali ali = null;
|
||||
private UC uc = null;
|
||||
/* private Ali ali = null;
|
||||
private UC uc = null;*/
|
||||
private TianYi tianYi = null;
|
||||
private YiDongYun yiDongYun = null;
|
||||
|
||||
|
|
@ -28,14 +28,14 @@ public class Cloud extends Spider {
|
|||
public void init(Context context, String extend) throws Exception {
|
||||
JsonObject ext = Json.safeObject(extend);
|
||||
quark = new Quark();
|
||||
uc = new UC();
|
||||
ali = new Ali();
|
||||
/* uc = new UC();
|
||||
ali = new Ali();*/
|
||||
tianYi = new TianYi();
|
||||
yiDongYun = new YiDongYun();
|
||||
boolean first = Objects.nonNull(ext);
|
||||
quark.init(context, first && ext.has("cookie") ? ext.get("cookie").getAsString() : "");
|
||||
uc.init(context, first && ext.has("uccookie") ? ext.get("uccookie").getAsString() : "");
|
||||
ali.init(context, first && ext.has("token") ? ext.get("token").getAsString() : "");
|
||||
/* uc.init(context, first && ext.has("uccookie") ? ext.get("uccookie").getAsString() : "");
|
||||
ali.init(context, first && ext.has("token") ? ext.get("token").getAsString() : "");*/
|
||||
tianYi.init(context, first && ext.has("tianyicookie") ? ext.get("tianyicookie").getAsString() : "");
|
||||
yiDongYun.init(context, "");
|
||||
|
||||
|
|
@ -43,13 +43,13 @@ public class Cloud extends Spider {
|
|||
|
||||
@Override
|
||||
public String detailContent(List<String> shareUrl) throws Exception {
|
||||
if (shareUrl.get(0).matches(Util.patternAli)) {
|
||||
/* if (shareUrl.get(0).matches(Util.patternAli)) {
|
||||
return ali.detailContent(shareUrl);
|
||||
} else if (shareUrl.get(0).matches(Util.patternQuark)) {
|
||||
} else */if (shareUrl.get(0).matches(Util.patternQuark)) {
|
||||
return quark.detailContent(shareUrl);
|
||||
} else if (shareUrl.get(0).matches(Util.patternUC)) {
|
||||
} /*else if (shareUrl.get(0).matches(Util.patternUC)) {
|
||||
return uc.detailContent(shareUrl);
|
||||
} else if (shareUrl.get(0).startsWith(TianyiApi.URL_START)) {
|
||||
} */else if (shareUrl.get(0).startsWith(TianyiApi.URL_START)) {
|
||||
return tianYi.detailContent(shareUrl);
|
||||
} else if (shareUrl.get(0).contains(YiDongYun.URL_START)) {
|
||||
return yiDongYun.detailContent(shareUrl);
|
||||
|
|
@ -61,15 +61,16 @@ public class Cloud extends Spider {
|
|||
public String playerContent(String flag, String id, List<String> vipFlags) throws Exception {
|
||||
if (flag.contains("quark")) {
|
||||
return quark.playerContent(flag, id, vipFlags);
|
||||
} else if (flag.contains("uc")) {
|
||||
} /*else if (flag.contains("uc")) {
|
||||
return uc.playerContent(flag, id, vipFlags);
|
||||
} else if (flag.contains("天意")) {
|
||||
} */else if (flag.contains("天意")) {
|
||||
return tianYi.playerContent(flag, id, vipFlags);
|
||||
} else if (flag.contains("移动")) {
|
||||
return yiDongYun.playerContent(flag, id, vipFlags);
|
||||
} else {
|
||||
}/* else {
|
||||
return ali.playerContent(flag, id, vipFlags);
|
||||
}
|
||||
}*/
|
||||
return flag;
|
||||
}
|
||||
|
||||
protected String detailContentVodPlayFrom(List<String> shareLinks) {
|
||||
|
|
@ -77,13 +78,13 @@ public class Cloud extends Spider {
|
|||
int i = 0;
|
||||
for (String shareLink : shareLinks) {
|
||||
i++;
|
||||
if (shareLink.matches(Util.patternUC)) {
|
||||
/*if (shareLink.matches(Util.patternUC)) {
|
||||
from.add(uc.detailContentVodPlayFrom(List.of(shareLink), i));
|
||||
} else if (shareLink.matches(Util.patternQuark)) {
|
||||
} else*/ if (shareLink.matches(Util.patternQuark)) {
|
||||
from.add(quark.detailContentVodPlayFrom(List.of(shareLink), i));
|
||||
} else if (shareLink.matches(Util.patternAli)) {
|
||||
} /*else if (shareLink.matches(Util.patternAli)) {
|
||||
from.add(ali.detailContentVodPlayFrom(List.of(shareLink), i));
|
||||
} else if (shareLink.startsWith(URL_START)) {
|
||||
} */else if (shareLink.startsWith(URL_START)) {
|
||||
from.add(tianYi.detailContentVodPlayFrom(List.of(shareLink), i));
|
||||
} else if (shareLink.contains(YiDongYun.URL_START)) {
|
||||
from.add(yiDongYun.detailContentVodPlayFrom(List.of(shareLink), i));
|
||||
|
|
@ -96,13 +97,13 @@ public class Cloud extends Spider {
|
|||
protected String detailContentVodPlayUrl(List<String> shareLinks) throws Exception {
|
||||
List<String> urls = new ArrayList<>();
|
||||
for (String shareLink : shareLinks) {
|
||||
if (shareLink.matches(Util.patternUC)) {
|
||||
/* if (shareLink.matches(Util.patternUC)) {
|
||||
urls.add(uc.detailContentVodPlayUrl(List.of(shareLink)));
|
||||
} else if (shareLink.matches(Util.patternQuark)) {
|
||||
} else */if (shareLink.matches(Util.patternQuark)) {
|
||||
urls.add(quark.detailContentVodPlayUrl(List.of(shareLink)));
|
||||
} else if (shareLink.matches(Util.patternAli)) {
|
||||
}/* else if (shareLink.matches(Util.patternAli)) {
|
||||
urls.add(ali.detailContentVodPlayUrl(List.of(shareLink)));
|
||||
} else if (shareLink.startsWith(URL_START)) {
|
||||
} */else if (shareLink.startsWith(URL_START)) {
|
||||
urls.add(tianYi.detailContentVodPlayUrl(List.of(shareLink)));
|
||||
} else if (shareLink.contains(YiDongYun.URL_START)) {
|
||||
urls.add(yiDongYun.detailContentVodPlayUrl(List.of(shareLink)));
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import com.github.catvod.bean.Result;
|
|||
import com.github.catvod.bean.quark.ShareData;
|
||||
import com.github.catvod.crawler.Spider;
|
||||
import com.github.catvod.crawler.SpiderDebug;
|
||||
import com.github.catvod.utils.Notify;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -55,12 +54,12 @@ public class Quark extends Spider {
|
|||
}*/
|
||||
|
||||
for (int i = 1; i <= ids.size(); i++) {
|
||||
|
||||
playFrom.add("quark原画" + i + index);
|
||||
for (String s : QuarkApi.get().getPlayFormatList()) {
|
||||
playFrom.add(String.format(Locale.getDefault(), "quark" + s + "#%02d%02d", i, index));
|
||||
|
||||
}
|
||||
playFrom.add("quark原画" + i + index);
|
||||
|
||||
}
|
||||
return TextUtils.join("$$$", playFrom);
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
14d3c420f76ba891e74f8a858bce6586
|
||||
bfe2c706e92c2fc9e470eaf042066acf
|
||||
|
|
|
|||
Loading…
Reference in New Issue