Update jar
This commit is contained in:
parent
957a4110cd
commit
9f60e8fc9b
|
|
@ -11,6 +11,7 @@ import com.github.catvod.bean.alist.Sorter;
|
|||
import com.github.catvod.crawler.Spider;
|
||||
import com.github.catvod.net.OkHttpUtil;
|
||||
import com.github.catvod.utils.Misc;
|
||||
import com.github.catvod.utils.Trans;
|
||||
import com.google.gson.JsonParser;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
|
||||
|
|
@ -121,7 +122,7 @@ public class AList extends Spider {
|
|||
vod.setVodPic(item.getPic());
|
||||
vod.setVodTag(item.getVodTag());
|
||||
vod.setVodPlayFrom("播放");
|
||||
vod.setVodPlayUrl(item.getName() + "$" + item.getUrl() + findSubs(path, parents));
|
||||
vod.setVodPlayUrl(Trans.get(item.getName()) + "$" + item.getUrl() + findSubs(path, parents));
|
||||
return Result.string(vod);
|
||||
}
|
||||
|
||||
|
|
@ -166,7 +167,7 @@ public class AList extends Spider {
|
|||
|
||||
private String findSubs(String path, List<Item> items) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (Item item : items) if (Misc.isSub(item.getExt())) sb.append("+").append(item.getName()).append("@").append(Misc.getSubMimeType(item.getExt())).append("@").append(item.getVodId(path));
|
||||
for (Item item : items) if (Misc.isSub(item.getExt())) sb.append("+").append(Trans.get(item.getName())).append("@").append(Misc.getSubMimeType(item.getExt())).append("@").append(item.getVodId(path));
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.github.catvod.bean.Result;
|
|||
import com.github.catvod.bean.Vod;
|
||||
import com.github.catvod.net.OkHttpUtil;
|
||||
import com.github.catvod.utils.Misc;
|
||||
import com.github.catvod.utils.Trans;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
|
|
@ -95,7 +96,7 @@ public class Ali {
|
|||
List<String> playUrls = new ArrayList<>();
|
||||
List<String> names = new ArrayList<>(name2id.keySet());
|
||||
Collections.sort(names);
|
||||
for (String name : names) playUrls.add(name + "$" + name2id.get(name) + findSubs(name, subMap));
|
||||
for (String name : names) playUrls.add(Trans.get(name) + "$" + name2id.get(name) + findSubs(name, subMap));
|
||||
List<String> sourceUrls = new ArrayList<>();
|
||||
sourceUrls.add(TextUtils.join("#", playUrls));
|
||||
sourceUrls.add(TextUtils.join("#", playUrls));
|
||||
|
|
@ -194,7 +195,7 @@ public class Ali {
|
|||
if (!text.contains("@")) continue;
|
||||
String[] arr = text.split("@");
|
||||
String url = Proxy.getUrl() + "?do=ali&type=sub&share_id=" + shareId + "&share_token=" + shareToken + "&file_id=" + arr[1];
|
||||
sb.append(arr[0]).append("#").append(Misc.getSubMimeType(arr[2])).append("#").append(url).append("$$$");
|
||||
sb.append(Trans.get(arr[0])).append("#").append(Misc.getSubMimeType(arr[2])).append("#").append(url).append("$$$");
|
||||
}
|
||||
return Misc.substring(sb.toString(), 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.github.catvod.bean.Vod;
|
|||
import com.github.catvod.crawler.Spider;
|
||||
import com.github.catvod.net.OkHttpUtil;
|
||||
import com.github.catvod.utils.Misc;
|
||||
import com.github.catvod.utils.Trans;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
|
@ -98,7 +99,7 @@ public class Bili extends Spider {
|
|||
for (int i = 0; i < pages.length(); ++i) {
|
||||
JSONObject page = pages.getJSONObject(i);
|
||||
String title = page.getString("part").replace("$", "_").replace("#", "_");
|
||||
playlist.add(title + "$" + aid + "+ " + page.getLong("cid"));
|
||||
playlist.add(Trans.get(title) + "$" + aid + "+ " + page.getLong("cid"));
|
||||
}
|
||||
Vod vod = new Vod();
|
||||
vod.setVodId(bvid);
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import com.github.catvod.crawler.Spider;
|
|||
import com.github.catvod.crawler.SpiderDebug;
|
||||
import com.github.catvod.net.OkHttpUtil;
|
||||
import com.github.catvod.utils.Misc;
|
||||
import com.github.catvod.utils.Trans;
|
||||
import com.github.catvod.xpath.XPathRule;
|
||||
|
||||
import org.json.JSONArray;
|
||||
|
|
@ -233,7 +234,7 @@ public class XPath extends Spider {
|
|||
name = rule.getDetailUrlNameR(name);
|
||||
String id = urlNodes.get(j).selOne(rule.getDetailUrlId()).asString().trim();
|
||||
id = rule.getDetailUrlIdR(id);
|
||||
vodItems.add(name + "$" + id);
|
||||
vodItems.add(Trans.get(name) + "$" + id);
|
||||
}
|
||||
if (vodItems.size() == 0 && playFrom.size() > i) {
|
||||
playFrom.set(i, "");
|
||||
|
|
@ -249,10 +250,8 @@ public class XPath extends Spider {
|
|||
for (int i = playList.size() - 1; i >= 0; i--) {
|
||||
if (i >= playFrom.size()) playList.remove(i);
|
||||
}
|
||||
String vod_play_from = TextUtils.join("$$$", playFrom);
|
||||
String vod_play_url = TextUtils.join("$$$", playList);
|
||||
vod.setVodPlayFrom(vod_play_from);
|
||||
vod.setVodPlayUrl(vod_play_url);
|
||||
vod.setVodPlayFrom(TextUtils.join("$$$", playFrom));
|
||||
vod.setVodPlayUrl(TextUtils.join("$$$", playList));
|
||||
return Result.string(vod);
|
||||
}
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
c3bc29415e53fe4742d9a90bd148fa55
|
||||
80948ea66592b950a4c231de11ebaf78
|
||||
|
|
|
|||
Loading…
Reference in New Issue