mirror of
https://github.com/ls125781003/tvboxtg.git
synced 2025-12-14 16:12:25 +00:00
1.25
fix
This commit is contained in:
BIN
潇洒/.版本.png
BIN
潇洒/.版本.png
Binary file not shown.
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 4.0 KiB |
238
潇洒/PY/新视觉.py
238
潇洒/PY/新视觉.py
@@ -1,238 +0,0 @@
|
||||
# coding=utf-8
|
||||
# !/usr/bin/python
|
||||
# by嗷呜
|
||||
import sys
|
||||
sys.path.append("..")
|
||||
import re
|
||||
import os
|
||||
from Crypto.Cipher import AES
|
||||
from Crypto.Util.Padding import pad, unpad
|
||||
from base64 import b64encode, b64decode
|
||||
import json
|
||||
from base.spider import Spider
|
||||
from urllib.parse import quote
|
||||
|
||||
|
||||
class Spider(Spider):
|
||||
|
||||
def getName(self):
|
||||
return "视觉"
|
||||
|
||||
def init(self, extend=""):
|
||||
self.host = self.host()
|
||||
pass
|
||||
|
||||
def isVideoFormat(self, url):
|
||||
pass
|
||||
|
||||
def manualVideoCheck(self):
|
||||
pass
|
||||
|
||||
def action(self, action):
|
||||
pass
|
||||
|
||||
def destroy(self):
|
||||
pass
|
||||
|
||||
def homeContent(self, filter):
|
||||
data = self.fetch(
|
||||
f"{self.host}/api/v3/drama/getCategory?orderBy=type_id",
|
||||
headers=self.headers,
|
||||
).json()
|
||||
dy = {
|
||||
"class": "类型",
|
||||
"area": "地区",
|
||||
"lang": "语言",
|
||||
"year": "年份",
|
||||
"letter": "字母",
|
||||
"by": "排序",
|
||||
"sort": "排序",
|
||||
}
|
||||
filters = {}
|
||||
classes = []
|
||||
for item in data["data"]:
|
||||
has_non_empty_field = False
|
||||
jsontype_extend = json.loads(item["converUrl"])
|
||||
classes.append({"type_name": item["name"], "type_id": str(item["id"])})
|
||||
for key in dy:
|
||||
if key in jsontype_extend and jsontype_extend[key].strip() != "":
|
||||
has_non_empty_field = True
|
||||
break
|
||||
if has_non_empty_field:
|
||||
filters[str(item["id"])] = []
|
||||
for dkey in jsontype_extend:
|
||||
if dkey in dy and jsontype_extend[dkey].strip() != "":
|
||||
values = jsontype_extend[dkey].split(",")
|
||||
value_array = [
|
||||
{"n": value.strip(), "v": value.strip()}
|
||||
for value in values
|
||||
if value.strip() != ""
|
||||
]
|
||||
filters[str(item["id"])].append(
|
||||
{"key": dkey, "name": dy[dkey], "value": value_array}
|
||||
)
|
||||
result = {}
|
||||
result["class"] = classes
|
||||
result["filters"] = filters
|
||||
return result
|
||||
|
||||
def homeVideoContent(self):
|
||||
data = self.fetch(f"{self.host}/api/ex/v3/security/tag/list", headers=self.headers).json()["data"]
|
||||
data1 = self.aes(self.aes(data, self.key[0]), self.key[1], 'decrypt', True)
|
||||
list = []
|
||||
for item in data1[0]['carousels']:
|
||||
id = item['link'].split("id=")[1]
|
||||
list.append({
|
||||
"vod_id": id,
|
||||
'vod_name': item.get("title"),
|
||||
'vod_pic': item.get("cover"),
|
||||
'vod_remarks': item.get("sort"),
|
||||
})
|
||||
result = {"list": list}
|
||||
return result
|
||||
|
||||
def categoryContent(self, tid, pg, filter, extend):
|
||||
params = []
|
||||
if extend.get('area'):
|
||||
params.append(f"vodArea={extend['area']}")
|
||||
if extend.get('classs'):
|
||||
params.append(f"vodClass={extend['class']}")
|
||||
params.append("pagesize=20")
|
||||
params.append(f"typeId1={tid}")
|
||||
params.append(f"page={pg}")
|
||||
if extend.get('year'):
|
||||
params.append(f"vodYear={extend['year']}")
|
||||
body = '&'.join(params)
|
||||
path = self.aes(self.aes(body, self.key[1], 'encrypt'), self.key[0], 'encrypt', True)
|
||||
data = self.fetch(f"{self.host}/api/ex/v3/security/drama/list?query={path}", headers=self.headers).json()[
|
||||
"data"]
|
||||
data = self.aes(self.aes(data, self.key[0]), self.key[1], 'decrypt', True)['list']
|
||||
list = []
|
||||
for item in data:
|
||||
list.append({
|
||||
'vod_id': item.get("id"),
|
||||
'vod_pic': item["coverImage"].get("path"),
|
||||
'vod_name': item.get("name"),
|
||||
'vod_year': item.get("year"),
|
||||
'vod_remarks': item.get("remark")
|
||||
})
|
||||
result = {}
|
||||
result["list"] = list
|
||||
result["page"] = pg
|
||||
result["pagecount"] = 9999
|
||||
result["limit"] = 90
|
||||
result["total"] = 999999
|
||||
return result
|
||||
|
||||
def detailContent(self, ids):
|
||||
url = f"{self.host}/api/v3/drama/getDetail?id={ids[0]}"
|
||||
data = self.fetch(url, headers=self.headers).json()["data"]
|
||||
vod = {
|
||||
'vod_name': data.get("name"),
|
||||
'vod_area': data.get("area"),
|
||||
'type_name': data.get("clazz"),
|
||||
'vod_actor': data.get("actor"),
|
||||
'vod_director': data.get("director"),
|
||||
'vod_content': data.get("brief").strip(),
|
||||
}
|
||||
play = []
|
||||
names = []
|
||||
plays = {}
|
||||
for itt in data["videos"]:
|
||||
if itt["sourceCn"] not in names:
|
||||
plays[itt["source"]] = []
|
||||
names.append(itt["sourceCn"])
|
||||
url = f"vodPlayFrom={itt['source']}&playUrl={itt['path']}"
|
||||
if re.search(r"\.(mp4|m3u8|flv)$", itt["path"]):
|
||||
url = itt["path"]
|
||||
plays[itt["source"]].append(f"{itt['titleOld']}${url}")
|
||||
for it in plays:
|
||||
play.append("#".join(plays[it]))
|
||||
vod["vod_play_from"] = "$$$".join(names)
|
||||
vod["vod_play_url"] = "$$$".join(play)
|
||||
result = {"list": [vod]}
|
||||
return result
|
||||
|
||||
def searchContent(self, key, quick, pg=1):
|
||||
body = f"pagesize=20&page={pg}&searchKeys={key}"
|
||||
path = self.aes(self.aes(body, self.key[1], 'encrypt'), self.key[0], 'encrypt', True)
|
||||
data = self.fetch(f"{self.host}/api/ex/v3/security/drama/list?query={path}", headers=self.headers).json()[
|
||||
"data"]
|
||||
data = self.aes(self.aes(data, self.key[0]), self.key[1], 'decrypt', True)['list']
|
||||
list = []
|
||||
for item in data:
|
||||
list.append({
|
||||
'vod_id': item.get("id"),
|
||||
'vod_pic': item["coverImage"].get("path"),
|
||||
'vod_name': item.get("name"),
|
||||
'vod_year': item.get("year"),
|
||||
'vod_remarks': item.get("remark")
|
||||
})
|
||||
result = {"list": list, "page": pg}
|
||||
return result
|
||||
|
||||
def playerContent(self, flag, id, vipFlags):
|
||||
url = id
|
||||
if "vodPlayFrom" in url:
|
||||
try:
|
||||
path = self.aes(self.aes(id, self.key[1], 'encrypt'), self.key[0], 'encrypt', True)
|
||||
data = self.fetch(f"{self.host}/api/ex/v3/security/videoUsableUrl?query={path}", headers=self.headers).json()[
|
||||
"data"]
|
||||
url = self.aes(self.aes(data, self.key[0]), self.key[1], 'decrypt', True)['playUrl']
|
||||
# try:
|
||||
# url1 = self.fetch(url, headers=self.headers, timeout=5, allow_redirects=False).headers['Location']
|
||||
# if "http" in url1 and url1:
|
||||
# url = url1
|
||||
# except:
|
||||
# pass
|
||||
except Exception as e:
|
||||
pass
|
||||
if '.jpg' in url or '.jpeg' in url or '.png' in url:
|
||||
url = self.getProxyUrl() + "&url=" + b64encode(url.encode('utf-8')).decode('utf-8') + "&type=m3u8"
|
||||
result = {}
|
||||
result["parse"] = 0
|
||||
result["url"] = url
|
||||
result["header"] = {'User-Agent': 'okhttp/3.12.1'}
|
||||
return result
|
||||
|
||||
def localProxy(self, param):
|
||||
url = b64decode(param["url"]).decode('utf-8')
|
||||
durl = url[:url.rfind('/')]
|
||||
data = self.fetch(url, headers=self.headers).content.decode("utf-8")
|
||||
lines = data.strip().split('\n')
|
||||
for index, string in enumerate(lines):
|
||||
if '#EXT' not in string and 'http' not in string:
|
||||
lines[index] = durl + ('' if string.startswith('/') else '/') + string
|
||||
data = '\n'.join(lines)
|
||||
return [200, "application/vnd.apple.mpegur", data]
|
||||
|
||||
def host(self):
|
||||
try:
|
||||
url = self.fetch('https://www.shijue.pro/token.txt', headers=self.headers).json()['domain']
|
||||
return url
|
||||
except:
|
||||
return "http://118.25.18.217:6632"
|
||||
|
||||
headers = {
|
||||
'User-Agent': 'okhttp/3.12.1',
|
||||
'Content-Type': 'application/json;'
|
||||
}
|
||||
key = ['TFLYWVJ5EG5YB1PLZLVVMGVLBGRIDCSW', 'nj6E5K4yYYT5W4ScJ3J3rJ2zrzcJkpTk']
|
||||
|
||||
def aes(self, word, key, mode='decrypt', bool=False):
|
||||
key = key.encode('utf-8')
|
||||
if mode == 'decrypt':
|
||||
word = b64decode(word)
|
||||
cipher = AES.new(key, AES.MODE_ECB)
|
||||
decrypted = cipher.decrypt(word)
|
||||
word = unpad(decrypted, AES.block_size).decode('utf-8')
|
||||
if bool:
|
||||
word = json.loads(word)
|
||||
elif mode == 'encrypt':
|
||||
cipher = AES.new(key, AES.MODE_ECB)
|
||||
padded = pad(word.encode('utf-8'), AES.block_size)
|
||||
encrypted = cipher.encrypt(padded)
|
||||
word = b64encode(encrypted).decode('utf-8')
|
||||
if bool:
|
||||
word = quote(word)
|
||||
return word
|
||||
112
潇洒/api.json
112
潇洒/api.json
@@ -395,22 +395,6 @@
|
||||
"danmu": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "夸克土豆弹幕",
|
||||
"name": "土豆|4K弹幕",
|
||||
"type": 3,
|
||||
"api": "csp_Wobg",
|
||||
"quickSearch": 1,
|
||||
"changeable": 1,
|
||||
"filterable": 1,
|
||||
"ext": {
|
||||
"token": "http://127.0.0.1:9978/file/TVBox/token.txt",
|
||||
"cookie": "http://127.0.0.1:9978/file/TVBox/quark.txt",
|
||||
"uc_cookie": "http://127.0.0.1:9978/file/TVBox/uc.txt",
|
||||
"site": "https://dcyun.cc",
|
||||
"danmu": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "夸克木偶弹幕",
|
||||
"name": "木偶|4K弹幕",
|
||||
@@ -423,7 +407,7 @@
|
||||
"token": "http://127.0.0.1:9978/file/TVBox/token.txt",
|
||||
"cookie": "http://127.0.0.1:9978/file/TVBox/quark.txt",
|
||||
"uc_cookie": "http://127.0.0.1:9978/file/TVBox/uc.txt",
|
||||
"site": "http://www.muoupan.top",
|
||||
"site": "http://www.mogg.top",
|
||||
"danmu": true
|
||||
}
|
||||
},
|
||||
@@ -444,39 +428,6 @@
|
||||
"danmu": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "夸克奥秘弹幕",
|
||||
"name": "奥秘|4K弹幕",
|
||||
"type": 3,
|
||||
"api": "csp_Wobg",
|
||||
"searchable": 1,
|
||||
"quickSearch": 1,
|
||||
"filterable": 1,
|
||||
"changeable": 1,
|
||||
"ext": {
|
||||
"token": "http://127.0.0.1:9978/file/TVBox/token.txt",
|
||||
"cookie": "http://127.0.0.1:9978/file/TVBox/quark.txt",
|
||||
"uc_cookie": "http://127.0.0.1:9978/file/TVBox/uc.txt",
|
||||
"site": "https://vip.omii.top",
|
||||
"danmu": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "夸克白嫖弹幕",
|
||||
"name": "白嫖|4K弹幕",
|
||||
"type": 3,
|
||||
"api": "csp_Wobg",
|
||||
"quickSearch": 1,
|
||||
"changeable": 1,
|
||||
"filterable": 1,
|
||||
"ext": {
|
||||
"token": "http://127.0.0.1:9978/file/TVBox/token.txt",
|
||||
"cookie": "http://127.0.0.1:9978/file/TVBox/quark.txt",
|
||||
"uc_cookie": "http://127.0.0.1:9978/file/TVBox/uc.txt",
|
||||
"site": "http://失眠的夜.top",
|
||||
"danmu": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "夸克虎斑弹幕",
|
||||
"name": "虎斑|4K弹幕",
|
||||
@@ -607,17 +558,6 @@
|
||||
"quickSearch": 1,
|
||||
"filterable": 1
|
||||
},
|
||||
{
|
||||
"key": "新视觉影视",
|
||||
"name": "新视觉|APP",
|
||||
"type": 3,
|
||||
"api": "./PY/新视觉.py",
|
||||
"searchable": 1,
|
||||
"changeable": 1,
|
||||
"quickSearch": 1,
|
||||
"filterable": 1,
|
||||
"playerType": 2
|
||||
},
|
||||
{
|
||||
"key": "酷影视",
|
||||
"name": "酷影视|APP",
|
||||
@@ -628,16 +568,6 @@
|
||||
"filterable": 1,
|
||||
"ext": "https://www.tvkuys.xyz/api.php/app/"
|
||||
},
|
||||
{
|
||||
"key": "皮皮虾",
|
||||
"name": "皮皮虾|APP",
|
||||
"type": 3,
|
||||
"api": "csp_AppYsV2",
|
||||
"searchable": 1,
|
||||
"quickSearch": 1,
|
||||
"filterable": 1,
|
||||
"ext": "http://www.ppxys.vip/api.php/app/"
|
||||
},
|
||||
{
|
||||
"key": "HG影视",
|
||||
"name": "HG影视|APP",
|
||||
@@ -670,14 +600,6 @@
|
||||
"filterable": 1,
|
||||
"playerType": 2
|
||||
},
|
||||
{
|
||||
"key": "世纪",
|
||||
"name": "世纪|APP",
|
||||
"type": 3,
|
||||
"api": "csp_Drama",
|
||||
"playerType": 2,
|
||||
"ext": "saHR0cDovLzExOC4yNS4xOC4yMTc6NjYzMnxURkxZV1ZKNUVHNVlCMVBMWkxWVk1HVkxCR1JJRENTV3xuajZFNUs0eVlZVDVXNFNjSjNKM3JKMnpyemNKa3BUa3wyMQ=="
|
||||
},
|
||||
{
|
||||
"key": "图图",
|
||||
"name": "图图|App",
|
||||
@@ -785,16 +707,6 @@
|
||||
"changeable": 1,
|
||||
"ext": "http://kkwk123.top/api.php/app/"
|
||||
},
|
||||
{
|
||||
"key": "龙虾影视",
|
||||
"name": "龙虾|APP",
|
||||
"type": 3,
|
||||
"api": "csp_AppV2",
|
||||
"searchable": 1,
|
||||
"filterable": 1,
|
||||
"changeable": 1,
|
||||
"ext": "KhY021WelCEl+6MsvwnzaLK5slDjS15Hs3mDpkf3X7oG6YXDGh5RJf8ee99iggcoZT8EgkDlQtY/4GAxy/FKk03zbyRkBDJVQdkW8AZmnuRp3c17mwodqO2RRfNO76QzqUJwB1V3fEAcW5k0RnHmKVRQg3mDu3/M"
|
||||
},
|
||||
{
|
||||
"key": "人人影视",
|
||||
"name": "人人|APP",
|
||||
@@ -823,7 +735,7 @@
|
||||
"searchable": 1,
|
||||
"quickSearch": 0,
|
||||
"filterable": 0,
|
||||
"ext": "w7TClcK8w5rDrcKYwoPCmcKkw57ClcK0wpvCnF9SwoPCmcOtw5jDj8Orw6ZValLCmMOtw6fDqsKzwqliwqfCp8KnwqfDl8Ovw6jDnsKowp/CpMKmwqfDlsOdwqjDm8KjwplewqDDocOjwpzCpcKcfMKewpnCpMOQw6LDrMOdwpxtUlJcwpvDp8Ojw6nCnG1SwovlhrXphaHmkJjlkZ3CpeWHpuS9iuWQp2rlvqHoqL/otrfmvIrnrZLDl1VcUnHDnsOmw4XDnsOzVWpSwpXCrcKpwqvDnMKxwpZgwpXClsKpw5XCsMOcw55kUlxSwrrDmMOtw4LDsFVqUsKVwq3CqcKrw5zCscKWYMKVwpbCqcOVwrDDnMOeZFLCrQ=="
|
||||
"ext": "w7TCmsK8w5rDrcKYwoPCmcKkw57CmsK0wpnCocKbwqTCpMKgwrPCosKpwqvCq2ReaWnCp8KswrLCp8KuamppacKywqzCqcOaw6rCnF7CpMKow63CmsKmwpnCocKGwpnCpMKVw47DpcOmwqDCtFNXV1zCmcKaw4PDp8OjwqfCh8KfwqLDncKawrTCmcKhwpzCnsKZwqTDj8KkwqvCssKhX1BXwqTDosOjwqHCs8KaWsKL5Ya16YSY5pCe5ZGWwqblh6XkvpHlkKpq5b6h6Ke26La95ryD562Tw5bCoV9QV3HDnsOmw4XDnsOzWmpQV8OewqfCsMKqw51qwpNgwpXDn8Kjw5zCr8OdwpdhV1zCmcKawrvDnsOtfMKmV2rCmcKaw5/CrcKwZMKTZ8KTwqnDmMOgwqnDnGnCk8KUYcKgwp/CmsKgw57CmMKTwqLCqcOpw6fDhcOew7NaalBXw7LDlMOpw7DDm8KhwpdgYcKrwqnCocO2"
|
||||
},
|
||||
{
|
||||
"key": "猫猫影视",
|
||||
@@ -886,15 +798,6 @@
|
||||
"api": "./JS/drpy2.min.js",
|
||||
"ext": "./JS/采集之王.js?type=url¶ms=../JSON/采集静态.json$1$1"
|
||||
},
|
||||
{
|
||||
"key": "厂长资源",
|
||||
"name": "厂长|资源",
|
||||
"type": 3,
|
||||
"api": "csp_Czzy",
|
||||
"searchable": 1,
|
||||
"quickSearch": 1,
|
||||
"filterable": 1
|
||||
},
|
||||
{
|
||||
"key": "低端影视",
|
||||
"name": "低端|影视",
|
||||
@@ -1922,17 +1825,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "皮皮虾",
|
||||
"type": "1",
|
||||
"url": "http://jiexi.52ppx.top/lxjson.php?url=",
|
||||
"ext": {
|
||||
"flag": [
|
||||
"PPXLG",
|
||||
"皮皮虾4K"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "线路1",
|
||||
"type": 0,
|
||||
|
||||
BIN
潇洒/spider.jar
BIN
潇洒/spider.jar
Binary file not shown.
Reference in New Issue
Block a user