mirror of
https://github.com/ls125781003/tvboxtg.git
synced 2025-12-16 01:02:21 +00:00
更新线路
整体线路:v20250724 南风线路:v20250724 潇洒线路:v07.25.2
This commit is contained in:
51
潇洒/XBPQ/明星影视.json
Normal file
51
潇洒/XBPQ/明星影视.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"作者": "",
|
||||
"站名": "明星影院",
|
||||
"请求头": "User-Agent$MOBILE_UA",
|
||||
"编码": "UTF-8",
|
||||
"图片代理": "",
|
||||
"直接播放": "0",
|
||||
"播放请求头": "",
|
||||
"过滤词": "",
|
||||
"主页url": "https://mxvod.com",
|
||||
"首页": "120",
|
||||
"起始页": "1",
|
||||
"分类url": "https://mxvod.com/vodshow/{cateId}-{area}-{by}-{class}-{lang}-{letter}---{catePg}---{year}.html",
|
||||
"分类": "电影$dianying#电视剧$dianshiju#综艺$zongyi#动漫$dongman#短剧$duanju",
|
||||
"二次截取": "module-items\"&&id=\"page",
|
||||
"数组": "lazyloaded&&/a>",
|
||||
"标题": "title=*>&&<",
|
||||
"图片": "data-src=\"&&\"",
|
||||
"副标题": "class\">&&<",
|
||||
"链接": "href=\"&&\"[替换:vodplay>>voddetail#-1-1.html>>.html]",
|
||||
"影片年代": "-----------*.html\">&&</",
|
||||
"影片地区": "video:area\" content=\"&&\"",
|
||||
"影片类型": "video:class\" content=\"&&\"",
|
||||
"状态": "tag-link-red\">&&</div>",
|
||||
"导演": "导演:&&</div>",
|
||||
"主演": "主演:&&\">",
|
||||
"简介": "vod_content\"&&</div>",
|
||||
"线路数组": "data-dropdown&&/small>",
|
||||
"线路标题": "value=\"&&\"+【共+<small>&&<+集】",
|
||||
"播放数组": "id=\"sort-item&&</div>",
|
||||
"播放列表": "<a&&/a>",
|
||||
"播放标题": "<span>&&<",
|
||||
"播放链接": "href=\"&&\"",
|
||||
"跳转播放链接": "var player_*\"url\":\"&&\"",
|
||||
"搜索请求头": "User-Agent$MOBILE_UA",
|
||||
"搜索url": "https://mxvod.com/vodsearch/{wd}----------{pg}---.html",
|
||||
"搜索模式": "1",
|
||||
"搜索数组": "lazyload\"&&/a>",
|
||||
"搜索标题": "title=\"&&\"",
|
||||
"搜索图片": "data-src=\"&&\"",
|
||||
"搜索副标题": "title=*>&&<",
|
||||
"搜索链接": "href=\"&&\"",
|
||||
"筛选": "1",
|
||||
"类型": "动作片$dongzuopian#喜剧片$xijupian#爱情片$aiqingpian#科幻片$kehuanpian#恐怖片$kongbupian#战争片$zhanzhengpian#剧情片$juqingpian#动画片$donghuapian#悬疑片$xuanyi#纪录片$jilupian#奇幻片$qihuanpian#灾难片$zainanpian||国产剧$guochanju#欧美剧$oumeiju#日剧$riju#韩剧$hanju#港台剧$gangtai#海外剧$haiwai||大陆综艺$daluzongyi#港台综艺$gangtaizongyi#欧美综艺$oumeizongyi#日韩综艺$rihanzongyi#海外综艺$haiwaizongyi||国产动漫$guochandongman#日韩动漫$rihandongman#欧美动漫$oumeidongman#海外动漫$haiwaidongman||空",
|
||||
"剧情": "喜剧&爱情&恐怖&动作&科幻&剧情&战争&警匪&犯罪&动画&奇幻&武侠&冒险&枪战&恐怖&悬疑&惊悚&经典&青春&文艺&微电影&古装&历史&运动&农村&儿童&网络电影||古装&战争&青春偶像&喜剧&家庭&犯罪&动作&奇幻&剧情&历史&经典&乡村&情景&商战&网剧&其他||选秀&情感&访谈&播报&旅游&音乐&美食&纪实&曲艺&生活&游戏互动&财经&求职||情感&科幻&热血&推理&搞笑&冒险&萝莉&校园&动作&机战&运动&战争&少年&少女&社会&原创&亲子&益智&励志&其他||古装&虐恋&逆袭&神豪&重生&复仇&穿越&甜宠&强者&萌宝&其它",
|
||||
"年份": "1990-2025",
|
||||
"年份值": "*",
|
||||
"语言值": "*",
|
||||
"排序": "时间&人气&评分",
|
||||
"排序值": "time&hits&score"
|
||||
}
|
||||
@@ -1,6 +1,16 @@
|
||||
{
|
||||
"简介": "p_txt show_part\">&&</p>",
|
||||
"副标题": "v_note\">&&</div>",
|
||||
"分类url": "https://saohuody.com/list/{cateId}-{catePg}.html",
|
||||
"分类": "国产剧$12#港剧$13#台剧$14#日剧$15#韩剧$16#美剧$17#海外$18#泰剧$19#动作$5#喜剧$6#爱情$7#科幻$8#恐怖$9#剧情$10#战争$11#动画$33"
|
||||
"首页": "0",
|
||||
"请求头": "User-Agent$MOBILE_UA#Accept$text/html,application/xhtml+xml,application/xml;;q=0.9,image/avif,image/webp,image/apng,*/*;;q=0.8,application/signed-exchange;;v=b3;;q=0.7&&Accept-Language@zh-CN,zh;;q=0.9",
|
||||
"分类url": "https://shdy2.com/list/{cateId}-{catePg}.html",
|
||||
"分类": "剧集$2#电影$1#港剧$21#台剧$26#日剧$24#韩剧$22#美剧$23",
|
||||
"数组": "class=\"v_img&&/li>",
|
||||
"标题": "alt=\"&&\"",
|
||||
"图片": "original=\"&&\"",
|
||||
"链接": "href=\"&&\"",
|
||||
"简介": "show_part\">&&<a",
|
||||
"演员": "主演:&&<a",
|
||||
"导演": "导演:&&/",
|
||||
"播放二次截取": "class=\"play_list&&/ul>",
|
||||
"播放数组": "<li&&/li>",
|
||||
"倒序": "1"
|
||||
}
|
||||
38
潇洒/XBPQ/麦田影视.json
Normal file
38
潇洒/XBPQ/麦田影视.json
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"站名": "麦田appXBPQ",
|
||||
"规则作者": "啦啦啦",
|
||||
"请求头": "User-Agent$MOBILE_UA",
|
||||
"编码": "UTF-8",
|
||||
"主页url": "http://172.247.31.147:25321/mtys.php/v6/index_video",
|
||||
"分类url": "http://172.247.31.147:25321/mtys.php/v6/video?pg={catePg}&tid={cateId}&class={class}&area={area}&lang={lang}&year={year}&order={by};;mr",
|
||||
"分类": "电影&电视剧&综艺&动漫&少儿&短剧&直播",
|
||||
"分类值": "1&2&3&4&25&26&30",
|
||||
"数组": "{&&}",
|
||||
"图片": "vod_pic\":\"&&\"",
|
||||
"标题": "vod_name\":\"&&\"",
|
||||
"副标题": "vod_remarks\":\"&&\"",
|
||||
"链接": "http://172.247.31.147:25321/mtys.php/v6/video_detail?id=+vod_id\":&&,",
|
||||
"线路二次截取": "vod_url_with_player\":\\[{&&}\\][替换:\"name\":\">>\"name\":\"题]",
|
||||
"线路数组": "\"name\":\"&&,",
|
||||
"线路标题": "题&&\"",
|
||||
"播放二次截取": "vod_url_with_player\":\\[{&&}\\]",
|
||||
"播放数组": "url\":&&,[替换:\">>接表题#$>>题接#\\#>>接表表题]",
|
||||
"播放列表": "表&&表",
|
||||
"播放标题": "题&&题",
|
||||
"播放链接": "urlDecode(接&&接)",
|
||||
"解析": "PD源$http://172.247.31.148:25320/jx.php?url=#NB源$https://api.nbyjson.top:7788/api/?key=ws9Lz1EtqfU09AzZKl&url=#ZB源$http://27.25.159.14:6699/api/mgapp.php?url=",
|
||||
"影片类型": "vod_class\":\"&&\"",
|
||||
"影片年代": "vod_year\":\"&&\"",
|
||||
"影片地区": "vod_area\":\"&&\"",
|
||||
"导演": "vod_director\":\"&&\"",
|
||||
"主演": "vod_actor\":\"&&\"",
|
||||
"简介": "vod_content\":\"&&\"",
|
||||
"搜索url": "http://172.247.31.147:25321/mtys.php/v6/search?pg={pg}&tid=0&text={wd}",
|
||||
"搜索模式": "1",
|
||||
"搜索二次截取": "data\":\\[&&\\]",
|
||||
"搜索数组": "{&&}",
|
||||
"搜索图片": "vod_pic\":\"&&\"",
|
||||
"搜索标题": "vod_name\":\"&&\"",
|
||||
"搜索副标题": "vod_remarks\":\"&&\"",
|
||||
"搜索链接": "http://172.247.31.147:25321/mtys.php/v6/video_detail?id=+vod_id\":&&,"
|
||||
}
|
||||
44
潇洒/api.json
44
潇洒/api.json
@@ -349,7 +349,8 @@
|
||||
"quickSearch": 1,
|
||||
"api": "csp_AppGet",
|
||||
"ext": {
|
||||
"url": "https://www.guahd.com",
|
||||
"url": "",
|
||||
"site": "https://www.guahd.com/1.txt",
|
||||
"dataKey": "f2A7D4B9E8C16531",
|
||||
"dataIv": "f2A7D4B9E8C16531",
|
||||
"deviceId": "",
|
||||
@@ -1029,6 +1030,28 @@
|
||||
"filterable": 1,
|
||||
"playerType": 2
|
||||
},
|
||||
{
|
||||
"key": "爱看短剧",
|
||||
"name": "爱看|短剧",
|
||||
"type": 3,
|
||||
"api": "./py/爱看短剧.py",
|
||||
"searchable": 1,
|
||||
"changeable": 1,
|
||||
"quickSearch": 1,
|
||||
"filterable": 1,
|
||||
"playerType": 2
|
||||
},
|
||||
{
|
||||
"key": "锦鲤短剧",
|
||||
"name": "锦鲤|短剧",
|
||||
"type": 3,
|
||||
"api": "./py/锦鲤短剧.py",
|
||||
"searchable": 1,
|
||||
"changeable": 1,
|
||||
"quickSearch": 1,
|
||||
"filterable": 1,
|
||||
"playerType": 2
|
||||
},
|
||||
{
|
||||
"key": "短剧屋",
|
||||
"name": "短剧屋|短剧",
|
||||
@@ -1211,6 +1234,20 @@
|
||||
"quickSearch": 1,
|
||||
"filterable": 1
|
||||
},
|
||||
{
|
||||
"key": "明星影视",
|
||||
"name": "明星|影视",
|
||||
"type": 3,
|
||||
"api": "csp_HBPQ",
|
||||
"ext": "./XBPQ/明星影视.json"
|
||||
},
|
||||
{
|
||||
"key": "麦田影视",
|
||||
"name": "麦田|影视",
|
||||
"type": 3,
|
||||
"api": "csp_HBPQ",
|
||||
"ext": "./XBPQ/麦田影视.json"
|
||||
},
|
||||
{
|
||||
"key": "海纳影视",
|
||||
"name": "海纳|影视",
|
||||
@@ -1581,7 +1618,10 @@
|
||||
"api": "csp_QnMp4",
|
||||
"searchable": 1,
|
||||
"quickSearch": 1,
|
||||
"filterable": 1
|
||||
"filterable": 1,
|
||||
"ext": {
|
||||
"url": "https://www.qwnull.com,https://www.qwmkv.com,https://www.qwfilm.com,https://www.qnmp4.com,https://www.qnnull.com,https://www.qnhot.com"
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "80S",
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
var rule = {
|
||||
title: '懒盘搜',
|
||||
host: 'https://qkpanso.com/',
|
||||
hostJs: '',
|
||||
headers: {
|
||||
'User-Agent': 'Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.91 Mobile Safari/537.36',
|
||||
},
|
||||
编码: 'utf-8',
|
||||
timeout: 5000,
|
||||
url: 'https://qkpanso.com/search?q=fyclass&format=video&page=fypage',
|
||||
filter_url: '',
|
||||
detailUrl: '',
|
||||
searchUrl: 'https://qkpanso.com/search?q=**&format=video&exact=true&page=fypage',
|
||||
searchable: 1,
|
||||
quickSearch: 1,
|
||||
filterable: 1,
|
||||
class_name: '',
|
||||
class_url: '',
|
||||
proxy_rule: '',
|
||||
sniffer: false,
|
||||
isVideo: '',
|
||||
play_parse: true,
|
||||
parse_url: '',
|
||||
lazy: "js:\n input = 'push://' + input;\n ",
|
||||
limit: 9,
|
||||
double: false,
|
||||
// 推荐: '*',
|
||||
一级: 'js:\n let html = fetch(input);\n let list = pdfa(html, "body&&.semi-space-medium-vertical");\n VODS = list.map(x => {\n let remarks = pdfh(x, "div&&img&&alt");\n // 过滤掉包含"迅雷云盘"的内容\n if(remarks.includes("迅雷云盘") || remarks.includes("115") || remarks.includes("阿里")) return null;\n return {\n vod_name: pdfh(x, "div&&a&&title"),\n vod_pic: \'http://pic-smzy.oss-cn-beijing.aliyuncs.com/images/5e/2a/1410241152a3eca2eca7ace140ed1c0c01b12a5e.png\',\n vod_remarks: remarks,\n vod_content: remarks,\n vod_id: pdfh(x, "div&&a&&href")\n }\n }).filter(x => x !== null);\n ',
|
||||
二级: {
|
||||
title: 'h1&&Text',
|
||||
img: 'img&&src',
|
||||
desc: '.card-text:eq(2)&&Text;;;;',
|
||||
content: 'body&&.semi-space-loose-vertical&&a&&href',
|
||||
tabs: "js:TABS = ['夸克盘搜']",
|
||||
lists: "js:\n LISTS = [];\n let lists1 = pdfa(html, 'body&&.semi-space-loose-vertical').map(it => {\n let _tt = pdfh(it, 'span&&title');\n let _uu = pdfh(it, 'a&&href');\n return _tt + '$' + _uu;\n });\n LISTS.push(lists1);\n ",
|
||||
},
|
||||
搜索: 'js:\n let html = fetch(input);\n let list = pdfa(html, "body&&.semi-space-medium-vertical");\n VODS = list.map(x => {\n let remarks = pdfh(x, "div&&img&&alt");\n // 过滤掉包含"迅雷云盘"的内容\n if(remarks.includes("迅雷云盘") || remarks.includes("115") || remarks.includes("阿里")) return null;\n return {\n vod_name: pdfh(x, "div&&a&&title"),\n vod_pic: \'http://pic-smzy.oss-cn-beijing.aliyuncs.com/images/5e/2a/1410241152a3eca2eca7ace140ed1c0c01b12a5e.png\',\n vod_remarks: remarks,\n vod_content: remarks,\n vod_id: pdfh(x, "div&&a&&href")\n }\n }).filter(x => x !== null);\n ',
|
||||
cate_exclude: '首页|留言|APP|下载|资讯|新闻|动态',
|
||||
tab_exclude: '猜你|喜欢|下载|剧情|榜|评论',
|
||||
类型: '影视',
|
||||
homeUrl: 'https://qkpanso.com/',
|
||||
二级访问前: '',
|
||||
encoding: 'utf-8',
|
||||
search_encoding: '',
|
||||
图片来源: '',
|
||||
图片替换: '',
|
||||
play_json: [],
|
||||
pagecount: {},
|
||||
tab_remove: [],
|
||||
tab_order: [],
|
||||
tab_rename: {},
|
||||
}
|
||||
52
潇洒/js/懒盘.js
52
潇洒/js/懒盘.js
@@ -1,52 +0,0 @@
|
||||
var rule = {
|
||||
title: '懒盘搜',
|
||||
host: 'https://www.lzpanx.com/',
|
||||
hostJs: '',
|
||||
headers: {
|
||||
'User-Agent': 'Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.91 Mobile Safari/537.36',
|
||||
},
|
||||
编码: 'utf-8',
|
||||
timeout: 5000,
|
||||
url: 'https://www.lzpanx.com/search?q=fyclass&format=video&page=fypage',
|
||||
filter_url: '',
|
||||
detailUrl: '',
|
||||
searchUrl: 'https://www.lzpanx.com/search?q=**&format=video&exact=true&page=fypage',
|
||||
searchable: 1,
|
||||
quickSearch: 1,
|
||||
filterable: 1,
|
||||
class_name: '剧集&电影&短剧&动漫&综艺',
|
||||
class_url: '剧集&电影&短网剧&动漫&综艺',
|
||||
proxy_rule: '',
|
||||
sniffer: false,
|
||||
isVideo: '',
|
||||
play_parse: true,
|
||||
parse_url: '',
|
||||
lazy: "js:\n input = 'push://' + input;\n ",
|
||||
limit: 9,
|
||||
double: false,
|
||||
// 推荐: '*',
|
||||
一级: 'js:\n let html = fetch(input);\n let list = pdfa(html, "body&&.semi-space-medium-vertical");\n VODS = list.map(x => {\n let remarks = pdfh(x, "div&&img&&alt");\n // 过滤掉包含"迅雷云盘"的内容\n if(remarks.includes("迅雷云盘") || remarks.includes("115") || remarks.includes("阿里")) return null;\n return {\n vod_name: pdfh(x, "div&&a&&title"),\n vod_pic: \'https://ww1.sinaimg.cn/mw690/006faMndly1htmb1m08adj30e20e2q3m.jpg\',\n vod_remarks: remarks,\n vod_content: remarks,\n vod_id: pdfh(x, "div&&a&&href")\n }\n }).filter(x => x !== null);\n ',
|
||||
二级: {
|
||||
title: 'h1&&Text',
|
||||
img: 'img&&src',
|
||||
desc: '.card-text:eq(2)&&Text;;;;',
|
||||
content: 'body&&.semi-space-loose-vertical&&a&&href',
|
||||
tabs: "js:TABS = ['懒盘']",
|
||||
lists: "js:\n LISTS = [];\n let lists1 = pdfa(html, 'body&&.semi-space-loose-vertical').map(it => {\n let _tt = pdfh(it, 'span&&title');\n let _uu = pdfh(it, 'a&&href');\n return _tt + '$' + _uu;\n });\n LISTS.push(lists1);\n ",
|
||||
},
|
||||
搜索: 'js:\n let html = fetch(input);\n let list = pdfa(html, "body&&.semi-space-medium-vertical");\n VODS = list.map(x => {\n let remarks = pdfh(x, "div&&img&&alt");\n // 过滤掉包含"迅雷云盘"的内容\n if(remarks.includes("迅雷云盘") || remarks.includes("115") || remarks.includes("阿里")) return null;\n return {\n vod_name: pdfh(x, "div&&a&&title"),\n vod_pic: \'https://ww1.sinaimg.cn/mw690/006faMndly1htmb1m08adj30e20e2q3m.jpg\',\n vod_remarks: remarks,\n vod_content: remarks,\n vod_id: pdfh(x, "div&&a&&href")\n }\n }).filter(x => x !== null);\n ',
|
||||
cate_exclude: '首页|留言|APP|下载|资讯|新闻|动态',
|
||||
tab_exclude: '猜你|喜欢|下载|剧情|榜|评论',
|
||||
类型: '影视',
|
||||
homeUrl: 'https://www.lzpanx.com/',
|
||||
二级访问前: '',
|
||||
encoding: 'utf-8',
|
||||
search_encoding: '',
|
||||
图片来源: '',
|
||||
图片替换: '',
|
||||
play_json: [],
|
||||
pagecount: {},
|
||||
tab_remove: [],
|
||||
tab_order: [],
|
||||
tab_rename: {},
|
||||
}
|
||||
109
潇洒/py/爱看短剧.py
Normal file
109
潇洒/py/爱看短剧.py
Normal file
@@ -0,0 +1,109 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# by @嗷呜
|
||||
import json
|
||||
import sys
|
||||
from pyquery import PyQuery as pq
|
||||
sys.path.append('..')
|
||||
from base.spider import Spider
|
||||
|
||||
class Spider(Spider):
|
||||
|
||||
def init(self, extend=""):
|
||||
pass
|
||||
|
||||
def getName(self):
|
||||
pass
|
||||
|
||||
def isVideoFormat(self, url):
|
||||
pass
|
||||
|
||||
def manualVideoCheck(self):
|
||||
pass
|
||||
|
||||
def destroy(self):
|
||||
pass
|
||||
|
||||
host='http://www.toule.top'
|
||||
|
||||
headers = {
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36',
|
||||
'Referer':f'{host}/',
|
||||
'Origin':host
|
||||
}
|
||||
|
||||
def homeContent(self, filter):
|
||||
data=self.getpq()
|
||||
result = {}
|
||||
classes = []
|
||||
for k in data('.swiper-wrapper .swiper-slide').items():
|
||||
classes.append({
|
||||
'type_name': k.text(),
|
||||
'type_id': k.text()
|
||||
})
|
||||
result['class'] = classes
|
||||
result['list'] = self.getlist(data('.container.items ul li'))
|
||||
return result
|
||||
|
||||
def homeVideoContent(self):
|
||||
pass
|
||||
|
||||
def categoryContent(self, tid, pg, filter, extend):
|
||||
data=self.getpq(f"/index.php/vod/show/class/{tid}/id/1/page/{pg}.html")
|
||||
result = {}
|
||||
result['list'] = self.getlist(data('.container.items ul li'))
|
||||
result['page'] = pg
|
||||
result['pagecount'] = 9999
|
||||
result['limit'] = 90
|
||||
result['total'] = 999999
|
||||
return result
|
||||
|
||||
def detailContent(self, ids):
|
||||
data=self.getpq(ids[0])
|
||||
v=data('.container.detail-content')
|
||||
vod = {
|
||||
'vod_remarks': v('.items-tags a').text(),
|
||||
'vod_content': v('.text-content .detail').text(),
|
||||
'vod_play_from': '爱看短剧',
|
||||
'vod_play_url': '#'.join([f"{i.text()}${i('a').attr('href')}" for i in data('.swiper-wrapper .swiper-slide').items()])
|
||||
}
|
||||
return {'list':[vod]}
|
||||
|
||||
def searchContent(self, key, quick, pg="1"):
|
||||
data=self.getpq(f"/index.php/vod/search/page/{pg}/wd/{key}.html")
|
||||
return {'list':self.getlist(data('.container.items ul li')),'page':pg}
|
||||
|
||||
def playerContent(self, flag, id, vipFlags):
|
||||
data=self.getpq(id)
|
||||
try:
|
||||
jstr=data('.player-content script').eq(0).text()
|
||||
jt=json.loads(jstr.split('=',1)[-1])
|
||||
p,url=0,jt['url']
|
||||
except Exception as e:
|
||||
print(f"获取播放地址失败: {e}")
|
||||
p,url=1,f'{self.host}{id}'
|
||||
return {'parse': p, 'url': url, 'header': self.headers}
|
||||
|
||||
def localProxy(self, param):
|
||||
pass
|
||||
|
||||
def liveContent(self, url):
|
||||
pass
|
||||
|
||||
def getpq(self, path=''):
|
||||
data=self.fetch(f"{self.host}{path}",headers=self.headers).text
|
||||
try:
|
||||
return pq(data)
|
||||
except Exception as e:
|
||||
print(f"{str(e)}")
|
||||
return pq(data.encode('utf-8'))
|
||||
|
||||
def getlist(self,data):
|
||||
videos = []
|
||||
for i in data.items():
|
||||
videos.append({
|
||||
'vod_id': i('.image-line').attr('href'),
|
||||
'vod_name': i('img').attr('alt'),
|
||||
'vod_pic': i('img').attr('src'),
|
||||
'vod_remarks': i('.remarks.light').text()
|
||||
})
|
||||
return videos
|
||||
147
潇洒/py/锦鲤短剧.py
Normal file
147
潇洒/py/锦鲤短剧.py
Normal file
@@ -0,0 +1,147 @@
|
||||
from base.spider import Spider
|
||||
import re,sys,json
|
||||
sys.path.append('..')
|
||||
|
||||
class Spider(Spider):
|
||||
api_host = 'https://api.jinlidj.com'
|
||||
origin = 'https://www.jinlidj.com'
|
||||
api_path = '/api/search'
|
||||
headers = {
|
||||
'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36",
|
||||
'Content-Type': "application/json",
|
||||
'accept-language': "zh-CN,zh;q=0.9",
|
||||
'cache-control': "no-cache",
|
||||
'origin': origin,
|
||||
'pragma': "no-cache",
|
||||
'priority': "u=1, i",
|
||||
'referer': origin+'/',
|
||||
'sec-ch-ua': "\"Not)A;Brand\";v=\"8\", \"Chromium\";v=\"138\", \"Google Chrome\";v=\"138\"",
|
||||
'sec-ch-ua-mobile': "?0",
|
||||
'sec-ch-ua-platform': "\"Windows\"",
|
||||
'sec-fetch-dest': "empty",
|
||||
'sec-fetch-mode': "cors",
|
||||
'sec-fetch-site': "same-site"
|
||||
}
|
||||
|
||||
def homeContent(self, filter):
|
||||
return {'class': [{'type_id': 1, 'type_name': '情感关系'}, {'type_id': 2, 'type_name': '成长逆袭'}, {'type_id': 3, 'type_name': '奇幻异能'}, {'type_id': 4, 'type_name': '战斗热血'}, {'type_id': 5, 'type_name': '伦理现实'}, {'type_id': 6, 'type_name': '时空穿越'}, {'type_id': 7, 'type_name': '权谋身份'}]}
|
||||
|
||||
def homeVideoContent(self):
|
||||
payload = {
|
||||
"page": 1,
|
||||
"limit": 24,
|
||||
"type_id": "",
|
||||
"year": "",
|
||||
"keyword": ""
|
||||
}
|
||||
response = self.post(f"{self.api_host}{self.api_path}", data=json.dumps(payload), headers=self.headers).json()
|
||||
data = response['data']
|
||||
videos = []
|
||||
for i in data['list']:
|
||||
videos.append({
|
||||
'vod_id': i.get('vod_id'),
|
||||
'vod_name': i.get('vod_name'),
|
||||
'vod_class': i.get('vod_class'),
|
||||
'vod_pic': i.get('vod_pic'),
|
||||
'vod_year': i.get('vod_year'),
|
||||
'vod_remarks': i.get('vod_total')+'集',
|
||||
'vod_score': i.get('vod_score')
|
||||
})
|
||||
return {'list': videos}
|
||||
|
||||
def detailContent(self, ids):
|
||||
response = self.post(f'{self.api_host}/api/detail/{ids[0]}', data=json.dumps({}), headers=self.headers).json()
|
||||
data = response['data']
|
||||
videos = []
|
||||
vod_play_url = ''
|
||||
for name,url in data['player'].items():
|
||||
vod_play_url += f'{name}${url}#'
|
||||
vod_play_url.rstrip('#')
|
||||
videos.append({
|
||||
'vod_id': data.get('vod_id'),
|
||||
'vod_name': data.get('vod_name'),
|
||||
'vod_content': data.get('vod_blurb'),
|
||||
'vod_remarks': '集数:' + data.get('vod_total'),
|
||||
"vod_director": data.get('vod_director'),
|
||||
"vod_actor": data.get('vod_actor'),
|
||||
'vod_year': data.get('vod_year'),
|
||||
'vod_area': data.get('vod_area'),
|
||||
'vod_play_from': '锦鲤短剧',
|
||||
'vod_play_url': vod_play_url
|
||||
})
|
||||
return {'list': videos}
|
||||
|
||||
def searchContent(self, key, quick, pg="1"):
|
||||
payload = {
|
||||
"page": pg,
|
||||
"limit": 24,
|
||||
"type_id": "",
|
||||
"keyword": key
|
||||
}
|
||||
response = self.post(f'{self.api_host}{self.api_path}', data=json.dumps(payload), headers=self.headers).json()
|
||||
data = response['data']
|
||||
videos = []
|
||||
for i in data['list']:
|
||||
videos.append({
|
||||
"vod_id": i['vod_id'],
|
||||
"vod_name": i['vod_name'],
|
||||
"vod_class": i['vod_class'],
|
||||
"vod_pic": i['vod_pic'],
|
||||
'vod_year': i.get('vod_year'),
|
||||
"vod_remarks": i['vod_total'] + '集'
|
||||
})
|
||||
return {'list': videos, 'page': pg, 'total': data['total'], 'limit': 24}
|
||||
|
||||
def categoryContent(self, tid, pg, filter, extend):
|
||||
payload = {
|
||||
"page": pg,
|
||||
"limit": 24,
|
||||
"type_id": tid,
|
||||
"year": "",
|
||||
"keyword": ""
|
||||
}
|
||||
response = self.post(f'{self.api_host}{self.api_path}', data=json.dumps(payload), headers=self.headers).json()
|
||||
data = response['data']
|
||||
videos = []
|
||||
for i in data['list']:
|
||||
videos.append({
|
||||
'vod_id': i.get('vod_id'),
|
||||
'vod_name': i.get('vod_name'),
|
||||
'vod_class': i.get('vod_class'),
|
||||
'vod_pic': i.get('vod_pic'),
|
||||
'vod_remarks': i.get('vod_total')+'集',
|
||||
'vod_year': i.get('vod_year'),
|
||||
'vod_score': i.get('vod_score')
|
||||
})
|
||||
return {'list': videos}
|
||||
|
||||
def playerContent(self, flag, id, vipflags):
|
||||
parse = 0
|
||||
header = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36'}
|
||||
try:
|
||||
response = self.fetch(id, headers=self.headers).text
|
||||
match = re.search(r'let\s+data\s*=\s*(\{[^}]*http[^}]*\});', response, re.IGNORECASE)
|
||||
data = match.group(1)
|
||||
data2 = json.loads(data)
|
||||
url = data2['url']
|
||||
except Exception:
|
||||
url, parse, header = id, 1, self.headers
|
||||
return {'parse': parse, 'url': url,'header': header}
|
||||
|
||||
def init(self, extend=''):
|
||||
pass
|
||||
|
||||
def getName(self):
|
||||
pass
|
||||
|
||||
def isVideoFormat(self, url):
|
||||
pass
|
||||
|
||||
def manualVideoCheck(self):
|
||||
pass
|
||||
|
||||
def destroy(self):
|
||||
pass
|
||||
|
||||
def localProxy(self, param):
|
||||
pass
|
||||
BIN
潇洒/spider.jar
BIN
潇洒/spider.jar
Binary file not shown.
Reference in New Issue
Block a user