Merge branch 'main' of https://github.com/FongMi/CatVodSpider
This commit is contained in:
commit
2e9ab27926
|
|
@ -17,6 +17,7 @@ import com.github.catvod.bean.ali.Code;
|
||||||
import com.github.catvod.bean.ali.Data;
|
import com.github.catvod.bean.ali.Data;
|
||||||
import com.github.catvod.bean.ali.Item;
|
import com.github.catvod.bean.ali.Item;
|
||||||
import com.github.catvod.bean.ali.OAuth;
|
import com.github.catvod.bean.ali.OAuth;
|
||||||
|
import com.github.catvod.bean.ali.Sorter;
|
||||||
import com.github.catvod.bean.ali.User;
|
import com.github.catvod.bean.ali.User;
|
||||||
import com.github.catvod.crawler.SpiderDebug;
|
import com.github.catvod.crawler.SpiderDebug;
|
||||||
import com.github.catvod.net.OkHttp;
|
import com.github.catvod.net.OkHttp;
|
||||||
|
|
@ -30,12 +31,7 @@ import org.json.JSONArray;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
import java.util.concurrent.ScheduledExecutorService;
|
import java.util.concurrent.ScheduledExecutorService;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
@ -258,6 +254,7 @@ public class API {
|
||||||
List<String> playFrom = Arrays.asList("原畫", "超清", "高清");
|
List<String> playFrom = Arrays.asList("原畫", "超清", "高清");
|
||||||
List<String> episode = new ArrayList<>();
|
List<String> episode = new ArrayList<>();
|
||||||
List<String> playUrl = new ArrayList<>();
|
List<String> playUrl = new ArrayList<>();
|
||||||
|
Sorter.sort(files);
|
||||||
for (Item file : files) episode.add(file.getDisplayName() + "$" + file.getFileId() + findSubs(file.getName(), subMap));
|
for (Item file : files) episode.add(file.getDisplayName() + "$" + file.getFileId() + findSubs(file.getName(), subMap));
|
||||||
for (int i = 0; i < playFrom.size(); i++) playUrl.add(TextUtils.join("#", episode));
|
for (int i = 0; i < playFrom.size(); i++) playUrl.add(TextUtils.join("#", episode));
|
||||||
Vod vod = new Vod();
|
Vod vod = new Vod();
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.github.catvod.bean.ali;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class Sorter implements Comparator<Item> {
|
||||||
|
|
||||||
|
public static void sort(List<Item> items) {
|
||||||
|
Collections.sort(items, new Sorter());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int compare(Item o1, Item o2) {
|
||||||
|
try {
|
||||||
|
return Integer.valueOf(o1.getDisplayName()).compareTo(Integer.valueOf(o2.getDisplayName()));
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
return o1.getDisplayName().compareToIgnoreCase(o2.getDisplayName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
c08916c262b65e7a7caff865d900f3b7
|
dc64f1fe003adcd9916ee38638684376
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;c08916c262b65e7a7caff865d900f3b7",
|
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;dc64f1fe003adcd9916ee38638684376",
|
||||||
"wallpaper": "https://gao.chuqiuyu.tk",
|
"wallpaper": "https://gao.chuqiuyu.tk",
|
||||||
"sites": [
|
"sites": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;c08916c262b65e7a7caff865d900f3b7",
|
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;dc64f1fe003adcd9916ee38638684376",
|
||||||
"wallpaper": "http://饭太硬.ga/深色壁纸/api.php",
|
"wallpaper": "http://饭太硬.ga/深色壁纸/api.php",
|
||||||
"sites": [
|
"sites": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue