Fix Hanime

This commit is contained in:
唐三 2023-08-29 20:07:12 +08:00
parent 9440931bd9
commit 66240ed028
5 changed files with 8 additions and 6 deletions

View File

@ -8,6 +8,7 @@ import com.github.catvod.crawler.Spider;
import com.github.catvod.net.OkHttp;
import com.github.catvod.utils.Utils;
import org.json.JSONObject;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
@ -101,9 +102,10 @@ public class Hanime extends Spider {
public String detailContent(List<String> ids) throws Exception {
Document doc = Jsoup.parse(OkHttp.string(siteUrl.concat("/watch?v=").concat(ids.get(0)), getHeaders()));
String name = doc.getElementById("shareBtn-title").text();
String content = doc.select("div.video-caption-text").text();
String pic = doc.select("meta[property=og:image]").attr("content");
String url = doc.getElementById("video-sd").attr("value");
JSONObject json = new JSONObject(doc.select("script[type=application/ld+json]").html().trim());
String content = json.optString("description");
String pic = json.optJSONArray("thumbnailUrl").optString(0);
String url = json.optString("contentUrl");;
Vod vod = new Vod();
vod.setVodId(ids.get(0));
vod.setVodPic(pic);

Binary file not shown.

View File

@ -1 +1 @@
a296bd2bc81da9960738fa6edd394246
ee906871fa3ef19a87da0fad4947e36b

View File

@ -1,5 +1,5 @@
{
"spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;a296bd2bc81da9960738fa6edd394246",
"spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;ee906871fa3ef19a87da0fad4947e36b",
"wallpaper": "https://gao.chuqiuyu.tk",
"sites": [
{

View File

@ -1,5 +1,5 @@
{
"spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;a296bd2bc81da9960738fa6edd394246",
"spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;ee906871fa3ef19a87da0fad4947e36b",
"wallpaper": "http://饭太硬.top/深色壁纸/api.php",
"sites": [
{