优化jellyfin搜刮器

This commit is contained in:
2021-11-17 14:17:38 +08:00
parent a6b9e4a6ac
commit 8ef33f382e
19 changed files with 574 additions and 191 deletions

View File

@@ -72,32 +72,36 @@ public class BangumiTools {
JSONArray people = new JSONArray();
JSONObject bangumi = getBangumiInfo(id);
JSONArray crt = bangumi.getJSONArray("crt");
for (Object o : crt) {
JSONObject item = (JSONObject) o;
JSONObject pel = new JSONObject();
pel.put("Name", item.getString("name_cn"));
pel.put("Role", item.getString("role_name"));
pel.put("Type", "Actor");
people.add(pel);
if(crt!=null) {
for (Object o : crt) {
JSONObject item = (JSONObject) o;
JSONObject pel = new JSONObject();
pel.put("Name", item.getString("name_cn"));
pel.put("Role", item.getString("role_name"));
pel.put("Type", "Actor");
people.add(pel);
}
}
crt = bangumi.getJSONArray("staff");
for (Object o : crt) {
JSONObject item = (JSONObject) o;
JSONObject pel = new JSONObject();
pel.put("Name", item.getString("name_cn"));
String jobsName="";
for (Object _jobs : item.getJSONArray("jobs")) {
jobsName+=_jobs+"";
if(crt!=null) {
for (Object o : crt) {
JSONObject item = (JSONObject) o;
JSONObject pel = new JSONObject();
pel.put("Name", item.getString("name_cn"));
String jobsName="";
for (Object _jobs : item.getJSONArray("jobs")) {
jobsName+=_jobs+"";
}
jobsName=jobsName.substring(0,jobsName.length()-1);
pel.put("Role", jobsName);
pel.put("Type", "");
if (jobsName.contains("导演")) {
pel.put("Type", "Director");
} else if (jobsName.contains("脚本")) {
pel.put("Type", "DirectorDirector");
}
people.add(pel);
}
jobsName=jobsName.substring(0,jobsName.length()-1);
pel.put("Role", jobsName);
pel.put("Type", "");
if (jobsName.contains("导演")) {
pel.put("Type", "Director");
} else if (jobsName.contains("脚本")) {
pel.put("Type", "DirectorDirector");
}
people.add(pel);
}
return people;
}
@@ -398,10 +402,49 @@ public class BangumiTools {
}
public static void main(String[] args) {
JSONObject json = search("小林家的龙女仆S");
/* JSONObject json = search("小林家的龙女仆S");
System.out.println(json);
json = getBangumiInfo(274234);
System.err.println("------------");
System.out.println(json);
System.out.println(json);*/
byte[] user=new byte[] {
78, 106, 73, 49, 79, 122, 65, 51, 89, 71,
65, 117, 78, 106, 78, 109, 78, 122, 99, 55,
89, 109, 85, 61 };
byte[] password=new byte[] {
89, 87, 66, 108, 79, 109, 90, 110, 78, 106,
65, 117, 79, 109, 74, 109, 78, 122, 65, 120,
79, 50, 89, 61 };
user=Base64.getDecoder().decode(user);
password=Base64.getDecoder().decode(password);
String showUser=new String(a(user));
String showPassword=new String(a(password));
System.out.println("user = "+showUser);
System.out.println("pass = "+showPassword);
String[] t1=showUser.split("-");
int t11=Integer.parseInt(t1[0],16);
int t12=Integer.parseInt(t1[1],16);
System.out.println("t11 = " + t11);
System.out.println("t12 = " + t12);
System.out.println((t11-t12));
int index=0;
for (int i = 0; i <= 13; i++) {
String t=i+"";
if(t.contains("1")){
index++;
System.err.println(t);
}
}
System.out.println(index);
System.out.println(15);
}
public static byte[] a(byte[] tmp){
byte[] data=tmp.clone();
for (byte i = 0; i < data.length; i++) {
data[i]= (byte) (data[i]^3);
}
return data;
}
}