Add files via upload

This commit is contained in:
gaotianliuyun
2022-10-19 22:33:45 +08:00
committed by GitHub
parent 5a5f44b467
commit 0cf737ead1
3 changed files with 425 additions and 358 deletions

12
json/lezhu.json Normal file
View File

@@ -0,0 +1,12 @@
{
"homeUrl": "http://www.lezhutv.com/type/{cateId}-{datePg}.html",
"header":{
"User-Agent":"Mozilla/5.0 (Linux; Android 8.1.0; ALP-AL00 Build/HUAWEIALP-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/10.13 baiduboxapp/10.13.0.11 (Baidu; P1 8.1.0)"
},
"playlist":{
"sort":1
},
"search":{
"url": "http://www.lezhutv.com/index.php?m=vod-search&wd={wd}"
}
}

View File

@@ -1,68 +1,122 @@
{ {
"ua": "", // 所有的选填字段都可以不填,程序会自己去猜,不一定能猜得出来,猜不出来的得自己去补规则
"homeUrl": "https://www.zxzj.vip", //(必填) 主页地址建议填list段中的url,程序会从url中提取homeUrl, url中至少要包含{cateId}和{catePg}才能被识别
"dcVipFlag": "true", // https://www.zxzj.vip/vodshow/{cateId}-{area}--{class}-----{catePg}---{year}.html
"pCfgJs": "https://www.zxzj.vip/static/js/playerconfig.js", // https://www.zxzj.vip/list/{cateId}-{catePg}.html
"pCfgJsR": "[\\W|\\S|.]*?MacPlayerConfig.player_list[\\W|\\S|.]*?=([\\W|\\S|.]*?),MacPlayerConfig.downer_list", "homeUrl": "https://www.zxzj.vip/",
"dcShow2Vip": {}, //(选填) http请求需要的header一般就填个UA
"dcPlayUrl": "true", "header":{
"cateNode": "//ul[contains(@class,'stui-header__menu')]/li/a[contains(@href, 'list')]", "User-Agent":"Mozilla/5.0 (Linux; Android 8.1.0; ALP-AL00 Build/HUAWEIALP-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/10.13 baiduboxapp/10.13.0.11 (Baidu; P1 8.1.0)"
"cateName": "/text()", },
"cateId": "/@href", //(选填) 分类名
"cateIdR": "/list/(\\d+).html", "cateManual": {
"cateManual":{}, "电影": "1",
"homeVodNode": "//a[contains(@class,'stui-vodlist__thumb')]", "美剧": "2",
"homeVodName": "/@title", "韩剧": "3",
"homeVodId": "/@href", "日剧": "4",
"homeVodIdR": "/detail/(\\w+).html", "泰剧": "5",
"homeVodImg": "/@data-original", "动漫": "6"
"homeVodImgR": "(http\\S+)", },
"homeVodMark": "/span[contains(@class,'pic-text')]/text()", //(选填) 列表页
"cateUrl": "https://www.zxzj.vip/vodshow/{cateId}-{area}-{by}--{lang}----{catePg}---{year}.html", "list":{
"cateVodNode": "//a[contains(@class,'stui-vodlist__thumb')]", //(选填) 当前页面解析区域截取,程序会从截取后的数据中查找各字段,这里只是演示,按实际需求填写
"cateVodName": "/@title", "region":["<html>", "</html>"],
"cateVodId": "/@href", //"url": "https://www.zxzj.vip/list/{cateId}-{catePg}.html",
"cateVodIdR": "/detail/(\\w+).html", //(选填) 列表页的页面地址具体规则和xpath一致不存在在里会使用homeUrl但是homeUrl必须是带{cateId}\{catePg}的这个格式
"cateVodImg": "/@data-original", "url": "https://www.zxzj.vip/vodshow/{cateId}-{area}--{class}-----{catePg}---{year}.html",
"cateVodImgR": "(http\\S+)", // (选填) 有的网站分类的第一页和后面的页url规则不同可以这样指定具体的catePg 对应的url
"cateVodMark": "/span[contains(@class,'pic-text')]/text()", //"1": "https://www.zxzj.vip/vodshow/{cateId}-{area}--{class}-----1---{year}.html",
"dtUrl": "https://www.zxzj.vip/detail/{vid}.html", // 视频ID列表页不能正常显示一般都是这个规则不对
"dtNode": "//body", // 爬虫使用JSONArray来获取相关字段内容JSONArray中共用到5个参数具体说明
"dtName": "//div[@class='stui-content__thumb']/a[contains(@class,'pic')]/@title", // 1 要获取字段的前缀,必填
"dtNameR": "", // 2 要获取字段的后缀,必填,这两个参数确定后一般要取的字段就出来了
"dtImg": "//div[@class='stui-content__thumb']/a[contains(@class,'pic')]/img/@data-original", // 3 获取到字段后该字段正确值的左偏移量真正的值会加上这个偏移量默认为0
"dtImgR": "(http\\S+)", // 4 获取到字段后该字段正确值的右偏移量真正的值会加上这个偏移量默认为0
"dtCate": "//div[@class='stui-content__detail']//p[contains(@class,'data') and contains(text(), '类型')]/following-sibling::*/text()", // 5 定位到该字段后,往上回溯的层级(往上数祖先节点,如果当前字段没有匹配到标签的起始位置也要算一个节点),具体是要找到包含当前页各字段的那部分代码(本页要求的如 vod_id, vod_name vod_pic)
"dtCateR": "", "vod_id": ["href=\"/detail/", ".html",0,0,3],
"dtArea": "//div[@class='stui-content__detail']//p[contains(@class,'data') and contains(text(), '地区')]/following-sibling::*/text()", //(选填) 视频名
"dtAreaR": "", "vod_name": ["title=\"", "\""],
"dtYear": "//div[@class='stui-content__detail']//p[contains(@class,'data') and contains(text(), '年份')]/following-sibling::*/text()", //(选填) 图片
"dtYearR": "", "vod_pic":["data-original=\"", "\""],
"dtActor": "//div[@class='stui-content__detail']//p[contains(@class,'data') and contains(text(), '主演')]/following-sibling::*/text()", //(选填) 副标题
"dtActorR": "", "vod_remarks":["<span class=\"pic-text text-right\">","</span>"]
"dtDirector": "//div[@class='stui-content__detail']//p[contains(@class,'data') and contains(text(), '导演')]/following-sibling::*/text()", },
"dtDirectorR": "", //(选填) 详情页
"dtMark": "//div[@class='stui-content__detail']//p[contains(@class,'data') and contains(text(), '更新')]/following-sibling::*/text()", "detail":{
"dtMarkR": "", //(选填) 当前页面解析区域截取,程序会从截取后的数据中查找各字段,这里只是演示,按实际需求填写
"dtDesc": "//span[@class='detail-sketch']/text()", "region":["<html>", "</html>"],
"dtDescR": "", //(选填) 详情页的url, 不存在时会使用list.vod_id进行推算
"dtFromNode":"//div[@class='stui-vodlist__head']/h3[contains(text(),'播放')]", "url": "https://www.zxzj.vip/detail/{vid}.html",
"dtFromName": "/text()", //(选填) 视频名
"dtUrlNode": "//ul[contains(@class, 'stui-content__playlist clearfix')]", "vod_name":["<h1 class=\"title\">", "</h1>"],
"dtUrlSubNode": "/li/a", //(选填) 视频图片
"dtUrlId": "@href", "vod_pic": ["<img class=\"lazyload\" data-original=\"","\""],
"dtUrlIdR": "/video/(\\S+).html", //(选填) 演员
"dtUrlName": "/text()", "vod_actor":[">主演:","</p>"],
"dtUrlNameR": "", //(选填) 导演,需要有一个字段说明回溯层级,一般选用导演字段
"playUrl": "https://www.zxzj.vip/video/{playUrl}.html", "vod_director":[">导演:", "</p>",0,0,2],
"playUa": "", //(选填) 地区
"searchUrl": "https://www.zxzj.vip/index.php/ajax/suggest?mid=1&wd={wd}&limit=10", "vod_area":["地区:", "/"],
"scVodNode": "json:list", //(选填) 年份
"scVodName": "name", "vod_year":["年份:", "/"],
"scVodId": "id", //(选填) 类型
"scVodIdR": "", "vod_type":["类型:", "/"],
"scVodImg": "pic", //(选填)
"scVodMark": "", "vod_remarks":["更新:","</p>"],
//(选填) 视频简介
"vod_content":["简介:","</p>"]
},
//(选填) 播放列表页
"playlist":{
//(选填) 当前页面解析区域截取,程序会从截取后的数据中查找各字段,这里只是演示,按实际需求填写
"region":["<html>", "</html>"],
//(选填) 当sort为1时会对找到播放列表进行倒序
"sort": 0,
//(选填) 播放列表页的url, 一般都和详情页的地址一样,有部分网站的播放页和详情页不同时才填这个字段
"url": "https://www.zxzj.vip/detail/{vid}.html",
//(选填) 播放url的字段规则这里需要回溯到包含单个播放源全部play_url的html节点
"vod_play_url": ["i><a href=\"/video/", "\"",-7,0,2],
//(选填) 播放地址的名称
"vod_play_url_title": [".html\">", "<"],
//(选填) 播放源的名称,如果有的话需要,查找到的播放列表会根据该字段的内容顺序进行排序
"vod_play_from": [
// 如果播放源的名称不能保证在页面上是唯一的
["<h3>播放线路4</h3>", "播放线路4(别名)"],
"迅雷云盘", "百度网盘", ["DP播放"] , "播放线路3", "CK播放"
]
},
//(选填) 播放页,不用去管,用来尝试解析直链的
"play":{
//(选填) 当前页面解析区域截取,程序会从截取后的数据中查找各字段,这里只是演示,按实际需求填写
"region":["<html>", "</html>"],
// (选填) 嗅探关键字有的网站视频url有特殊关键字的可以在这里指明
"keywords":[".mp4", ".m3u8", ".flv"]
},
//(选填) 搜索页 search 不存在时会先去尝试json搜索接口如果网站不支持再去页面上找搜索页的url
"search":{
//(选填) 当前页面解析区域截取,程序会从截取后的数据中查找各字段,这里只是演示,按实际需求填写
"region":["<html>", "</html>"],
// 搜索页的URL
"url": "https://zxzj.vip/vodsearch/-------------.html?wd={wd}",
//(选填) 视频ID
"vod_id": ["/detail/", ".html",0,0,3],
//(选填) 视频名
"vod_name": ["title=\"", "\""],
//(选填) 图片
"vod_pic":["data-original=\"", "\""],
//(选填) 副标题
"vod_remarks":["<span class=\"pic-text text-right\">","</span>"]
},
// json格式的搜索接口示例
// "search":{
// "url": "https://www.llyady.cc/index.php/ajax/suggest?mid=1&wd={wd}",
// "lookback": 3,
// "vod_id": "id",
// "vod_name": "name",
// "vod_pic":"pic"
//}
//(选填) 过滤相关规则需要配合list.url使用
// Filters =======================================================
"filter": { "filter": {
"1": [ "1": [
{ {
@@ -326,4 +380,5 @@
} }
] ]
} }
} }