mirror of https://github.com/qist/tvbox.git
parent
08d7266a5d
commit
88d7ddd2fa
@ -0,0 +1,81 @@
|
||||
{
|
||||
"规则名": "4KHDR",
|
||||
"规则作者": "",
|
||||
"请求头参数": "手机",
|
||||
"网页编码格式": "UTF-8",
|
||||
"图片是否需要代理": "0",
|
||||
"是否开启获取首页数据": "1",
|
||||
"首页推荐链接": "https://www.4khdr.cn/forum.php?mod=forumdisplay&fid=2&&page=1",
|
||||
"首页列表数组规则": "body&&#waterfall",
|
||||
"首页片单列表数组规则": "li",
|
||||
"首页片单是否Jsoup写法": "1",
|
||||
"分类起始页码": "1",
|
||||
"分类链接": "https://www.4khdr.cn/forum.php?mod=forumdisplay&fid=2&&filter=typeid&typeid={cateId}&page={catePg}",
|
||||
"分类名称": "4K电影&4K美剧&4K华语&4K动画&4K纪录片&4K日韩印&蓝光电影&蓝光美剧&蓝光华语&蓝光动画&蓝光日韩印",
|
||||
"分类名称替换词": "3&8&15&6&11&4&29&31&33&32&34",
|
||||
"筛选数据": {},
|
||||
//"筛选数据": "ext",
|
||||
//{cateId}
|
||||
"筛选子分类名称": "",
|
||||
"筛选子分类替换词": "",
|
||||
//{class}
|
||||
"筛选类型名称": "",
|
||||
"筛选类型替换词": "*",
|
||||
//{area}
|
||||
"筛选地区名称": "",
|
||||
"筛选地区替换词": "*",
|
||||
//{year}
|
||||
"筛选年份名称": "",
|
||||
"筛选年份替换词": "*",
|
||||
//{lang}
|
||||
"筛选语言名称": "",
|
||||
"筛选语言替换词": "*",
|
||||
//{by}
|
||||
"筛选排序名称": "时间&人气&评分",
|
||||
"筛选排序替换词": "time&hits&score",
|
||||
"分类截取模式": "1",
|
||||
"分类列表数组规则": "#waterfall&&li",
|
||||
"分类片单是否Jsoup写法": "1",
|
||||
"分类片单标题": "h3&&a&&Text",
|
||||
"分类片单链接": "h3&&a&&href",
|
||||
"分类片单图片": "img&&src",
|
||||
"分类片单副标题": "",
|
||||
"分类片单链接加前缀": "https://www.4khdr.cn/",
|
||||
"分类片单链接加后缀": "",
|
||||
"搜索请求头参数": "User-Agent$手机",
|
||||
"搜索链接": "",
|
||||
"POST请求数据": "",
|
||||
"搜索截取模式": "1",
|
||||
"搜索列表数组规则": ".stui-vodlist__media&&li",
|
||||
"搜索片单是否Jsoup写法": "1",
|
||||
"搜索片单图片": ".lazyload&&data-original",
|
||||
"搜索片单标题": "h3&&a&&Text",
|
||||
"搜索片单链接": "h3&&a&&href",
|
||||
"搜索片单副标题": ".pic-text&&Text",
|
||||
"搜索片单链接加前缀": "",
|
||||
"搜索片单链接加后缀": "",
|
||||
"链接是否直接播放": "0",
|
||||
"直接播放链接加前缀": "",
|
||||
"直接播放链接加后缀": "",
|
||||
"直接播放直链视频请求头": "",
|
||||
"详情是否Jsoup写法": "0",
|
||||
"类型详情": "",
|
||||
"年代详情": "",
|
||||
"地区详情": "",
|
||||
"演员详情": "",
|
||||
"简介详情": "",
|
||||
"线路列表数组规则": "",
|
||||
"线路标题": "",
|
||||
"播放列表数组规则": "body&&#postlist",
|
||||
"选集列表数组规则": "a[href^=https://www.aliyundrive.com/s/]||a[href^=magnet]",
|
||||
"选集标题链接是否Jsoup写法": "1",
|
||||
"选集标题": "a&&Text",
|
||||
"选集链接": "a&&href",
|
||||
"是否反转选集序列": "0",
|
||||
"选集链接加前缀": "",
|
||||
"选集链接加后缀": "",
|
||||
"分析MacPlayer": "0",
|
||||
"是否开启手动嗅探": "0",
|
||||
"手动嗅探视频链接关键词": ".mp4#.m3u8#.flv#video/tos",
|
||||
"手动嗅探视频链接过滤词": ".html#=http"
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,81 @@
|
||||
{
|
||||
"规则名": "看一看",
|
||||
"规则作者": "",
|
||||
"请求头参数": "手机",
|
||||
"网页编码格式": "UTF-8",
|
||||
"图片是否需要代理": "0",
|
||||
"是否开启获取首页数据": "1",
|
||||
"首页推荐链接": "https://www.kanyk.net",
|
||||
"首页列表数组规则": "body&&.index-area",
|
||||
"首页片单列表数组规则": "ul&&li",
|
||||
"首页片单是否Jsoup写法": "1",
|
||||
"分类起始页码": "1",
|
||||
"分类链接": "https://www.kanyk.net/index.php?m=vod-list-id-{cateId}-pg-{catePg}-order--by-{by}-class-0-year-0-letter--area-{area}-lang-.html",
|
||||
"分类名称": "电影&电视剧&综艺&动漫",
|
||||
"分类名称替换词": "1&2&3&4",
|
||||
//"筛选数据": {},
|
||||
"筛选数据": "ext",
|
||||
//{cateId}
|
||||
"筛选子分类名称": "动作片&喜剧片&爱情片&科幻片&恐怖片&剧情片&战争片&纪录片&微电影&惊悚片&悬疑片||国产剧&港台剧&日韩剧&欧美剧&泰剧&海外剧||TV综艺&音乐MV||TV版&电影版&剧场版&国语经典",
|
||||
"筛选子分类替换词": "5&6&7&8&9&10&11&16&18&20&21||12&13&14&15&19&32||26&31||23&24&25&36",
|
||||
//{class}
|
||||
"筛选类型名称": "",
|
||||
"筛选类型替换词": "*",
|
||||
//{area}
|
||||
"筛选地区名称": "大陆&香港&台湾&美国&韩国&日本&泰国&新加坡&马来西亚&印度&英国&法国&加拿大&西班牙&俄罗斯&其它",
|
||||
"筛选地区替换词": "*",
|
||||
//{year}
|
||||
"筛选年份名称": "",
|
||||
"筛选年份替换词": "*",
|
||||
//{lang}
|
||||
"筛选语言名称": "",
|
||||
"筛选语言替换词": "*",
|
||||
//{by}
|
||||
"筛选排序名称": "时间&人气&评分",
|
||||
"筛选排序替换词": "time&hits&score",
|
||||
"分类截取模式": "1",
|
||||
"分类列表数组规则": ".index-area&&li",
|
||||
"分类片单是否Jsoup写法": "1",
|
||||
"分类片单标题": "a&&title",
|
||||
"分类片单链接": "a&&href",
|
||||
"分类片单图片": "img&&data-original",
|
||||
"分类片单副标题": ".other&&Text",
|
||||
"分类片单链接加前缀": "https://www.kanyk.net",
|
||||
"分类片单链接加后缀": "",
|
||||
"搜索请求头参数": "User-Agent$手机",
|
||||
"搜索链接": "https://www.kanyk.net/index.php?m=vod-search-pg-1-wd-{wd}.html",
|
||||
"POST请求数据": "",
|
||||
"搜索截取模式": "1",
|
||||
"搜索列表数组规则": ".index-area&&li",
|
||||
"搜索片单是否Jsoup写法": "1",
|
||||
"搜索片单图片": "img&&data-original",
|
||||
"搜索片单标题": "a&&title",
|
||||
"搜索片单链接": "a&&href",
|
||||
"搜索片单副标题": ".other&&Text",
|
||||
"搜索片单链接加前缀": "https://www.kanyk.net",
|
||||
"搜索片单链接加后缀": "",
|
||||
"链接是否直接播放": "0",
|
||||
"直接播放链接加前缀": "",
|
||||
"直接播放链接加后缀": "",
|
||||
"直接播放直链视频请求头": "",
|
||||
"详情是否Jsoup写法": "0",
|
||||
"类型详情": "",
|
||||
"年代详情": "",
|
||||
"地区详情": "",
|
||||
"演员详情": "",
|
||||
"简介详情": "",
|
||||
"线路列表数组规则": ".playfrom&&li",
|
||||
"线路标题": "Text",
|
||||
"播放列表数组规则": "body&&.playlist",
|
||||
"选集列表数组规则": "ul&&li",
|
||||
"选集标题链接是否Jsoup写法": "1",
|
||||
"选集标题": "a&&Text",
|
||||
"选集链接": "a&&href",
|
||||
"是否反转选集序列": "0",
|
||||
"选集链接加前缀": "https://www.kanyk.net",
|
||||
"选集链接加后缀": "",
|
||||
"分析MacPlayer": "0",
|
||||
"是否开启手动嗅探": "0",
|
||||
"手动嗅探视频链接关键词": ".mp4#.m3u8#.flv#video/tos",
|
||||
"手动嗅探视频链接过滤词": ".html#=http"
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
{
|
||||
"规则名": "量子影视",
|
||||
"规则作者": "香雅情",
|
||||
"请求头参数": "User-Agent$MOBILE_UA",
|
||||
"网页编码格式": "UTF-8",
|
||||
"图片是否需要代理": "0",
|
||||
"是否开启获取首页数据": "1",
|
||||
"首页推荐链接": "http://www.lzizy9.com",
|
||||
"首页列表数组规则": "body&&.module-items:has(.module-item-pic)",
|
||||
"首页片单列表数组规则": ".module-item:not(:contains(伦理))",
|
||||
"首页片单是否Jsoup写法": "1",
|
||||
"分类起始页码": "1",
|
||||
//"分类链接": "https://lzi888.com/index.php/vod/show/id/{cateId}/page/{catePg}.html",
|
||||
"分类链接": "http://www.lzizy9.com/index.php/vod/show/by/{by}/id/{cateId}/page/{catePg}/year/{year}.html",
|
||||
"分类名称": "电影&电视剧&综艺&动漫",
|
||||
//"分类名称替换词": "1&2&3&4",
|
||||
"分类名称替换词": "1&2&4&3",
|
||||
//"筛选数据": {},
|
||||
"筛选数据": "ext",
|
||||
//{cateId}
|
||||
"筛选子分类名称": "动作片&喜剧片&科幻片&恐怖片&爱情片&剧情片&战争片&记录片&预告片||国产剧&欧美剧&香港剧&韩国剧&日本剧&台湾剧&泰国剧&海外剧&短剧||大陆综艺&日韩综艺&欧美综艺&港台综艺||国产动漫&日韩动漫&欧美动漫&港台动漫&海外动漫",
|
||||
"筛选子分类替换词": "6&7&8&9&10&11&12&20&45||13&14&15&16&23&22&25&24&38||31&33&34&32||26&27&28&29&30",
|
||||
//{class}
|
||||
"筛选类型名称": "",
|
||||
"筛选类型替换词": "*",
|
||||
//{area}
|
||||
"筛选地区名称": "",
|
||||
"筛选地区替换词": "*",
|
||||
//{year}
|
||||
"筛选年份名称": "",
|
||||
"筛选年份替换词": "*",
|
||||
//{lang}
|
||||
"筛选语言名称": "",
|
||||
"筛选语言替换词": "*",
|
||||
//{by}
|
||||
"筛选排序名称": "时间&人气&评分",
|
||||
"筛选排序替换词": "time&hits&score",
|
||||
"分类截取模式": "1",
|
||||
"分类列表数组规则": "body&&.module-item:not(:contains(伦理))",
|
||||
"分类片单是否Jsoup写法": "1",
|
||||
"分类片单标题": "a&&title",
|
||||
"分类片单链接": "a&&href",
|
||||
"分类片单图片": ".lazyloaded||.lazyload&&data-src||data-original",
|
||||
"分类片单副标题": ".module-item-text||.module-item-note&&Text",
|
||||
"分类片单链接加前缀": "http://www.lzizy9.com",
|
||||
"分类片单链接加后缀": "",
|
||||
"搜索请求头参数": "User-Agent$MOBILE_UA",
|
||||
//"搜索链接": "https://lzi888.com/index.php/vod/search.html?wd={wd}",
|
||||
"搜索链接": "http://www.lzizy9.com/index.php/vod/search.html?wd={wd}",
|
||||
"POST请求数据": "",
|
||||
"搜索截取模式": "1",
|
||||
"搜索列表数组规则": "body&&.module-search-item:not(:contains(伦理))||.module-card-item:not(:contains(伦理))",
|
||||
"搜索片单是否Jsoup写法": "1",
|
||||
"搜索片单图片": ".lazyload&&data-src||data-original",
|
||||
"搜索片单标题": ".module-card-item-title||h3&&Text",
|
||||
"搜索片单链接": ".module-card-item-title||h3&&a&&href",
|
||||
"搜索片单副标题": ".video-serial||.module-item-note&&Text",
|
||||
"搜索片单链接加前缀": "http://www.lzizy9.com",
|
||||
"搜索片单链接加后缀": "",
|
||||
"链接是否直接播放": "0",
|
||||
"直接播放链接加前缀": "",
|
||||
"直接播放链接加后缀": "#isVideo=true#",
|
||||
"直接播放直链视频请求头": "",
|
||||
"详情是否Jsoup写法": "1",
|
||||
"类型详情": "",
|
||||
"年代详情": "",
|
||||
"地区详情": "",
|
||||
"演员详情": "body&&.video-info-items:contains(主演:)||.module-info-item:contains(主演:)&&Text!主演:",
|
||||
"简介详情": ".module-info-introduction||.video-info-content&&Text",
|
||||
"线路列表数组规则": ".module-tab-content||.module-tab-items-box&&.module-tab-item",
|
||||
"线路标题": "Text",
|
||||
"播放列表数组规则": "body&&.module-player-list||.module-play-list",
|
||||
"选集列表数组规则": ".scroll-content||.module-play-list-content&&a",
|
||||
"选集标题链接是否Jsoup写法": "1",
|
||||
"选集标题": "a&&Text",
|
||||
"选集链接": "a&&href",
|
||||
"是否反转选集序列": "0",
|
||||
"选集链接加前缀": "http://www.lzizy9.com",
|
||||
"选集链接加后缀": "",
|
||||
"分析MacPlayer": "2",
|
||||
"是否开启手动嗅探": "0",
|
||||
"手动嗅探视频链接关键词": ".mp4#.m3u8#.flv#video/tos",
|
||||
"手动嗅探视频链接过滤词": ".html#=http"
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
{
|
||||
"规则名": "阿里云盘网",
|
||||
"规则作者": "",
|
||||
"网页编码格式": "UTF-8",
|
||||
"图片是否需要代理": "0",
|
||||
"搜索请求头参数": "User-Agent$手机",
|
||||
"搜索链接": "https://www.alypw.cn/search.php?q={wd}",
|
||||
"POST请求数据": "",
|
||||
"搜索截取模式": "1",
|
||||
"搜索列表数组规则": ".list&&li",
|
||||
"搜索片单是否Jsoup写法": "1",
|
||||
"搜索片单图片": "img&&src",
|
||||
"搜索片单标题": "a&&title",
|
||||
"搜索片单链接": "a&&href",
|
||||
"搜索片单副标题": "",
|
||||
"搜索片单链接加前缀": "",
|
||||
"搜索片单链接加后缀": "",
|
||||
"链接是否直接播放": "0",
|
||||
"直接播放链接加前缀": "",
|
||||
"直接播放链接加后缀": "",
|
||||
"直接播放直链视频请求头": "",
|
||||
"详情是否Jsoup写法": "0",
|
||||
"类型详情": "",
|
||||
"年代详情": "",
|
||||
"地区详情": "",
|
||||
"演员详情": "",
|
||||
"简介详情": "",
|
||||
"线路列表数组规则": "",
|
||||
"线路标题": "",
|
||||
"播放列表数组规则": "body&&.article_content",
|
||||
"选集列表数组规则": "a[href^=https://www.aliyundrive.com/s/]",
|
||||
"选集标题链接是否Jsoup写法": "1",
|
||||
"选集标题": "a&&Text",
|
||||
"选集链接": "a&&href",
|
||||
"是否反转选集序列": "0",
|
||||
"选集链接加前缀": "",
|
||||
"选集链接加后缀": "",
|
||||
"分析MacPlayer": "0",
|
||||
"是否开启手动嗅探": "0",
|
||||
"手动嗅探视频链接关键词": ".mp4#.m3u8#.flv#video/tos",
|
||||
"手动嗅探视频链接过滤词": ".html#=http"
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
{
|
||||
"规则名": "非凡影视",
|
||||
"规则作者": "香雅情",
|
||||
"请求头参数": "MOBILE_UA",
|
||||
"网页编码格式": "UTF-8",
|
||||
"图片是否需要代理": "否",
|
||||
"是否开启获取首页数据": "1",
|
||||
"首页推荐链接": "http://www.dy1234.net",
|
||||
"首页列表数组规则": "body&&.module-items:has(.module-item-pic)",
|
||||
"首页片单列表数组规则": ".module-item:not(:contains(伦理))",
|
||||
"首页片单是否Jsoup写法": "1",
|
||||
"分类起始页码": "1",
|
||||
"分类链接": "http://www.dy1234.net/search.php?page={catePg}&searchtype=5&order={by}&tid={cateId}&year={year}",
|
||||
"分类名称": "电影&剧集&动漫&综艺",
|
||||
"分类名称替换词": "1&2&3&4",
|
||||
"筛选数据": "ext",
|
||||
//{cateId}
|
||||
"筛选子分类名称": "动作片&爱情片&科幻片&恐怖片&战争片&喜剧片&纪录片&剧情片||国产剧&香港剧&台湾剧&韩国剧&日本剧&欧美剧&海外剧&泰国剧||国产动漫&日韩动漫&港台动漫&欧美动漫&海外动漫||大陆综艺&港台综艺&日韩综艺&欧美综艺",
|
||||
"筛选子分类替换词": "5&6&7&8&9&10&11&12||13&14&15&16&26&27&28&38||29&30&31&32&33||34&35&36&37",
|
||||
//{class}
|
||||
"筛选类型名称": "",
|
||||
"筛选类型替换词": "*",
|
||||
//{area}
|
||||
"筛选地区名称": "",
|
||||
"筛选地区替换词": "*",
|
||||
//{year}
|
||||
"筛选年份名称": "",
|
||||
"筛选年份替换词": "*",
|
||||
//{lang}
|
||||
"筛选语言名称": "",
|
||||
"筛选语言替换词": "*",
|
||||
//{by}
|
||||
"筛选排序名称": "时间排序&人气排序&评分排序",
|
||||
"筛选排序替换词": "time&hit&commend",
|
||||
"分类截取模式": "1",
|
||||
"分类列表数组规则": ".module-items&&.module-item:not(:contains(伦理))",
|
||||
"分类片单是否Jsoup写法": "是",
|
||||
"分类片单标题": ".module-item-titlebox&&Text",
|
||||
"分类片单链接": "a&&href",
|
||||
"分类片单图片": ".lazyloaded&&data-src",
|
||||
"分类片单副标题": ".module-item-text&&Text",
|
||||
"分类片单链接加前缀": "http://www.dy1234.net",
|
||||
"分类片单链接加后缀": "",
|
||||
"搜索请求头参数": "User-Agent$MOBILE_UA",
|
||||
"搜索链接": "http://www.dy1234.net/search.php?searchword={wd}",
|
||||
"POST请求数据": "",
|
||||
"搜索截取模式": "1",
|
||||
"搜索列表数组规则": ".module-items&&.module-search-item:not(:contains(伦理))",
|
||||
"搜索片单是否Jsoup写法": "是",
|
||||
"搜索片单图片": ".lazyload&&data-src",
|
||||
"搜索片单标题": "h3&&Text",
|
||||
"搜索片单链接": "a&&href",
|
||||
"搜索片单副标题": ".video-serial&&Text",
|
||||
"搜索片单链接加前缀": "http://www.dy1234.net",
|
||||
"搜索片单链接加后缀": "",
|
||||
"链接是否直接播放": "否",
|
||||
"直接播放链接加前缀": "",
|
||||
"直接播放链接加后缀": "",
|
||||
"直接播放直链视频请求头": "",
|
||||
"详情是否Jsoup写法": "是",
|
||||
"类型详情": "",
|
||||
"年代详情": ".video-info-items,2&&Text",
|
||||
"地区详情": "",
|
||||
"演员详情": ".video-info-items,1&&Text",
|
||||
"简介详情": ".video-info-content&&Text",
|
||||
"线路列表数组规则": ".module-tab-content&&.module-tab-item",
|
||||
"线路标题": "Text",
|
||||
"播放列表数组规则": "body&&.module-player-list",
|
||||
"选集列表数组规则": ".scroll-content&&a",
|
||||
"选集标题链接是否Jsoup写法": "是",
|
||||
"选集标题": "a&&Text",
|
||||
"选集链接": "a&&href",
|
||||
"是否反转选集序列": "否",
|
||||
"选集链接加前缀": "http://www.dy1234.net",
|
||||
"选集链接加后缀": "",
|
||||
"分析MacPlayer": "2",
|
||||
"是否开启手动嗅探": "0",
|
||||
"手动嗅探视频链接关键词": ".mp4#.m3u8#.flv#video/tos",
|
||||
"手动嗅探视频链接过滤词": ".html#=http"
|
||||
}
|
||||
Binary file not shown.
@ -0,0 +1,45 @@
|
||||
var rule = {
|
||||
title:'荐片',
|
||||
host:'http://api2.rinhome.com',
|
||||
homeUrl:'https://yjpapipxblwdohpakljwg.hxhzs.com/api/tag/hand?code=unknown601193cf375db73d&channel=wandoujia',//网站的首页链接,用于分类获取和推荐获取
|
||||
url:'/api/crumb/list?area=0&category_id=fyclass&page=fypage&type=0&limit=24&fyfilter',
|
||||
class_name:'全部&电影&电视剧&动漫&综艺',
|
||||
class_url:'0&1&2&3&4',
|
||||
detailUrl:'/api/node/detail?channel=wandoujia&token=&id=fyid',//二级详情拼接链接(json格式用)
|
||||
searchUrl:'/api/video/search?key=**&page=fypage',
|
||||
searchable:2,
|
||||
quickSearch:0,
|
||||
filterable:1,
|
||||
filter:{'0': [{'key': 'year', 'name': '年代', 'value': [{'n': '全部', 'v': '0'}, {'n': '2023', 'v': '153'}, {'n': '2022', 'v': '101'}, {'n': '2021', 'v': '118'}, {'n': '2020', 'v': '16'}, {'n': '2019', 'v': '7'}, {'n': '2018', 'v': '2'}, {'n': '2017', 'v': '3'}, {'n': '2016', 'v': '22'}]}, {'key': 'sort', 'name': '排序', 'value': [{'n': '热门', 'v': 'hot'}, {'n': '评分', 'v': 'rating'}, {'n': '更新', 'v': 'update'}]}], '1': [{'key': 'year', 'name': '年代', 'value': [{'n': '全部', 'v': '0'}, {'n': '2023', 'v': '153'}, {'n': '2022', 'v': '101'}, {'n': '2021', 'v': '118'}, {'n': '2020', 'v': '16'}, {'n': '2019', 'v': '7'}, {'n': '2018', 'v': '2'}, {'n': '2017', 'v': '3'}, {'n': '2016', 'v': '22'}]}, {'key': 'sort', 'name': '排序', 'value': [{'n': '热门', 'v': 'hot'}, {'n': '评分', 'v': 'rating'}, {'n': '更新', 'v': 'update'}]}], '2': [{'key': 'year', 'name': '年代', 'value': [{'n': '全部', 'v': '0'}, {'n': '2023', 'v': '153'}, {'n': '2022', 'v': '101'}, {'n': '2021', 'v': '118'}, {'n': '2020', 'v': '16'}, {'n': '2019', 'v': '7'}, {'n': '2018', 'v': '2'}, {'n': '2017', 'v': '3'}, {'n': '2016', 'v': '22'}]}, {'key': 'sort', 'name': '排序', 'value': [{'n': '热门', 'v': 'hot'}, {'n': '评分', 'v': 'rating'}, {'n': '更新', 'v': 'update'}]}], '3': [{'key': 'year', 'name': '年代', 'value': [{'n': '全部', 'v': '0'}, {'n': '2023', 'v': '153'}, {'n': '2022', 'v': '101'}, {'n': '2021', 'v': '118'}, {'n': '2020', 'v': '16'}, {'n': '2019', 'v': '7'}, {'n': '2018', 'v': '2'}, {'n': '2017', 'v': '3'}, {'n': '2016', 'v': '22'}]}, {'key': 'sort', 'name': '排序', 'value': [{'n': '热门', 'v': 'hot'}, {'n': '评分', 'v': 'rating'}, {'n': '更新', 'v': 'update'}]}], '4': [{'key': 'year', 'name': '年代', 'value': [{'n': '全部', 'v': '0'}, {'n': '2023', 'v': '153'}, {'n': '2022', 'v': '101'}, {'n': '2021', 'v': '118'}, {'n': '2020', 'v': '16'}, {'n': '2019', 'v': '7'}, {'n': '2018', 'v': '2'}, {'n': '2017', 'v': '3'}, {'n': '2016', 'v': '22'}]}, {'key': 'sort', 'name': '排序', 'value': [{'n': '热门', 'v': 'hot'}, {'n': '评分', 'v': 'rating'}, {'n': '更新', 'v': 'update'}]}]},
|
||||
filter_url:'sort={{fl.sort or "hot"}}&year={{fl.year or "0"}}',
|
||||
headers:{
|
||||
'User-Agent':'jianpian-android/350',
|
||||
'JPAUTH':'y261ow7kF2dtzlxh1GS9EB8nbTxNmaK/QQIAjctlKiEv'
|
||||
},
|
||||
timeout:5000,
|
||||
limit:8,
|
||||
play_parse:true,
|
||||
play_json:[{
|
||||
re:'*',
|
||||
json:{
|
||||
parse:0,
|
||||
jx:0
|
||||
}
|
||||
}],
|
||||
lazy:'',
|
||||
// double:true,
|
||||
图片来源:'@Referer=www.jianpianapp.com@User-Agent=jianpian-version353',
|
||||
// 推荐:'json:data;room;*;cover;*;*',
|
||||
推荐:'json:.video;*;*;*;*',
|
||||
一级:'json:data;title;path;playlist.title;id',
|
||||
二级:{
|
||||
title:'data.title',
|
||||
desc:';data.description;data.id',
|
||||
img:'data.thumbnail',
|
||||
content:'data.thumbnail',
|
||||
is_json:1,
|
||||
tabs:'js:TABS=[];if(html.data.have_ftp_ur == 1){TABS.push("边下边播超清版")}if(html.data.have_m3u8_ur == 1){TABS.push("在线点播普清版")}',
|
||||
lists:'js:log(TABS);LISTS=[];TABS.forEach(function(tab){if(/边下边播/.test(tab)){let ftp=html.data.new_ftp_list;let d=ftp.map(function(it){return it.title+"$"+(/m3u8/.test(it.url)?play_url+it.url:"tvbox-xg:"+it.url)});LISTS.push(d)}else if(/在线点播/.test(tab)){let m3u=html.data.new_m3u8_list;let d=m3u.map(function(it){return it.title+"$"+(/m3u8/.test(it.url)?play_url+it.url:"tvbox-xg:"+it.url)});LISTS.push(d)}});',
|
||||
},
|
||||
搜索:'json:data;*;thumbnail;mask;*',
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,39 @@
|
||||
#MV
|
||||
https://taijichadao.github.io/zhibo/mv.txt
|
||||
|
||||
#精选
|
||||
https://taijichadao.github.io/zhibo/zb.txt
|
||||
|
||||
#肥猫
|
||||
http://我不是.肥猫.love:63/TV/tvzb.txt
|
||||
|
||||
#饭太硬
|
||||
http://ftyyy.tk/live.txt
|
||||
|
||||
#dxawi
|
||||
https://dxawi.github.io/0/tvlive.txt
|
||||
|
||||
#范明明-global
|
||||
https://live.fanmingming.com/tv/m3u/global.m3u
|
||||
|
||||
#范明明-ipv6
|
||||
https://live.fanmingming.com/tv/m3u/ipv6.m3u
|
||||
|
||||
#范明明-Radio
|
||||
https://live.fanmingming.com/radio/m3u/index.m3u
|
||||
|
||||
#Ftindy-BESTV源
|
||||
https://ghproxy.com/https://raw.githubusercontent.com/Ftindy/IPTV-URL/main/bestv.m3u
|
||||
|
||||
#太阳
|
||||
http://111.67.196.181/zhibo.txt
|
||||
|
||||
#APTV-ipv6
|
||||
https://ghproxy.com/https://raw.githubusercontent.com/Kimentanm/aptv/master/m3u/iptv.m3u
|
||||
|
||||
#YueChan-ipv6
|
||||
https://ghproxy.com/https://raw.githubusercontent.com/YueChan/Live/main/IPTV.m3u
|
||||
|
||||
#16wMV
|
||||
file://xc/sub/16wMV.txt
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,43 @@
|
||||
|
||||
春晚1983,https://vd2.bdstatic.com/mda-nmgf0aiczefpbjyv/360p/h264/1671273368681637465/mda-nmgf0aiczefpbjyv.mp4
|
||||
春晚1984,http://txmov2.a.kwimgs.com/upic/2022/01/31/15/BMjAyMjAxMzExNTU5NTRfNDAzMDAxOTlfNjYyNzMyMzg3MTRfMF8z_b_B192356dadbc90d207ba16964d4c2914c.mp4
|
||||
春晚1985,http://txmov2.a.kwimgs.com/upic/2022/01/31/16/BMjAyMjAxMzExNjAwMDFfNDAzMDAxOTlfNjYyNzMyNTAwMzJfMF8z_b_Be73c5abcbc0eeb2ec9fce6842e1362a4.mp4
|
||||
春晚1986,https://txmov2.a.kwimgs.com/bs3/video-hls/5231493982164619599_hlshd15.m3u8
|
||||
春晚1987,https://txmov2.a.kwimgs.com/bs3/video-hls/5195746663405928031_hlsb.m3u8
|
||||
西游齐天乐1987,http://50069.njc.svp.tencent-cloud.com/0bc3fuaaiaaavuaibgr5f5rfalodaqwqabaa.f10003.mp4
|
||||
春晚1988,https://txmov2.a.kwimgs.com/bs3/video-hls/5216575810935394655_hlsb.m3u8
|
||||
春晚1989,http://txmov2.a.kwimgs.com/upic/2022/01/31/16/BMjAyMjAxMzExNjAwMTVfNDAzMDAxOTlfNjYyNzMyNzQ2OTlfMF8z_b_Be477b27b9ce655d2372df56a5a3d96ef.mp4
|
||||
春晚1991,https://txmov2.a.kwimgs.com/bs3/video-hls/5210664837540712798_hlshd15.m3u8
|
||||
春晚1992,https://txmov2.a.kwimgs.com/bs3/video-hls/5256826755663896297_hlshd15.m3u8
|
||||
春晚1993,https://txmov2.a.kwimgs.com/bs3/video-hls/5217420261875933947_hlshd15.m3u8
|
||||
春晚1994,https://txmov2.a.kwimgs.com/bs3/video-hls/5197154061406974711_hlshd15.m3u8
|
||||
春晚1995,https://txmov2.a.kwimgs.com/bs3/video-hls/5255137907893179578_hlshd15.m3u8
|
||||
春晚1997,https://txmov2.a.kwimgs.com/bs3/video-hls/5230649583590411879_hlshd15.m3u8
|
||||
春晚1998,https://txmov2.a.kwimgs.com/bs3/video-hls/5225864507896315430_hlshd15.m3u8
|
||||
春晚1999,https://txmov2.a.kwimgs.com/bs3/video-hls/5258234133675308186_hlshd15.m3u8
|
||||
春晚2000,https://txmov2.a.kwimgs.com/bs3/video-hls/5216294359327079321_hlshd15.m3u8
|
||||
春晚2001,https://txmov2.a.kwimgs.com/bs3/video-hls/5228960735897942616_hlshd15.m3u8
|
||||
春晚2002,https://txmov2.a.kwimgs.com/bs3/video-hls/5255700858599864364_hlshd15.m3u8
|
||||
春晚2004,https://txmov2.a.kwimgs.com/bs3/video-hls/5223894184413450769_hlshd15.m3u8
|
||||
春晚2005,https://txmov2.a.kwimgs.com/bs3/video-hls/5254012008863954469_hlshd15.m3u8
|
||||
春晚2006,https://txmov2.a.kwimgs.com/bs3/video-hls/5194339310474320155_hlshd15.m3u8
|
||||
春晚2007,https://txmov2.a.kwimgs.com/bs3/video-hls/5219953534755647343_hlshd15.m3u8
|
||||
春晚2008,https://txmov2.a.kwimgs.com/bs3/video-hls/5194902262344826321_hlshd15.m3u8
|
||||
春晚2009,https://txmov2.a.kwimgs.com/bs3/video-hls/5210946337266019890_hlshd15.m3u8
|
||||
春晚2014,https://txmov2.a.kwimgs.com/bs3/video-hls/5245286283437869627_hlshd15.m3u8
|
||||
春晚2019,https://txmov2.a.kwimgs.com/bs3/video-hls/5222205336887088723_hlshd15.m3u8
|
||||
春晚2020,https://txmov2.a.kwimgs.com/bs3/video-hls/5248101009010430183_hlshd15.m3u8
|
||||
春晚2021,http://txmov2.a.kwimgs.com/upic/2022/01/30/17/BMjAyMjAxMzAxNzE4NTJfNDAzMDAxOTlfNjYxNzUzOTg3NjlfMF8z_b_Be41d9503181d7b0608a839ed401e02c2.mp4
|
||||
春晚2022,http://txmov2.a.kwimgs.com/upic/2022/02/01/11/BMjAyMjAyMDExMTEwMjNfNDAzMDAxOTlfNjYzNzA4MTk4NzNfMF8z_b_B898cc7ddd0025bf54ddb18ec1f723c84.mp4
|
||||
春晚2023,https://txmov2.a.kwimgs.com/bs3/video-hls/5251197255879398624_hlshd15.m3u8
|
||||
春晚1992,https://txmov2.a.kwimgs.com/bs3/video-hls/5256826755663896297_hlshd15.m3u8
|
||||
春晚1993,https://txmov2.a.kwimgs.com/bs3/video-hls/5217420261875933947_hlshd15.m3u8
|
||||
春晚1994,https://txmov2.a.kwimgs.com/bs3/video-hls/5197154061406974711_hlshd15.m3u8
|
||||
春晚1995,https://txmov2.a.kwimgs.com/bs3/video-hls/5255137907893179578_hlshd15.m3u8
|
||||
春晚1997,https://txmov2.a.kwimgs.com/bs3/video-hls/5230649583590411879_hlshd15.m3u8
|
||||
春晚1999,https://txmov2.a.kwimgs.com/bs3/video-hls/5258234133675308186_hlshd15.m3u8
|
||||
春晚2001,https://txmov2.a.kwimgs.com/bs3/video-hls/5228960735897942616_hlshd15.m3u8
|
||||
春晚2014,https://txmov2.a.kwimgs.com/bs3/video-hls/5245286283437869627_hlshd15.m3u8
|
||||
春晚2019,https://txmov2.a.kwimgs.com/bs3/video-hls/5222205336887088723_hlshd15.m3u8
|
||||
春晚2020,http://txmov2.a.kwimgs.com/upic/2022/01/30/17/BMjAyMjAxMzAxNzA5NDdfNDAzMDAxOTlfNjYxNzQ2MDAyMTFfMF8z_b_B5d51d9564c5670dc66faeba20aa7af3f.mp4
|
||||
|
||||
@ -0,0 +1,367 @@
|
||||
/**
|
||||
* live2cms.js
|
||||
* 配置设置 {"key":"Live2CMS","name":"直播转点播V2","type":3,"api":"{{host}}/libs/live2cms.js","searchable":2,"quickSearch":0,"filterable":0,"ext":"{{host}}/txt/json/live2mv_data.json"}
|
||||
* live2mv_data.json
|
||||
[
|
||||
{"name": "甜蜜", "url": "http://zdir.kebedd69.repl.co/public/live.txt"},
|
||||
{"name": "俊于", "url": "http://home.jundie.top:81/Cat/tv/live.txt"},
|
||||
{"name": "菜妮丝", "url": "http://xn--ihqu10cn4c.xn--z7x900a.love:63/TV/tvzb.txt"},
|
||||
{"name": "布里m3u", "url": "http://jiexi.bulisite.top/m3u.php"},
|
||||
{"name": "吾爱", "url": "http://52bsj.vip:81/api/v3/file/get/763/live.txt?sign=87BTGT1_6AOry7FPwy_uuxFTv2Wcb9aDMj46rDdRTD8%3D%3A0"},
|
||||
{"name": "饭太硬", "url": "http://ftyyy.tk/live.txt"}
|
||||
]
|
||||
|
||||
* 提示 ext文件格式为json列表,name,url参数
|
||||
* 取消加密,减少性能问题
|
||||
*/
|
||||
String.prototype.rstrip = function (chars) {
|
||||
let regex = new RegExp(chars + "$");
|
||||
return this.replace(regex, "");
|
||||
};
|
||||
const request_timeout = 5000;
|
||||
const VERSION = 'live2cms 20230616';
|
||||
const UA = 'Mozilla/5.0'; //默认请求ua
|
||||
const __ext = {data_dict:{}};
|
||||
const tips = `\n道长直播转点播js-当前版本${VERSION}`;
|
||||
const def_pic = 'https://avatars.githubusercontent.com/u/97389433?s=120&v=4';
|
||||
/**
|
||||
* 打印日志
|
||||
* @param any 任意变量
|
||||
*/
|
||||
function print(any){
|
||||
any = any||'';
|
||||
if(typeof(any)=='object'&&Object.keys(any).length>0){
|
||||
try {
|
||||
any = JSON.stringify(any);
|
||||
console.log(any);
|
||||
}catch (e) {
|
||||
// console.log('print:'+e.message);
|
||||
console.log(typeof(any)+':'+any.length);
|
||||
}
|
||||
}else if(typeof(any)=='object'&&Object.keys(any).length<1){
|
||||
console.log('null object');
|
||||
}else{
|
||||
console.log(any);
|
||||
}
|
||||
}
|
||||
|
||||
/*** js自封装的方法 ***/
|
||||
|
||||
/**
|
||||
* 获取链接的host(带http协议的完整链接)
|
||||
* @param url 任意一个正常完整的Url,自动提取根
|
||||
* @returns {string}
|
||||
*/
|
||||
function getHome(url){
|
||||
if(!url){
|
||||
return ''
|
||||
}
|
||||
let tmp = url.split('//');
|
||||
url = tmp[0] + '//' + tmp[1].split('/')[0];
|
||||
try {
|
||||
url = decodeURIComponent(url);
|
||||
}catch (e) {}
|
||||
return url
|
||||
}
|
||||
|
||||
/**
|
||||
* m3u直播格式转一般直播格式
|
||||
* @param m3u
|
||||
* @returns {string}
|
||||
*/
|
||||
function convertM3uToNormal(m3u) {
|
||||
try {
|
||||
const lines = m3u.split('\n');
|
||||
let result = '';
|
||||
let TV='';
|
||||
// let flag='#genre#';
|
||||
let flag='#m3u#';
|
||||
let currentGroupTitle = '';
|
||||
lines.forEach((line) => {
|
||||
if (line.startsWith('#EXTINF:')) {
|
||||
const groupTitle = line.split('"')[1].trim();
|
||||
TV= line.split('"')[2].substring(1);
|
||||
if (currentGroupTitle !== groupTitle) {
|
||||
currentGroupTitle = groupTitle;
|
||||
result += `\n${currentGroupTitle},${flag}\n`;
|
||||
}
|
||||
} else if (line.startsWith('http')) {
|
||||
const splitLine = line.split(',');
|
||||
result += `${TV}\,${splitLine[0]}\n`;
|
||||
}
|
||||
});
|
||||
return result.trim();
|
||||
}catch (e) {
|
||||
print(`m3u直播转普通直播发生错误:${e.message}`);
|
||||
return m3u
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const http = function (url, options = {}) {
|
||||
if(options.method ==='POST' && options.data){
|
||||
options.body = JSON.stringify(options.data);
|
||||
options.headers = Object.assign({'content-type':'application/json'}, options.headers);
|
||||
}
|
||||
options.timeout = request_timeout;
|
||||
if(!options.headers){
|
||||
options.headers = {};
|
||||
}
|
||||
let keys = Object.keys(options.headers).map(it=>it.toLowerCase());
|
||||
if(!keys.includes('referer')){
|
||||
options.headers['Referer'] = getHome(url);
|
||||
}
|
||||
if(!keys.includes('user-agent')){
|
||||
options.headers['User-Agent'] = UA;
|
||||
}
|
||||
console.log(JSON.stringify(options.headers));
|
||||
try {
|
||||
const res = req(url, options);
|
||||
// if(options.headers['Authorization']){
|
||||
// console.log(res.content);
|
||||
// }
|
||||
res.json = () => res&&res.content ? JSON.parse(res.content) : null;
|
||||
res.text = () => res&&res.content ? res.content:'';
|
||||
return res
|
||||
}catch (e) {
|
||||
return {
|
||||
json() {
|
||||
return null
|
||||
}, text() {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
["get", "post"].forEach(method => {
|
||||
http[method] = function (url, options = {}) {
|
||||
return http(url, Object.assign(options, {method: method.toUpperCase()}));
|
||||
}
|
||||
});
|
||||
|
||||
function init(ext) {
|
||||
console.log("当前版本号:"+VERSION);
|
||||
let data;
|
||||
if (typeof ext == 'object'){
|
||||
data = ext;
|
||||
print('live ext:object');
|
||||
} else if (typeof ext == 'string') {
|
||||
if (ext.startsWith('http')) {
|
||||
let ext_paramas = ext.split(';');
|
||||
let data_url = ext_paramas[0];
|
||||
print(data_url);
|
||||
data = http.get(data_url).json();
|
||||
}
|
||||
}
|
||||
print(data);
|
||||
__ext.data = data;
|
||||
print('init执行完毕');
|
||||
}
|
||||
|
||||
function home(filter) {
|
||||
let classes = __ext.data.map(it => ({
|
||||
type_id: it.url,
|
||||
type_name: it.name,
|
||||
}));
|
||||
print("----home----");
|
||||
print(classes);
|
||||
return JSON.stringify({ 'class': classes});
|
||||
}
|
||||
|
||||
function homeVod(params) {
|
||||
let _get_url = __ext.data[0].url;
|
||||
let html;
|
||||
if(__ext.data_dict[_get_url]){
|
||||
html = __ext.data_dict[_get_url];
|
||||
}else{
|
||||
html = http.get(_get_url).text();
|
||||
if(/#EXTM3U/.test(html)){
|
||||
html = convertM3uToNormal(html);
|
||||
}
|
||||
__ext.data_dict[_get_url] = html;
|
||||
}
|
||||
let arr = html.match(/.*?,#[\s\S].*?#/g);
|
||||
let _list = [];
|
||||
try {
|
||||
arr.forEach(it=>{
|
||||
_list.push({
|
||||
vod_name:it.split(',')[0],
|
||||
vod_id:_get_url+'$'+it.split(',')[0],
|
||||
vod_pic:def_pic,
|
||||
vod_remarks:it.split(',')[1],
|
||||
});
|
||||
});
|
||||
}catch (e) {
|
||||
print('Live2cms获取首页推荐发送错误:'+e.message);
|
||||
}
|
||||
return JSON.stringify({ 'list': _list });
|
||||
}
|
||||
|
||||
function category(tid, pg, filter, extend) {
|
||||
if(parseInt(pg)>1){
|
||||
return JSON.stringify({
|
||||
'list': [],
|
||||
});
|
||||
}
|
||||
let _get_url = tid;
|
||||
let html;
|
||||
if(__ext.data_dict[_get_url]){
|
||||
html = __ext.data_dict[_get_url];
|
||||
}else{
|
||||
html = http.get(_get_url).text();
|
||||
if(/#EXTM3U/.test(html)){
|
||||
html = convertM3uToNormal(html);
|
||||
}
|
||||
__ext.data_dict[_get_url] = html;
|
||||
}
|
||||
let arr = html.match(/.*?,#[\s\S].*?#/g);
|
||||
let _list = [];
|
||||
try {
|
||||
arr.forEach(it=>{
|
||||
_list.push({
|
||||
vod_name:it.split(',')[0],
|
||||
vod_id:_get_url+'$'+it.split(',')[0],
|
||||
vod_pic:def_pic,
|
||||
vod_remarks:it.split(',')[1],
|
||||
});
|
||||
});
|
||||
}catch (e) {
|
||||
print('Live2cms获取一级分类页发生错误:'+e.message);
|
||||
}
|
||||
|
||||
return JSON.stringify({
|
||||
'page': 1,
|
||||
'pagecount': 1,
|
||||
'limit': _list.length,
|
||||
'total': _list.length,
|
||||
'list': _list,
|
||||
});
|
||||
}
|
||||
|
||||
function detail(tid) { // ⛵ 港•澳•台
|
||||
let _get_url = tid.split('$')[0];
|
||||
let _tab = tid.split('$')[1];
|
||||
if(tid.includes('#search#')){
|
||||
let vod_play_url = _tab.replace('#search#','')+'$'+_get_url;
|
||||
print(vod_play_url);
|
||||
return JSON.stringify({
|
||||
list: [{
|
||||
vod_id: tid,
|
||||
vod_name: '搜索:'+_tab.replace('#search#',''),
|
||||
type_name: "直播列表",
|
||||
vod_pic: def_pic,
|
||||
vod_content: tid,
|
||||
vod_play_from: '来自搜索',
|
||||
vod_play_url: vod_play_url,
|
||||
vod_director: tips,
|
||||
vod_remarks: `道长直播转点播js-当前版本${VERSION}`,
|
||||
}]
|
||||
});
|
||||
}
|
||||
let html;
|
||||
if(__ext.data_dict[_get_url]){
|
||||
html = __ext.data_dict[_get_url];
|
||||
}else{
|
||||
html = http.get(_get_url).text();
|
||||
if(/#EXTM3U/.test(html)){
|
||||
html = convertM3uToNormal(html);
|
||||
}
|
||||
__ext.data_dict[_get_url] = html;
|
||||
}
|
||||
let a = new RegExp(`.*?${_tab},#[\\s\\S].*?#`);
|
||||
let b = html.match(a)[0];
|
||||
let c = html.split(b)[1];
|
||||
if(c.match(/.*?,#[\s\S].*?#/)){
|
||||
let d = c.match(/.*?,#[\s\S].*?#/)[0];
|
||||
c = c.split(d)[0];
|
||||
}
|
||||
let arr = c.trim().split('\n');
|
||||
let _list = [];
|
||||
arr.forEach((it)=>{
|
||||
if(it.trim()){
|
||||
let t = it.trim().split(',')[0];
|
||||
let u = it.trim().split(',')[1];
|
||||
_list.push(t+'$'+u);
|
||||
}
|
||||
});
|
||||
// let groups = [[],[],[],[],[],[]];
|
||||
// _list.forEach((it)=>{
|
||||
//
|
||||
// });
|
||||
let vod_name = __ext.data.find(x=>x.url===_get_url).name;
|
||||
let vod_play_url = _list.join('#');
|
||||
|
||||
let vod = {
|
||||
vod_id: tid,
|
||||
vod_name: vod_name+'|'+_tab,
|
||||
type_name: "直播列表",
|
||||
vod_pic: def_pic,
|
||||
vod_content: tid,
|
||||
vod_play_from: vod_name,
|
||||
vod_play_url: vod_play_url,
|
||||
vod_director: tips,
|
||||
vod_remarks: `道长直播转点播js-当前版本${VERSION}`,
|
||||
};
|
||||
|
||||
return JSON.stringify({
|
||||
list: [vod]
|
||||
});
|
||||
}
|
||||
|
||||
function play(flag, id, flags) {
|
||||
let vod = {
|
||||
'parse': /m3u8/.test(id)?0:1,
|
||||
'playUrl': '',
|
||||
'url': id
|
||||
};
|
||||
print(vod);
|
||||
return JSON.stringify(vod);
|
||||
}
|
||||
|
||||
function search(wd, quick) {
|
||||
let _get_url = __ext.data[0].url;
|
||||
let html;
|
||||
if(__ext.data_dict[_get_url]){
|
||||
html = __ext.data_dict[_get_url];
|
||||
}else{
|
||||
html = http.get(_get_url).text();
|
||||
if(/#EXTM3U/.test(html)){
|
||||
html = convertM3uToNormal(html);
|
||||
}
|
||||
__ext.data_dict[_get_url] = html;
|
||||
}
|
||||
let str='';
|
||||
Object.keys(__ext.data_dict).forEach(()=>{
|
||||
str+=__ext.data_dict[_get_url];
|
||||
});
|
||||
let links = str.split('\n').filter(it=>it.trim() && it.includes(','));
|
||||
links = links.map(it=>it.trim());
|
||||
let plays = Array.from(new Set(links));
|
||||
print('搜索关键词:'+wd);
|
||||
print('过滤前:'+plays.length);
|
||||
plays = plays.filter(it=>it.includes(wd));
|
||||
print('过滤后:'+plays.length);
|
||||
print(plays);
|
||||
let _list = [];
|
||||
plays.forEach((it)=>{
|
||||
_list.push({
|
||||
'vod_name':it.split(',')[0],
|
||||
'vod_id':it.split(',')[1].trim()+'$'+it.split(',')[0].trim()+'#search#',
|
||||
'vod_pic':def_pic,
|
||||
})
|
||||
});
|
||||
return JSON.stringify({
|
||||
'list': _list
|
||||
});
|
||||
}
|
||||
|
||||
// 导出函数对象
|
||||
export default {
|
||||
init: init,
|
||||
home: home,
|
||||
homeVod: homeVod,
|
||||
category: category,
|
||||
detail: detail,
|
||||
play: play,
|
||||
search: search
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,2 @@
|
||||
{"key":"直播转点播","name":"电视直播","type":3,"api":"http://我不是.肥猫.love:63/JS/直播转点播2.js","ext":"http://我不是.肥猫.love:63/lives/直播仓.json"},
|
||||
{"key":"lf_js直播","name":"mtv","type":3,"api":"https://agit.ai/leeqys/xc/raw/branch/master/sub/lf_live_min.js","ext":"https://agit.ai/leeqys/xc/raw/branch/master/sub/lf_live_min.txt"},
|
||||
@ -0,0 +1,42 @@
|
||||
[
|
||||
|
||||
{
|
||||
"name": "饭太硬",
|
||||
"url": "http://ftyyy.tk/live.txt&&&https://agit.ai/wjj415/w/raw/branch/master/t/1.jpg"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "肥猫",
|
||||
"url": "http://我不是.肥猫.love:63/TV/tvzb.txt"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "巧计",
|
||||
"url": "https://ghproxy.com/https://raw.githubusercontent.com/dxawi/1/main/tvlive.txt"
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"name": "吾爱",
|
||||
"url": "http://52bsj.vip:81/api/v3/file/get/763/live.txt?sign=87BTGT1_6AOry7FPwy_uuxFTv2Wcb9aDMj46rDdRTD8%3D%3A0"
|
||||
},
|
||||
{
|
||||
"name": "IPV6",
|
||||
"url": "https://ghproxy.com/https://raw.githubusercontent.com/fanmingming/live/main/tv/m3u/ipv6.m3u"
|
||||
},
|
||||
{
|
||||
"name": "☜免费版||VIP版☞",
|
||||
"url": ""
|
||||
},
|
||||
|
||||
{"name": "vip","url": "https://ghproxy.com/https://raw.githubusercontent.com/jackson0829/jackson0829.github.io/main/AV.txt"
|
||||
},{"name": "jackell777","url": "$https://ghproxy.com/https://raw.githubusercontent.com/jackell777/jackell777.github.io/main/list.txt"
|
||||
},{"name": "svip","url": "https://ghproxy.com/https://raw.githubusercontent.com/wjjkkk/wj/main/6.png"
|
||||
},{"name": "vip2","url": "https://ghproxy.com/https://raw.githubusercontent.com/jackson0829/jackson0829.github.io/main/AV2.txt"
|
||||
},{"name": "vip3","url": "https://ghproxy.com/https://raw.githubusercontent.com/jackson0829/jackson0829.github.io/main/AV3.txt"
|
||||
},{"name": "vip4","url": "https://ghproxy.com/https://raw.githubusercontent.com/jackson0829/jackson0829.github.io/main/AV4.txt"
|
||||
}
|
||||
|
||||
|
||||
|
||||
]
|
||||
@ -0,0 +1,12 @@
|
||||
[
|
||||
{"name":"小胡","url":"https://agit.ai/xiaohu/tvbox/raw/branch/main/live.txt&&&https://api.caonm.net/api/mc/"},
|
||||
|
||||
{"name":"饭饭直播","url":"https://dxawi.github.io/0/tvlive.txt&&&https://api.caonm.net/api/mc/"},
|
||||
|
||||
{"name":"肥猫直播","url":"http://我不是.肥猫.love:63/TV/tvzb.txt&&&http://我不是.肥猫.love:63/lives/直播图1.png"},
|
||||
|
||||
{"name":"俊于直播","url":"http://home.jundie.top:81/Cat/tv/live.txt&&&https://api.caonm.net/api/mc/"},
|
||||
|
||||
{"name": "音乐电台", "url": "http://hz752.love:63/txt/yydt.txt&&&http://我不是.肥猫.love:63/lives/直播图1.png"}
|
||||
|
||||
]
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,6 @@
|
||||
[
|
||||
{"name":"MV","url":"http://我不是.肥猫.love:63/lives/mv.txt&&&http://我不是.肥猫.love:63/lives/直播图3.png"},
|
||||
{"name":"菜菜","url":"http://ht.grelighting.cn/html/zb.txt&&&http://我不是.肥猫.love:63/lives/直播图1.png"},
|
||||
{"name":"肥猫!!","url":"http://我不是.肥猫.love:63/TV/tvzb.txt&&&http://我不是.肥猫.love:63/lives/直播图5.png"},
|
||||
{"name":"范明","url":"https://ghproxy.com/raw.githubusercontent.com/fanmingming/live/main/tv/m3u/global.m3u&&&https://api.likepoems.com/img/mc"}
|
||||
]
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,3 +1,3 @@
|
||||
{
|
||||
"cookie": "https://agit.ai/laozou/zou/raw/branch/b/cookie.txt",
|
||||
"classes": [ { "type_name": "儿童早教", "type_id": "儿童早教" }, { "type_name": "儿童启蒙故事", "type_id": "儿童启蒙故事" }, { "type_name": "儿童英语启蒙", "type_id": "儿童英语启蒙" }, { "type_name": "儿童歌曲", "type_id": "儿童歌曲" }, { "type_name": "儿童绘画", "type_id": "儿童绘画" }, { "type_name": "睡前故事", "type_id": "睡前故事" }, { "type_name": "儿童动画", "type_id": "儿童动画" }, { "type_name": "儿童音乐", "type_id": "儿童音乐" }, { "type_name": "儿童安全教育", "type_id": "儿童安全教育" }, { "type_name": "贝瓦儿歌", "type_id": "贝瓦儿歌" }, { "type_name": "悟空识字", "type_id": "悟空识字" }, { "type_name": "宝宝巴士", "type_id": "宝宝巴士" }, { "type_name": "儿歌多多", "type_id": "儿歌多多" }, { "type_name": "学而思", "type_id": "学而思" } ] }
|
||||
{
|
||||
"cookie": "https://agit.ai/laozou/XYQ0612/raw/branch/main/biliext/cookie.txt",
|
||||
"classes": [ { "type_name": "儿童早教", "type_id": "儿童早教" }, { "type_name": "儿童启蒙故事", "type_id": "儿童启蒙故事" }, { "type_name": "儿童英语启蒙", "type_id": "儿童英语启蒙" }, { "type_name": "儿童歌曲", "type_id": "儿童歌曲" }, { "type_name": "儿童绘画", "type_id": "儿童绘画" }, { "type_name": "睡前故事", "type_id": "睡前故事" }, { "type_name": "儿童动画", "type_id": "儿童动画" }, { "type_name": "儿童音乐", "type_id": "儿童音乐" }, { "type_name": "儿童安全教育", "type_id": "儿童安全教育" }, { "type_name": "贝瓦儿歌", "type_id": "贝瓦儿歌" }, { "type_name": "悟空识字", "type_id": "悟空识字" }, { "type_name": "宝宝巴士", "type_id": "宝宝巴士" }, { "type_name": "儿歌多多", "type_id": "儿歌多多" }, { "type_name": "学而思", "type_id": "学而思" } ] }
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,461 @@
|
||||
#coding=utf-8
|
||||
#!/usr/bin/python
|
||||
import sys
|
||||
sys.path.append('..')
|
||||
from base.spider import Spider
|
||||
import json
|
||||
import time
|
||||
import base64
|
||||
import re
|
||||
from urllib import request, parse
|
||||
import urllib
|
||||
import urllib.request
|
||||
import time
|
||||
|
||||
class Spider(Spider): # 元类 默认的元类 type
|
||||
def getName(self):
|
||||
return "中央电视台"#可搜索
|
||||
def init(self,extend=""):
|
||||
print("============{0}============".format(extend))
|
||||
pass
|
||||
def isVideoFormat(self,url):
|
||||
pass
|
||||
def manualVideoCheck(self):
|
||||
pass
|
||||
def homeContent(self,filter):
|
||||
result = {}
|
||||
cateManual = {
|
||||
"电视剧": "电视剧",
|
||||
"动画片": "动画片",
|
||||
"纪录片": "纪录片",
|
||||
"特别节目": "特别节目",
|
||||
"节目大全":"节目大全"
|
||||
}
|
||||
classes = []
|
||||
for k in cateManual:
|
||||
classes.append({
|
||||
'type_name':k,
|
||||
'type_id':cateManual[k]
|
||||
})
|
||||
result['class'] = classes
|
||||
if(filter):
|
||||
result['filters'] = self.config['filter']
|
||||
return result
|
||||
def homeVideoContent(self):
|
||||
result = {
|
||||
'list':[]
|
||||
}
|
||||
return result
|
||||
def categoryContent(self,tid,pg,filter,extend):
|
||||
result = {}
|
||||
month = ""#月
|
||||
year = ""#年
|
||||
area=''#地区
|
||||
channel=''#频道
|
||||
datafl=''#类型
|
||||
letter=''#字母
|
||||
pagecount=24
|
||||
if tid=='动画片':
|
||||
id=urllib.parse.quote(tid)
|
||||
if 'datadq-area' in extend.keys():
|
||||
area=urllib.parse.quote(extend['datadq-area'])
|
||||
if 'dataszm-letter' in extend.keys():
|
||||
letter=extend['dataszm-letter']
|
||||
if 'datafl-sc' in extend.keys():
|
||||
datafl=urllib.parse.quote(extend['datafl-sc'])
|
||||
url='https://api.cntv.cn/list/getVideoAlbumList?channelid=CHAL1460955899450127&area={0}&sc={4}&fc={1}&letter={2}&p={3}&n=24&serviceId=tvcctv&topv=1&t=json'.format(area,id,letter,pg,datafl)
|
||||
elif tid=='纪录片':
|
||||
id=urllib.parse.quote(tid)
|
||||
if 'datapd-channel' in extend.keys():
|
||||
channel=urllib.parse.quote(extend['datapd-channel'])
|
||||
if 'datafl-sc' in extend.keys():
|
||||
datafl=urllib.parse.quote(extend['datafl-sc'])
|
||||
if 'datanf-year' in extend.keys():
|
||||
year=extend['datanf-year']
|
||||
if 'dataszm-letter' in extend.keys():
|
||||
letter=extend['dataszm-letter']
|
||||
url='https://api.cntv.cn/list/getVideoAlbumList?channelid=CHAL1460955924871139&fc={0}&channel={1}&sc={2}&year={3}&letter={4}&p={5}&n=24&serviceId=tvcctv&topv=1&t=json'.format(id,channel,datafl,year,letter,pg)
|
||||
elif tid=='电视剧':
|
||||
id=urllib.parse.quote(tid)
|
||||
if 'datafl-sc' in extend.keys():
|
||||
datafl=urllib.parse.quote(extend['datafl-sc'])
|
||||
if 'datanf-year' in extend.keys():
|
||||
year=extend['datanf-year']
|
||||
if 'dataszm-letter' in extend.keys():
|
||||
letter=extend['dataszm-letter']
|
||||
url='https://api.cntv.cn/list/getVideoAlbumList?channelid=CHAL1460955853485115&area={0}&sc={1}&fc={2}&year={3}&letter={4}&p={5}&n=24&serviceId=tvcctv&topv=1&t=json'.format(area,datafl,id,year,letter,pg)
|
||||
elif tid=='特别节目':
|
||||
id=urllib.parse.quote(tid)
|
||||
if 'datapd-channel' in extend.keys():
|
||||
channel=urllib.parse.quote(extend['datapd-channel'])
|
||||
if 'datafl-sc' in extend.keys():
|
||||
datafl=urllib.parse.quote(extend['datafl-sc'])
|
||||
if 'dataszm-letter' in extend.keys():
|
||||
letter=extend['dataszm-letter']
|
||||
url='https://api.cntv.cn/list/getVideoAlbumList?channelid=CHAL1460955953877151&channel={0}&sc={1}&fc={2}&bigday=&letter={3}&p={4}&n=24&serviceId=tvcctv&topv=1&t=json'.format(channel,datafl,id,letter,pg)
|
||||
elif tid=='节目大全':
|
||||
cid=''#频道
|
||||
if 'cid' in extend.keys():
|
||||
cid=extend['cid']
|
||||
fc=''#分类
|
||||
if 'fc' in extend.keys():
|
||||
fc=extend['fc']
|
||||
fl=''#字母
|
||||
if 'fl' in extend.keys():
|
||||
fl=extend['fl']
|
||||
url = 'https://api.cntv.cn/lanmu/columnSearch?&fl={0}&fc={1}&cid={2}&p={3}&n=20&serviceId=tvcctv&t=json&cb=ko'.format(fl,fc,cid,pg)
|
||||
pagecount=20
|
||||
else:
|
||||
url = 'https://tv.cctv.com/epg/index.shtml'
|
||||
|
||||
videos=[]
|
||||
htmlText =self.webReadFile(urlStr=url,header=self.header)
|
||||
if tid=='节目大全':
|
||||
index=htmlText.rfind(');')
|
||||
if index>-1:
|
||||
htmlText=htmlText[3:index]
|
||||
videos =self.get_list1(html=htmlText,tid=tid)
|
||||
else:
|
||||
videos =self.get_list(html=htmlText,tid=tid)
|
||||
#print(videos)
|
||||
|
||||
result['list'] = videos
|
||||
result['page'] = pg
|
||||
result['pagecount'] = 9999 if len(videos)>=pagecount else pg
|
||||
result['limit'] = 90
|
||||
result['total'] = 999999
|
||||
return result
|
||||
def detailContent(self,array):
|
||||
result={}
|
||||
aid = array[0].split('###')
|
||||
tid = aid[0]
|
||||
logo = aid[3]
|
||||
lastVideo = aid[2]
|
||||
title = aid[1]
|
||||
id= aid[4]
|
||||
|
||||
vod_year= aid[5]
|
||||
actors= aid[6]
|
||||
brief= aid[7]
|
||||
fromId='CCTV'
|
||||
if tid=="节目大全":
|
||||
lastUrl = 'https://api.cntv.cn/video/videoinfoByGuid?guid={0}&serviceId=tvcctv'.format(id)
|
||||
htmlTxt = self.webReadFile(urlStr=lastUrl,header=self.header)
|
||||
topicId=json.loads(htmlTxt)['ctid']
|
||||
Url = "https://api.cntv.cn/NewVideo/getVideoListByColumn?id={0}&d=&p=1&n=100&sort=desc&mode=0&serviceId=tvcctv&t=json".format(topicId)
|
||||
htmlTxt = self.webReadFile(urlStr=Url,header=self.header)
|
||||
else:
|
||||
Url='https://api.cntv.cn/NewVideo/getVideoListByAlbumIdNew?id={0}&serviceId=tvcctv&p=1&n=100&mode=0&pub=1'.format(id)
|
||||
jRoot = ''
|
||||
videoList = []
|
||||
try:
|
||||
if tid=="搜索":
|
||||
fromId='中央台'
|
||||
videoList=[title+"$"+lastVideo]
|
||||
else:
|
||||
htmlTxt=self.webReadFile(urlStr=Url,header=self.header)
|
||||
jRoot = json.loads(htmlTxt)
|
||||
data=jRoot['data']
|
||||
jsonList=data['list']
|
||||
videoList=self.get_EpisodesList(jsonList=jsonList)
|
||||
if len(videoList)<1:
|
||||
htmlTxt=self.webReadFile(urlStr=lastVideo,header=self.header)
|
||||
if tid=="电视剧" or tid=="纪录片":
|
||||
patternTxt=r"'title':\s*'(?P<title>.+?)',\n{0,1}\s*'brief':\s*'(.+?)',\n{0,1}\s*'img':\s*'(.+?)',\n{0,1}\s*'url':\s*'(?P<url>.+?)'"
|
||||
elif tid=="特别节目":
|
||||
patternTxt=r'class="tp1"><a\s*href="(?P<url>https://.+?)"\s*target="_blank"\s*title="(?P<title>.+?)"></a></div>'
|
||||
elif tid=="动画片":
|
||||
patternTxt=r"'title':\s*'(?P<title>.+?)',\n{0,1}\s*'img':\s*'(.+?)',\n{0,1}\s*'brief':\s*'(.+?)',\n{0,1}\s*'url':\s*'(?P<url>.+?)'"
|
||||
elif tid=="节目大全":
|
||||
patternTxt=r'href="(?P<url>.+?)" target="_blank" alt="(?P<title>.+?)" title=".+?">'
|
||||
videoList=self.get_EpisodesList_re(htmlTxt=htmlTxt,patternTxt=patternTxt)
|
||||
fromId='央视'
|
||||
except:
|
||||
pass
|
||||
if len(videoList) == 0:
|
||||
return {}
|
||||
vod = {
|
||||
"vod_id":array[0],
|
||||
"vod_name":title,
|
||||
"vod_pic":logo,
|
||||
"type_name":tid,
|
||||
"vod_year":vod_year,
|
||||
"vod_area":"",
|
||||
"vod_remarks":'',
|
||||
"vod_actor":actors,
|
||||
"vod_director":'',
|
||||
"vod_content":brief
|
||||
}
|
||||
vod['vod_play_from'] = fromId
|
||||
vod['vod_play_url'] = "#".join(videoList)
|
||||
result = {
|
||||
'list':[
|
||||
vod
|
||||
]
|
||||
}
|
||||
return result
|
||||
def get_lineList(self,Txt,mark,after):
|
||||
circuit=[]
|
||||
origin=Txt.find(mark)
|
||||
while origin>8:
|
||||
end=Txt.find(after,origin)
|
||||
circuit.append(Txt[origin:end])
|
||||
origin=Txt.find(mark,end)
|
||||
return circuit
|
||||
def get_RegexGetTextLine(self,Text,RegexText,Index):
|
||||
returnTxt=[]
|
||||
pattern = re.compile(RegexText, re.M|re.S)
|
||||
ListRe=pattern.findall(Text)
|
||||
if len(ListRe)<1:
|
||||
return returnTxt
|
||||
for value in ListRe:
|
||||
returnTxt.append(value)
|
||||
return returnTxt
|
||||
def searchContent(self,key,quick):
|
||||
key=urllib.parse.quote(key)
|
||||
Url='https://search.cctv.com/ifsearch.php?page=1&qtext={0}&sort=relevance&pageSize=20&type=video&vtime=-1&datepid=1&channel=&pageflag=0&qtext_str={0}'.format(key)
|
||||
htmlTxt=self.webReadFile(urlStr=Url,header=self.header)
|
||||
videos=self.get_list_search(html=htmlTxt,tid='搜索')
|
||||
result = {
|
||||
'list':videos
|
||||
}
|
||||
return result
|
||||
def playerContent(self,flag,id,vipFlags):
|
||||
result = {}
|
||||
url=''
|
||||
parse=0
|
||||
headers = {
|
||||
'User-Agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1'
|
||||
}
|
||||
if flag=='CCTV':
|
||||
url=self.get_m3u8(urlTxt=id)
|
||||
else:
|
||||
try:
|
||||
html=self.webReadFile(urlStr=id,header=self.header)
|
||||
guid=self.get_RegexGetText(Text=html,RegexText=r'var\sguid\s*=\s*"(.+?)";',Index=1)
|
||||
url=self.get_m3u8(urlTxt=guid)
|
||||
except :
|
||||
url=id
|
||||
parse=1
|
||||
if url.find('https:')<0:
|
||||
url=id
|
||||
parse=1
|
||||
result["parse"] = parse#1=嗅探,0=播放
|
||||
result["playUrl"] = ''
|
||||
result["url"] = url
|
||||
result["header"] =headers
|
||||
return result
|
||||
config = {
|
||||
"player": {},
|
||||
"filter": {
|
||||
"电视剧":[
|
||||
{"key":"datafl-sc","name":"类型","value":[{"n":"全部","v":""},{"n":"谍战","v":"谍战"},{"n":"悬疑","v":"悬疑"},{"n":"刑侦","v":"刑侦"},{"n":"历史","v":"历史"},{"n":"古装","v":"古装"},{"n":"武侠","v":"武侠"},{"n":"军旅","v":"军旅"},{"n":"战争","v":"战争"},{"n":"喜剧","v":"喜剧"},{"n":"青春","v":"青春"},{"n":"言情","v":"言情"},{"n":"偶像","v":"偶像"},{"n":"家庭","v":"家庭"},{"n":"年代","v":"年代"},{"n":"革命","v":"革命"},{"n":"农村","v":"农村"},{"n":"都市","v":"都市"},{"n":"其他","v":"其他"}]},
|
||||
{"key":"datadq-area","name":"地区","value":[{"n":"全部","v":""},{"n":"中国大陆","v":"中国大陆"},{"n":"中国香港","v":"香港"},{"n":"美国","v":"美国"},{"n":"欧洲","v":"欧洲"},{"n":"泰国","v":"泰国"}]},
|
||||
{"key":"datanf-year","name":"年份","value":[{"n":"全部","v":""},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"},{"n":"2003","v":"2003"},{"n":"2002","v":"2002"},{"n":"2001","v":"2001"},{"n":"2000","v":"2000"},{"n":"1999","v":"1999"},{"n":"1998","v":"1998"},{"n":"1997","v":"1997"}]},
|
||||
{"key":"dataszm-letter","name":"字母","value":[{"n":"全部","v":""},{"n":"A","v":"A"},{"n":"C","v":"C"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]}
|
||||
],
|
||||
"动画片":[
|
||||
{"key":"datafl-sc","name":"类型","value":[{"n":"全部","v":""},{"n":"亲子","v":"亲子"},{"n":"搞笑","v":"搞笑"},{"n":"冒险","v":"冒险"},{"n":"动作","v":"动作"},{"n":"宠物","v":"宠物"},{"n":"体育","v":"体育"},{"n":"益智","v":"益智"},{"n":"历史","v":"历史"},{"n":"教育","v":"教育"},{"n":"校园","v":"校园"},{"n":"言情","v":"言情"},{"n":"武侠","v":"武侠"},{"n":"经典","v":"经典"},{"n":"未来","v":"未来"},{"n":"古代","v":"古代"},{"n":"神话","v":"神话"},{"n":"真人","v":"真人"},{"n":"励志","v":"励志"},{"n":"热血","v":"热血"},{"n":"奇幻","v":"奇幻"},{"n":"童话","v":"童话"},{"n":"剧情","v":"剧情"},{"n":"夺宝","v":"夺宝"},{"n":"其他","v":"其他"}]},
|
||||
{"key":"datadq-area","name":"地区","value":[{"n":"全部","v":""},{"n":"中国大陆","v":"中国大陆"},{"n":"美国","v":"美国"},{"n":"欧洲","v":"欧洲"}]},
|
||||
{"key":"dataszm-letter","name":"字母","value":[{"n":"全部","v":""},{"n":"A","v":"A"},{"n":"C","v":"C"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]}
|
||||
],
|
||||
"纪录片":[
|
||||
{"key":"datapd-channel","name":"频道","value":[{"n":"全部","v":""},{"n":"CCTV{1 综合","v":"CCTV{1 综合"},{"n":"CCTV{2 财经","v":"CCTV{2 财经"},{"n":"CCTV{3 综艺","v":"CCTV{3 综艺"},{"n":"CCTV{4 中文国际","v":"CCTV{4 中文国际"},{"n":"CCTV{5 体育","v":"CCTV{5 体育"},{"n":"CCTV{6 电影","v":"CCTV{6 电影"},{"n":"CCTV{7 国防军事","v":"CCTV{7 国防军事"},{"n":"CCTV{8 电视剧","v":"CCTV{8 电视剧"},{"n":"CCTV{9 纪录","v":"CCTV{9 纪录"},{"n":"CCTV{10 科教","v":"CCTV{10 科教"},{"n":"CCTV{11 戏曲","v":"CCTV{11 戏曲"},{"n":"CCTV{12 社会与法","v":"CCTV{12 社会与法"},{"n":"CCTV{13 新闻","v":"CCTV{13 新闻"},{"n":"CCTV{14 少儿","v":"CCTV{14 少儿"},{"n":"CCTV{15 音乐","v":"CCTV{15 音乐"},{"n":"CCTV{17 农业农村","v":"CCTV{17 农业农村"}]},
|
||||
{"key":"datafl-sc","name":"类型","value":[{"n":"全部","v":""},{"n":"人文历史","v":"人文历史"},{"n":"人物","v":"人物"},{"n":"军事","v":"军事"},{"n":"探索","v":"探索"},{"n":"社会","v":"社会"},{"n":"时政","v":"时政"},{"n":"经济","v":"经济"},{"n":"科技","v":"科技"}]},
|
||||
{"key":"datanf-year","name":"年份","value":[{"n":"全部","v":""},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"}]},
|
||||
{"key":"dataszm-letter","name":"字母","value":[{"n":"全部","v":""},{"n":"A","v":"A"},{"n":"C","v":"C"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]}
|
||||
],
|
||||
"特别节目":[
|
||||
{"key":"datapd-channel","name":"频道","value":[{"n":"全部","v":""},{"n":"CCTV{1 综合","v":"CCTV{1 综合"},{"n":"CCTV{2 财经","v":"CCTV{2 财经"},{"n":"CCTV{3 综艺","v":"CCTV{3 综艺"},{"n":"CCTV{4 中文国际","v":"CCTV{4 中文国际"},{"n":"CCTV{5 体育","v":"CCTV{5 体育"},{"n":"CCTV{6 电影","v":"CCTV{6 电影"},{"n":"CCTV{7 国防军事","v":"CCTV{7 国防军事"},{"n":"CCTV{8 电视剧","v":"CCTV{8 电视剧"},{"n":"CCTV{9 纪录","v":"CCTV{9 纪录"},{"n":"CCTV{10 科教","v":"CCTV{10 科教"},{"n":"CCTV{11 戏曲","v":"CCTV{11 戏曲"},{"n":"CCTV{12 社会与法","v":"CCTV{12 社会与法"},{"n":"CCTV{13 新闻","v":"CCTV{13 新闻"},{"n":"CCTV{14 少儿","v":"CCTV{14 少儿"},{"n":"CCTV{15 音乐","v":"CCTV{15 音乐"},{"n":"CCTV{17 农业农村","v":"CCTV{17 农业农村"}]},
|
||||
{"key":"datafl-sc","name":"类型","value":[{"n":"全部","v":""},{"n":"全部","v":"全部"},{"n":"新闻","v":"新闻"},{"n":"经济","v":"经济"},{"n":"综艺","v":"综艺"},{"n":"体育","v":"体育"},{"n":"军事","v":"军事"},{"n":"影视","v":"影视"},{"n":"科教","v":"科教"},{"n":"戏曲","v":"戏曲"},{"n":"青少","v":"青少"},{"n":"音乐","v":"音乐"},{"n":"社会","v":"社会"},{"n":"公益","v":"公益"},{"n":"其他","v":"其他"}]},
|
||||
{"key":"dataszm-letter","name":"字母","value":[{"n":"全部","v":""},{"n":"A","v":"A"},{"n":"C","v":"C"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]}
|
||||
],
|
||||
"节目大全":[{"key":"cid","name":"频道","value":[{"n":"全部","v":""},{"n":"CCTV-1综合","v":"EPGC1386744804340101"},{"n":"CCTV-2财经","v":"EPGC1386744804340102"},{"n":"CCTV-3综艺","v":"EPGC1386744804340103"},{"n":"CCTV-4中文国际","v":"EPGC1386744804340104"},{"n":"CCTV-5体育","v":"EPGC1386744804340107"},{"n":"CCTV-6电影","v":"EPGC1386744804340108"},{"n":"CCTV-7国防军事","v":"EPGC1386744804340109"},{"n":"CCTV-8电视剧","v":"EPGC1386744804340110"},{"n":"CCTV-9纪录","v":"EPGC1386744804340112"},{"n":"CCTV-10科教","v":"EPGC1386744804340113"},{"n":"CCTV-11戏曲","v":"EPGC1386744804340114"},{"n":"CCTV-12社会与法","v":"EPGC1386744804340115"},{"n":"CCTV-13新闻","v":"EPGC1386744804340116"},{"n":"CCTV-14少儿","v":"EPGC1386744804340117"},{"n":"CCTV-15音乐","v":"EPGC1386744804340118"},{"n":"CCTV-16奥林匹克","v":"EPGC1634630207058998"},{"n":"CCTV-17农业农村","v":"EPGC1563932742616872"},{"n":"CCTV-5+体育赛事","v":"EPGC1468294755566101"}]},{"key":"fc","name":"分类","value":[{"n":"全部","v":""},{"n":"新闻","v":"新闻"},{"n":"体育","v":"体育"},{"n":"综艺","v":"综艺"},{"n":"健康","v":"健康"},{"n":"生活","v":"生活"},{"n":"科教","v":"科教"},{"n":"经济","v":"经济"},{"n":"农业","v":"农业"},{"n":"法治","v":"法治"},{"n":"军事","v":"军事"},{"n":"少儿","v":"少儿"},{"n":"动画","v":"动画"},{"n":"纪实","v":"纪实"},{"n":"戏曲","v":"戏曲"},{"n":"音乐","v":"音乐"},{"n":"影视","v":"影视"}]},{"key":"fl","name":"字母","value":[{"n":"全部","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"},{"n":"2003","v":"2003"},{"n":"2002","v":"2002"},{"n":"2001","v":"2001"},{"n":"2000","v":"2000"}]},{"key":"month","name":"月份","value":[{"n":"全部","v":""},{"n":"12","v":"12"},{"n":"11","v":"11"},{"n":"10","v":"10"},{"n":"09","v":"09"},{"n":"08","v":"08"},{"n":"07","v":"07"},{"n":"06","v":"06"},{"n":"05","v":"05"},{"n":"04","v":"04"},{"n":"03","v":"03"},{"n":"02","v":"02"},{"n":"01","v":"01"}]}]
|
||||
}
|
||||
}
|
||||
header = {
|
||||
"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.54 Safari/537.36",
|
||||
"Host": "tv.cctv.com",
|
||||
"Referer": "https://tv.cctv.com/"
|
||||
}
|
||||
|
||||
def localProxy(self,param):
|
||||
return [200, "video/MP2T", action, ""]
|
||||
#-----------------------------------------------自定义函数-----------------------------------------------
|
||||
#访问网页
|
||||
def webReadFile(self,urlStr,header):
|
||||
html=''
|
||||
req=urllib.request.Request(url=urlStr)#,headers=header
|
||||
with urllib.request.urlopen(req) as response:
|
||||
html = response.read().decode('utf-8')
|
||||
return html
|
||||
#判断网络地址是否存在
|
||||
def TestWebPage(self,urlStr,header):
|
||||
html=''
|
||||
req=urllib.request.Request(url=urlStr,method='HEAD')#,headers=header
|
||||
with urllib.request.urlopen(req) as response:
|
||||
html = response.getcode ()
|
||||
return html
|
||||
#正则取文本
|
||||
def get_RegexGetText(self,Text,RegexText,Index):
|
||||
returnTxt=""
|
||||
Regex=re.search(RegexText, Text, re.M|re.S)
|
||||
if Regex is None:
|
||||
returnTxt=""
|
||||
else:
|
||||
returnTxt=Regex.group(Index)
|
||||
return returnTxt
|
||||
#取集数
|
||||
def get_EpisodesList(self,jsonList):
|
||||
videos=[]
|
||||
for vod in jsonList:
|
||||
url = vod['guid']
|
||||
title =vod['title']
|
||||
if len(url) == 0:
|
||||
continue
|
||||
videos.append(title+"$"+url)
|
||||
return videos
|
||||
#取集数
|
||||
def get_EpisodesList_re(self,htmlTxt,patternTxt):
|
||||
ListRe=re.finditer(patternTxt, htmlTxt, re.M|re.S)
|
||||
videos=[]
|
||||
for vod in ListRe:
|
||||
url = vod.group('url')
|
||||
title =vod.group('title')
|
||||
if len(url) == 0:
|
||||
continue
|
||||
videos.append(title+"$"+url)
|
||||
return videos
|
||||
#取剧集区
|
||||
def get_lineList(self,Txt,mark,after):
|
||||
circuit=[]
|
||||
origin=Txt.find(mark)
|
||||
while origin>8:
|
||||
end=Txt.find(after,origin)
|
||||
circuit.append(Txt[origin:end])
|
||||
origin=Txt.find(mark,end)
|
||||
return circuit
|
||||
#正则取文本,返回数组
|
||||
def get_RegexGetTextLine(self,Text,RegexText,Index):
|
||||
returnTxt=[]
|
||||
pattern = re.compile(RegexText, re.M|re.S)
|
||||
ListRe=pattern.findall(Text)
|
||||
if len(ListRe)<1:
|
||||
return returnTxt
|
||||
for value in ListRe:
|
||||
returnTxt.append(value)
|
||||
return returnTxt
|
||||
#删除html标签
|
||||
def removeHtml(self,txt):
|
||||
soup = re.compile(r'<[^>]+>',re.S)
|
||||
txt =soup.sub('', txt)
|
||||
return txt.replace(" "," ")
|
||||
#取m3u8
|
||||
def get_m3u8(self,urlTxt):
|
||||
url = "https://vdn.apps.cntv.cn/api/getHttpVideoInfo.do?pid={0}".format(urlTxt)
|
||||
html=self.webReadFile(urlStr=url,header=self.header)
|
||||
jo =json.loads(html)
|
||||
link = jo['hls_url'].strip()
|
||||
html = self.webReadFile(urlStr=link,header=self.header)
|
||||
content = html.strip()
|
||||
arr = content.split('\n')
|
||||
urlPrefix = self.get_RegexGetText(Text=link,RegexText='(http[s]?://[a-zA-z0-9.]+)/',Index=1)
|
||||
subUrl = arr[-1].split('/')
|
||||
subUrl[3] = '1200'
|
||||
subUrl[-1] = '1200.m3u8'
|
||||
hdUrl = urlPrefix + '/'.join(subUrl)
|
||||
|
||||
url = urlPrefix + arr[-1]
|
||||
|
||||
hdRsp = self.TestWebPage(urlStr=hdUrl,header=self.header)
|
||||
if hdRsp == 200:
|
||||
url = hdUrl
|
||||
else:
|
||||
url=''
|
||||
return url
|
||||
#搜索
|
||||
def get_list_search(self,html,tid):
|
||||
jRoot = json.loads(html)
|
||||
jsonList=jRoot['list']
|
||||
videos=[]
|
||||
for vod in jsonList:
|
||||
url = vod['urllink']
|
||||
title =self.removeHtml(txt=vod['title'])
|
||||
img=vod['imglink']
|
||||
id=vod['id']
|
||||
brief=vod['channel']
|
||||
year=vod['uploadtime']
|
||||
if len(url) == 0:
|
||||
continue
|
||||
guid="{0}###{1}###{2}###{3}###{4}###{5}###{6}###{7}".format(tid,title,url,img,id,year,'',brief)
|
||||
videos.append({
|
||||
"vod_id":guid,
|
||||
"vod_name":title,
|
||||
"vod_pic":img,
|
||||
"vod_remarks":year
|
||||
})
|
||||
return videos
|
||||
return videos
|
||||
def get_list1(self,html,tid):
|
||||
jRoot = json.loads(html)
|
||||
videos = []
|
||||
data=jRoot['response']
|
||||
if data is None:
|
||||
return []
|
||||
jsonList=data['docs']
|
||||
for vod in jsonList:
|
||||
id = vod['lastVIDE']['videoSharedCode']
|
||||
title =vod['column_name']
|
||||
url=vod['column_website']
|
||||
img=vod['column_logo']
|
||||
year=vod['column_playdate']
|
||||
brief=vod['column_brief']
|
||||
actors=''
|
||||
if len(url) == 0:
|
||||
continue
|
||||
guid="{0}###{1}###{2}###{3}###{4}###{5}###{6}###{7}".format(tid,title,url,img,id,year,actors,brief)
|
||||
#print(vod_id)
|
||||
videos.append({
|
||||
"vod_id":guid,
|
||||
"vod_name":title,
|
||||
"vod_pic":img,
|
||||
"vod_remarks":''
|
||||
})
|
||||
#print(videos)
|
||||
return videos
|
||||
#分类取结果
|
||||
def get_list(self,html,tid):
|
||||
jRoot = json.loads(html)
|
||||
videos = []
|
||||
data=jRoot['data']
|
||||
if data is None:
|
||||
return []
|
||||
jsonList=data['list']
|
||||
for vod in jsonList:
|
||||
url = vod['url']
|
||||
title =vod['title']
|
||||
img=vod['image']
|
||||
id=vod['id']
|
||||
try:
|
||||
brief=vod['brief']
|
||||
except:
|
||||
brief=''
|
||||
try:
|
||||
year=vod['year']
|
||||
except:
|
||||
year=''
|
||||
try:
|
||||
actors=vod['actors']
|
||||
except:
|
||||
actors=''
|
||||
if len(url) == 0:
|
||||
continue
|
||||
guid="{0}###{1}###{2}###{3}###{4}###{5}###{6}###{7}".format(tid,title,url,img,id,year,actors,brief)
|
||||
#print(vod_id)
|
||||
videos.append({
|
||||
"vod_id":guid,
|
||||
"vod_name":title,
|
||||
"vod_pic":img,
|
||||
"vod_remarks":''
|
||||
})
|
||||
return videos
|
||||
@ -1,411 +0,0 @@
|
||||
#coding=utf-8
|
||||
#!/usr/bin/python
|
||||
import sys
|
||||
sys.path.append('..')
|
||||
from base.spider import Spider
|
||||
import base64
|
||||
import math
|
||||
import json
|
||||
import requests
|
||||
import urllib
|
||||
from urllib import request, parse
|
||||
import urllib.request
|
||||
import re
|
||||
|
||||
class Spider(Spider):
|
||||
def getName(self):
|
||||
return "西瓜视频(个人中心)"
|
||||
def init(self,extend=""):
|
||||
self.userid=self.get_userid()
|
||||
def isVideoFormat(self,url):
|
||||
pass
|
||||
def manualVideoCheck(self):
|
||||
pass
|
||||
def homeContent(self,filter):
|
||||
result = {}
|
||||
cateManual = {
|
||||
"电视剧":"dianshiju",
|
||||
"电影":"dianying",
|
||||
"动漫":"dongman",
|
||||
"纪录片":"jilupian",
|
||||
"少儿":"shaoer",
|
||||
"综艺":"zongyi",
|
||||
"关注":"follow"
|
||||
|
||||
}
|
||||
if self.userid=='':
|
||||
del cateManual['关注']
|
||||
classes = []
|
||||
for k in cateManual:
|
||||
classes.append({
|
||||
'type_name': k,
|
||||
'type_id': cateManual[k]
|
||||
})
|
||||
|
||||
result['class'] = classes
|
||||
if (filter):
|
||||
result['filters'] = self.config['filter']
|
||||
return result
|
||||
def homeVideoContent(self):
|
||||
result = {
|
||||
'list': []
|
||||
}
|
||||
return result
|
||||
userid=''
|
||||
def categoryContent(self,tid,pg,filter,extend):
|
||||
result = {}
|
||||
idTxt='电视剧'
|
||||
maximum=17
|
||||
url = 'https://www.ixigua.com/api/cinema/filterv2/albums'
|
||||
if tid=='dianying':
|
||||
idTxt='电影'
|
||||
elif tid=='zongyi':
|
||||
idTxt='综艺'
|
||||
elif tid=='dianshiju':
|
||||
idTxt='电视剧'
|
||||
elif tid=='dongman':
|
||||
idTxt='动漫'
|
||||
elif tid=='jilupian':
|
||||
idTxt='纪录片'
|
||||
elif tid=='shaoer':
|
||||
idTxt='少儿'
|
||||
elif tid=='follow':
|
||||
offset=0 if int(pg)<2 else 20*int(pg)
|
||||
url='https://www.ixigua.com/api/userv2/follow/list?authorId={0}&sortType=desc&sortType=desc&cursor={1}'.format(self.userid,offset)
|
||||
maximum=12
|
||||
videos=[]
|
||||
if tid!='follow':
|
||||
offset=0 if int(pg)<2 else 18*int(pg)
|
||||
self.header['Referer']='https://www.ixigua.com/cinema/filter/'.format(tid)
|
||||
data=r'{"pinyin":"'+tid+'","filters":{"type":"'+idTxt+'","area":"全部地区","tag":"全部类型","sort":"综合排序","paid":"全部资费"},"offset":'+str(offset)+',"limit":18}'
|
||||
req = request.Request(url=url, data=bytes(data, encoding='utf8'),headers=self.header, method='POST')
|
||||
response = request.urlopen(req)
|
||||
urlTxt=response.read().decode('utf-8')
|
||||
videos= self.get_list_videoGroup_json(jsonTxt=urlTxt)
|
||||
else:
|
||||
rsp=self.fetch(url,headers=self.header)
|
||||
urlTxt=rsp.text
|
||||
videos= self.get_list_videoGroup_follow_json(jsonTxt=urlTxt)
|
||||
numvL = len(videos)
|
||||
result['list'] = videos
|
||||
result['page'] = pg
|
||||
result['pagecount'] = pg if int(numvL)<maximum else int(pg)+1
|
||||
result['limit'] = numvL
|
||||
result['total'] = numvL
|
||||
return result
|
||||
def get_userid(self):
|
||||
Url='https://www.ixigua.com/'
|
||||
rsp=self.fetch(Url,headers=self.header)
|
||||
htmlTxt = rsp.text
|
||||
userid= self.get_RegexGetText(Text=htmlTxt,RegexText=r'"identity":{"id":"(\d+?)",',Index=1)
|
||||
return userid
|
||||
def detailContent(self,array):
|
||||
result = {}
|
||||
aid = array[0].split('###')
|
||||
key = aid[1]
|
||||
title = aid[0]
|
||||
act=aid[2]
|
||||
logo = aid[3]
|
||||
Url='https://www.ixigua.com/api/albumv2/details?albumId={0}'.format(key)
|
||||
if len(aid)==5:
|
||||
Url='https://www.ixigua.com/api/videov2/author/new_video_list?to_user_id={0}'.format(key)
|
||||
rsp = self.fetch(Url,headers=self.header)
|
||||
htmlTxt = rsp.text
|
||||
typeName=''
|
||||
area=''
|
||||
dir=''
|
||||
cont=''
|
||||
vip='true'
|
||||
videoList=[]
|
||||
if len(aid)==5:
|
||||
jRoot = json.loads(htmlTxt)
|
||||
if jRoot['code']!=200:
|
||||
return result
|
||||
jo = jRoot['data']
|
||||
jsonList=jo['videoList']
|
||||
for value in jsonList:
|
||||
id="{0}${1}_false".format(value['title'],value.get('group_id'))
|
||||
videoList.append(id)
|
||||
dir=title
|
||||
elif htmlTxt.find('playlist')>2:
|
||||
jRoot = json.loads(htmlTxt)
|
||||
if jRoot['code']!=200:
|
||||
return result
|
||||
jo = jRoot['data']
|
||||
jsonList=jo['playlist']
|
||||
if jsonList is not None:
|
||||
for value in jsonList:
|
||||
id="{0}${1}?id={2}_{3}".format(value['title'],value['albumId'],value['episodeId'],vip)
|
||||
videoList.append(id)
|
||||
playFrom=[v for v in jo['albumInfo']['tagList']]
|
||||
typeName='/'.join(playFrom)
|
||||
playFrom=[v for v in jo['albumInfo']['areaList']]
|
||||
area='/'.join(playFrom)
|
||||
playFrom=[v['name'] for v in jo['albumInfo']['directorList']]
|
||||
dir='/'.join(playFrom)
|
||||
cont=jo['albumInfo']['intro']
|
||||
if len(videoList)<1:
|
||||
return result
|
||||
vod = {
|
||||
"vod_id":array[0],
|
||||
"vod_name":title,
|
||||
"vod_pic":logo,
|
||||
"type_name":typeName,
|
||||
"vod_year":'',
|
||||
"vod_area":area,
|
||||
"vod_remarks":"",
|
||||
"vod_actor":'',
|
||||
"vod_director":dir,
|
||||
"vod_content":cont
|
||||
}
|
||||
vod['vod_play_from'] = '西瓜'
|
||||
vod['vod_play_url'] = "#".join(videoList)
|
||||
result = {
|
||||
'list':[
|
||||
vod
|
||||
]
|
||||
}
|
||||
return result
|
||||
|
||||
def verifyCode(self):
|
||||
pass
|
||||
|
||||
def searchContent(self,key,quick):
|
||||
Url='https://www.ixigua.com/api/searchv2/lvideo/{0}/0'.format(urllib.parse.quote(key))
|
||||
rsp = self.fetch(Url,headers=self.header)
|
||||
htmlTxt = rsp.text
|
||||
videos=self.get_list(html=htmlTxt)
|
||||
'''
|
||||
Url='https://www.ixigua.com/api/searchv2/user/{0}/10'.format(urllib.parse.quote(key))
|
||||
rsp = self.fetch(Url,headers=self.header)
|
||||
htmlTxt1 = rsp.text
|
||||
videos=self.get_list_user(html=htmlTxt1)
|
||||
'''
|
||||
result = {
|
||||
'list': videos
|
||||
}
|
||||
return result
|
||||
|
||||
def playerContent(self,flag,id,vipFlags):
|
||||
result={}
|
||||
UrlId=id.split('_')
|
||||
Url='https://www.ixigua.com/{0}'.format(UrlId[0])
|
||||
headers = {
|
||||
'User-Agent':'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3947.100 Mobile Safari/537.36'
|
||||
}
|
||||
jx=1 if UrlId[1]=='true' else 0
|
||||
result["parse"] = 1#0=直接播放,1=解析
|
||||
result["playUrl"] = ''
|
||||
result["url"] = Url
|
||||
result['jx'] = jx#VIP解析
|
||||
result["header"] =headers
|
||||
return result
|
||||
def get_RegexGetText(self,Text,RegexText,Index):
|
||||
returnTxt=""
|
||||
Regex=re.search(RegexText, Text, re.M|re.I)
|
||||
if Regex is None:
|
||||
returnTxt=""
|
||||
else:
|
||||
returnTxt=Regex.group(Index)
|
||||
return returnTxt
|
||||
def get_RegexGetTextLine(self,Text,RegexText,Index):
|
||||
returnTxt=[]
|
||||
pattern = re.compile(RegexText)
|
||||
ListRe=pattern.findall(Text)
|
||||
if len(ListRe)<1:
|
||||
return returnTxt
|
||||
for value in ListRe:
|
||||
returnTxt.append(value)
|
||||
return returnTxt
|
||||
def get_playlist(self,Text,headStr,endStr):
|
||||
circuit=""
|
||||
origin=Text.find(headStr)
|
||||
if origin>8:
|
||||
end=Text.find(endStr,origin)
|
||||
circuit=Text[origin:end]
|
||||
return circuit
|
||||
def removeHtml(self,txt):
|
||||
soup = re.compile(r'<[^>]+>',re.S)
|
||||
txt =soup.sub('', txt)
|
||||
return txt.replace(" "," ")
|
||||
def get_webReadFile(self,urlStr):
|
||||
headers = {
|
||||
'Referer':urlStr,
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36',
|
||||
'Host': 'www.ikmjw.com'
|
||||
}
|
||||
req = urllib.request.Request(url=urlStr, headers=headers)
|
||||
html = urllib.request.urlopen(req).read().decode('utf-8')
|
||||
return html
|
||||
def get_list(self,html):
|
||||
result={}
|
||||
jRoot = json.loads(html)
|
||||
if jRoot['code']!=0:
|
||||
return result
|
||||
jo = jRoot['data']
|
||||
if len(jo)<1:
|
||||
return result
|
||||
vodList = jo['data']
|
||||
if len(vodList)<1:
|
||||
return result
|
||||
videos=[]
|
||||
img='_'
|
||||
artist='_'
|
||||
for vod in vodList:
|
||||
if vod['type']!='lvideo':
|
||||
continue
|
||||
data=vod['data']
|
||||
display=data['display']
|
||||
title =display['name']
|
||||
if len(title)==0:
|
||||
continue
|
||||
episode_link=display.get('episode_link')
|
||||
asc_link=episode_link.get('asc_link')
|
||||
KeyName='album_id'
|
||||
if asc_link is None:
|
||||
asc_link=episode_link.get('desc_link')
|
||||
KeyName='album_id'
|
||||
id=asc_link[0].get('album_id')
|
||||
sslocal=asc_link[0]['scheme_url']
|
||||
if sslocal!=None and sslocal.find('sslocal:')<0:
|
||||
continue
|
||||
video_cover_info=display.get('video_cover_info')
|
||||
img=video_cover_info['url'] if video_cover_info is not None else '_'
|
||||
try:
|
||||
artist=display['actor']
|
||||
except Exception:
|
||||
artist=''
|
||||
remarks=display['rating']
|
||||
vod_id="{0}###{1}###{2}###{3}".format(title,id,artist,img)
|
||||
videos.append({
|
||||
"vod_id":vod_id,
|
||||
"vod_name":title,
|
||||
"vod_pic":img,
|
||||
"vod_remarks":remarks
|
||||
})
|
||||
return videos
|
||||
def get_list_user(self,html):
|
||||
result={}
|
||||
jRoot = json.loads(html)
|
||||
if jRoot['code']!=0:
|
||||
return result
|
||||
jo = jRoot['data']
|
||||
if len(jo)<1:
|
||||
return result
|
||||
vodList = jo['data']
|
||||
if len(vodList)<1:
|
||||
return result
|
||||
videos=[]
|
||||
img='_'
|
||||
artist='_'
|
||||
for vod in vodList:
|
||||
if vod['type']!='user':
|
||||
continue
|
||||
data=vod['data']
|
||||
img=data['avatar']
|
||||
title =data['name']
|
||||
log_pb=json.loads(data.get('log_pb'))
|
||||
user_auth_info=json.loads(data.get('user_auth_info'))
|
||||
remarks=user_auth_info['auth_info']
|
||||
id=log_pb.get('search_result_id')
|
||||
vod_id="{0}###{1}###{2}###{3}###{4}".format(title,id,artist,img,'user')
|
||||
videos.append({
|
||||
"vod_id":vod_id,
|
||||
"vod_name":title,
|
||||
"vod_pic":img,
|
||||
"vod_remarks":remarks
|
||||
})
|
||||
return videos
|
||||
def get_list_videoGroup_json(self,jsonTxt):
|
||||
result={}
|
||||
jRoot = json.loads(jsonTxt)
|
||||
if jRoot['code']!=200:
|
||||
return result
|
||||
jo = jRoot['data']
|
||||
vodList = jo['albumList']
|
||||
if len(vodList)<1:
|
||||
return result
|
||||
videos=[]
|
||||
img='_'
|
||||
artist='_'
|
||||
for vod in vodList:
|
||||
url =vod['albumId']
|
||||
title =vod['title']
|
||||
imgList =vod.get('coverList')
|
||||
if len(imgList)>0:
|
||||
img=imgList[0]['url']
|
||||
remarks=vod['subTitle']
|
||||
artistList=vod.get('actorList')
|
||||
if artistList is not None:
|
||||
artistList=artistList if len(artistList)<5 else artistList[0:4]
|
||||
artist='/'.join(artistList)
|
||||
if len(title)==0:
|
||||
continue
|
||||
#标题###地址###演员###封面
|
||||
vod_id="{0}###{1}###{2}###{3}".format(title,url,artist,img)
|
||||
videos.append({
|
||||
"vod_id":vod_id,
|
||||
"vod_name":title,
|
||||
"vod_pic":img,
|
||||
"vod_remarks":remarks
|
||||
})
|
||||
return videos
|
||||
def get_list_videoGroup_follow_json(self,jsonTxt):
|
||||
videos=[]
|
||||
jRoot = json.loads(jsonTxt)
|
||||
if jRoot['code']!=0:
|
||||
return videos
|
||||
jo = jRoot['data']
|
||||
vodList=jo['data']
|
||||
if len(vodList)<1:
|
||||
return videos
|
||||
img='_'
|
||||
artist=''
|
||||
for vod in vodList:
|
||||
url =vod.get('user_id')
|
||||
title =vod['name']
|
||||
img =vod.get('avatar_url')
|
||||
remarks=vod['description']
|
||||
artistList=vod.get('actorList')
|
||||
artist=title
|
||||
if len(title)==0:
|
||||
continue
|
||||
#标题###地址###演员###封面
|
||||
vod_id="{0}###{1}###{2}###{3}###{4}".format(title,url,artist,img,'user')
|
||||
videos.append({
|
||||
"vod_id":vod_id,
|
||||
"vod_name":title,
|
||||
"vod_pic":img,
|
||||
"vod_remarks":remarks
|
||||
})
|
||||
return videos
|
||||
def get_lineList(self,Txt,mark,after):
|
||||
circuit=[]
|
||||
origin=Txt.find(mark)
|
||||
while origin>8:
|
||||
end=Txt.find(after,origin)
|
||||
circuit.append(Txt[origin:end])
|
||||
origin=Txt.find(mark,end)
|
||||
return circuit
|
||||
def get_EpisodesList(self,jsonList):
|
||||
vodItems=[]
|
||||
for value in jsonList:
|
||||
vodItems.append(value['title']+"$"+'https://www.ixigua.com/{0}?logTag=55abe18cfb733871bb04'.format(value['episodeId']))
|
||||
return vodItems
|
||||
config = {
|
||||
"player": {},
|
||||
"filter": {}
|
||||
}
|
||||
header = {
|
||||
"Cookie":"s_v_web_id=verify_lev3h43l_rrTPrFDG_ztWQ_4ugg_8WBA_yGVYsXlVyoBh; passport_csrf_token=80e0efe90bc8bd6681a896dd90cd08cc; passport_csrf_token_default=80e0efe90bc8bd6681a896dd90cd08cc; __ac_nonce=0643361890096533c765; __ac_signature=_02B4Z6wo00f01JPVVrAAAIDBcisHPfWA66CT91IAAEDK9840CE-PheNOCgA4VtrFG0-K.KkLmAR5KsI-Xx-6dBXxz.ABWU2OpEd22kF7biwGaVmGR7an4S1heLEU9xpv0ObRSHFHDslR7uL8fb; support_webp=true; support_avif=false; MONITOR_WEB_ID=45c3b6ab-7ad4-4805-b971-5962d1d6909a; ttwid=1%7CCueNR-HU9tGVF30WaiFCjXDxh0FUXoXsZr-cIb9Dogg%7C1681089268%7Cf0eeaa2016a602a277055494954f083e9f7fa8121c5dd1162db9195932fa167b; odin_tt=386a42a5740f9859d4670373fc8c70cf320ea5b227aed04bcc53fde26c233e8c952a8b0ba5f80fd3d46f9663fa595d8c; sid_guard=842b56710f55021912487890e7d5bef3%7C1681089337%7C3024001%7CMon%2C+15-May-2023+01%3A15%3A38+GMT; uid_tt=b7eb5b73cd72bed6d3c2e1e1e8aaa9f3; uid_tt_ss=b7eb5b73cd72bed6d3c2e1e1e8aaa9f3; sid_tt=842b56710f55021912487890e7d5bef3; sessionid=842b56710f55021912487890e7d5bef3; sessionid_ss=842b56710f55021912487890e7d5bef3; sid_ucp_v1=1.0.0-KGQ2YzBlMDFiMzIyMjY0YTIwMDg2MjZmZGQzMTE5MmFlYTYzY2EwMTMKFQjL2cnx9AIQucbNoQYYGCAMOAhABRoCaGwiIDg0MmI1NjcxMGY1NTAyMTkxMjQ4Nzg5MGU3ZDViZWYz; ssid_ucp_v1=1.0.0-KGQ2YzBlMDFiMzIyMjY0YTIwMDg2MjZmZGQzMTE5MmFlYTYzY2EwMTMKFQjL2cnx9AIQucbNoQYYGCAMOAhABRoCaGwiIDg0MmI1NjcxMGY1NTAyMTkxMjQ4Nzg5MGU3ZDViZWYz; csrf_session_id=c58adecac1d20d91d8c61e72ce0c6fdb; ixigua-a-s=3; msToken=St3ptsHkwBjPgGvRWhZfVdhHO_K16vTizxxna17draCvt4ekz6DQXO6c2Ctrp6gOnn9_Abm83-a9URQp5rKb-JIPs4mQPn2fpKlQRY6jLDBWUdLYTePIAACU6cY2fk40; tt_scid=nN3WPItw72gnB5PDiGcHveirXDZ8oDl5n.ihKN583mmZhoe.uLhFpy3JOL8wrsQO0ed1",
|
||||
"Referer": 'https://www.ixigua.com/cinema/filter/dianshiju/',
|
||||
'User-Agent':'User-Agent: Mozilla%2F5.0+(Windows+NT+10.0%3B+WOW64)+AppleWebKit%2F537.36+(KHTML%2C+like+Gecko)+Chrome%2F63.0.3239.132+Safari%2F537.36',
|
||||
'Host': 'www.ixigua.com',
|
||||
'Accept': 'application/json, text/plain, */*',
|
||||
'x-secsdk-csrf-token': '0001000000017b593ba6251b18bd7bce2753042917bb36e534867b9606317584c00b0ae836c61754314b7365128e',
|
||||
'tt-anti-token': 'oDr7A3PDDFq4pWzk-707faf92a9e3040f5c6ed4284d53b05b7091221852c0e9d32bca9fcfe5035225',
|
||||
'content-type': 'application/json'
|
||||
}
|
||||
|
||||
def localProxy(self,param):
|
||||
return [200, "video/MP2T", action, ""]
|
||||
Loading…
Reference in new issue