mirror of
https://github.com/qist/tvbox.git
synced 2026-11-01 09:15:42 +00:00
更新源 202610300526
This commit is contained in:
1 parent
d977e212b6
commit
e030ea1443
9 files changed
+142
-17
No files matched your search
+4
-2
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"spider": "./jar/spider.jar;md5;c1978e5cec469f66f07efd37d39ec26a",
|
||||
"spider": "./jar/spider.jar;md5;a4638e7ba814dd552472501335ecdc47",
|
||||
"lives": [
|
||||
{"name": "live","boot": false,"type": 0,"url": "./tv.txt","playerType": 2,"ua": "okhttp/3.8.1","timeout": 20,"epg": "https://epg.cdn.loc.cc/?ch={name}&date={date}","logo": "https://logo.wyfc.qzz.io/{name}.png"}
|
||||
],
|
||||
@@ -76,7 +76,9 @@
|
||||
{"key": "面包影视","name": "面包 • 影视","type": 3,"api": "csp_XBPQ","ext": {"请求头": "User-Agent$MOBILE_UA","编码": "UTF-8","分类url": "https://v.aiwule.com/vodshow/{cateId}-{area}-{by}-{class}-{lang}-{letter}---{catePg}---{year}.html","分类": "电影$20#电视剧$21#动漫$23#综艺$22#短剧$47","简介": "简介:&&"}},
|
||||
{"key": "1905","name": "1905 • 影视","type": 3,"api": "csp_Web1905","searchable": 1,"quickSearch": 0,"filterable": 0},
|
||||
{"key": "番社动漫","name": "番社 • 动漫","type": 3,"api": "csp_XBPQ","ext": {"请求头": "User-Agent$MOBILE_UA","编码": "UTF-8","主页url": "https://dora.xiaoxinbk.com/","数组": "class=\"card-img-bili\"&&</a>","标题": "alt=\"&&\"","图片": "data-url=\"&&\"","链接": "href=\"&&\"","线路标题": "mt-0\">&&</h3>","播放数组": "class=\"card-body button-list\"&&</div>","播放列表": "<a&&a>","播放链接": "href=\"&&\"","播放标题": ">&&</","分类url": "https://www.dora-video.cn/search/sy/?niandai={year}&cat={class}&tag={cateId}&gaojijiansuo=1&zhuangtai={by}","分类": "全部$0#动画$20#剧场版$21#MV$22#预告片$23#直播$27#同人$25#民间$26#目录$28#中篇$30","剧情": "哆啦A梦新番$1#新哆啦A梦 台湾配音$2#哆啦A梦剧场版$3#最新预告片$6#剧场版集合$7#哆啦A梦MV$4#哆啦A梦七小子集合$11#生日特别篇$19#哆啦A梦生日特别篇$12#哆啦美生日特别篇$14#大雄生日特别篇$13#静香生日特别篇$15#胖虎生日特别篇$16#小夫生日特别篇$17#24小时直播$24#哆啦A梦中篇附映$29#哆啦A梦大山版 - 哆啦a梦1979版国语旧版 - 旧版$31#哆啦A梦大山修复&补档区$32#藤子·F·不二雄【其它动画】$33","排序": "全部$0#完结$2#连载$1#待定$-1"},"style": {"type": "list"}},
|
||||
{"key": "巴士动漫","name": "巴士 • 动漫","type": 3,"api": "csp_XBPQ","ext": {"请求头": "User-Agent$MOBILE_UA#Accept$text/html#accept-language$zh-CN,zh;q=0.8","分类url": "https://dmbus.cc/show-{cateId}--{by}-{class}--{year}-{catePg}.html","分类": "国漫$1#日漫$2#欧美动漫$3#电影$4","数组": "class=\"item\">&&</li>","简介": "剧情:&&</p>","标题": "title=\"&&在线观看\"","副标题": "desc\">&&</span>","图片": "data-bg=\"&&\"","搜索url": "https://dmbus.cc/s----------.html?wd={wd}","倒序": "1"}},
|
||||
{"key": "巴士动漫","name": "巴士 • 动漫","type": 3,"api": "csp_AnimeBashi"},
|
||||
{"key": "吉里动漫","name": "吉里 • 动漫","type": 3,"api": "csp_AnimeGiri"},
|
||||
{"key": "花子动漫","name": "花子 • 动漫","type": 3,"api": "csp_AnimeHuazi"},
|
||||
{"key": "荐片","name": "荐片 • 磁力","api": "csp_JianPian","type": 3},
|
||||
{"key": "New6v","name": "New6V • 磁力","type": 3,"api": "csp_New6v","searchable": 1,"quickSearch": 1,"filterable": 1,"ext": "https://www.xb6v.com"},
|
||||
{"key": "美剧迷","name": "美剧迷 • 磁力","type": 3,"api": "csp_MeijuMi","searchable": 1,"quickSearch": 1,"filterable": 1},
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"spider": "./jar/fan.txt;md5;b55978c4fe6d12e2fea9075f17c8a67a",
|
||||
"spider": "./jar/fan.txt;md5;d2a33b53d09ec59c4cb7e3f482ef3907",
|
||||
"wallpaper": "https://动态壁纸.饭.eu.org/",
|
||||
"sites": [
|
||||
{"key": "点我切源","name": "豆豆┃片单","type": 3,"api": "csp_DouDouGuard","indexs": 1,"searchable": 0,"quickSearch": 0,"changeable": 0},
|
||||
{"key": "点我切源","name": "豆豆┃片单<修复所有>","type": 3,"api": "csp_DouDouGuard","indexs": 1,"searchable": 0,"quickSearch": 0,"changeable": 0},
|
||||
{"key": "MDrive","name": "🗂我的云盘┃配置","type": 3,"api": "csp_MyDriveGuard","changeable": 0,"indexs": 0,"searchable": 1,"style": {"type": "oval"},"ext": {"Cloud-drive": "tvfan/Cloud-drive.txt"}},
|
||||
{"key": "玩偶","name": "👽玩偶哥哥┃4K弹幕","type": 3,"api": "csp_WoGGGuard","timeout": 30,"searchable": 1,"quickSearch": 1,"changeable": 1,"ext": {"Cloud-drive": "tvfan/Cloud-drive.txt"}},
|
||||
{"key": "YGP","name": "🚀荐影┃预告片","type": 3,"api": "csp_YGPGuard","searchable": 0,"quickSearch": 0,"changeable": 0},
|
||||
@@ -25,14 +25,13 @@
|
||||
{"key": "奥特","name": "🏝奥特┃多线","type": 3,"api": "csp_AueteGuard","timeout": 10,"searchable": 1,"quickSearch": 1,"changeable": 1},
|
||||
{"key": "新6V","name": "🧲新6V┃磁力","type": 3,"api": "csp_SixVGuard","timeout": 10,"searchable": 1,"quickSearch": 1,"changeable": 0,"ext": "https://www.xb6v.com/"},
|
||||
{"key": "AiDj","name": "❤️AI┃短漫剧","type": 3,"api": "csp_AiDjGuard","ext": {"type": "video","name": "短剧","danMu": false},"indexs": 0,"quickSearch": 1,"searchable": 1,"changeable": 0},
|
||||
{"key": "咕咕","name": "🦉咕咕┃动漫","type": 3,"api": "csp_AppSxGuard","timeout": 10,"searchable": 1,"quickSearch": 1,"changeable": 1,"ext": "rfOX1voDIQhH8epBwpmIsuS/sSCZxc/l0mxkeoroQVYOelMAvX1kuYptSLB36YxEjVawS9p37Cgo"},
|
||||
{"key": "Dm84","name": "🚌巴士┃动漫","type": 3,"api": "csp_Dm84Guard","timeout": 10,"searchable": 1,"quickSearch": 1,"changeable": 1},
|
||||
{"key": "看球","name": "⚽八八┃看球","type": 3,"api": "csp_KanqiuGuard","timeout": 10,"searchable": 0,"changeable": 0,"style": {"type": "list"}},
|
||||
{"key": "多多","name": "🏀多多┃回放","type": 3,"api": "csp_DoubaoGuard","searchable": 0,"quickSearch": 0,"changeable": 0,"style": {"type": "list"}},
|
||||
{"key": "吃瓜","name": "🏐吃瓜┃看球","type": 3,"api": "csp_LiveGzGuard","searchable": 0,"quickSearch": 0,"changeable": 0,"style": {"type": "list"}},
|
||||
{"key": "alllive","name": "🎮一直播┃直播","type": 3,"api": "csp_AllliveGuard","style": {"type": "rect","ratio": 1.597},"timeout": 15,"playerType": "2","searchable": 0,"quickSearch": 0,"changeable": 0,"ext": "uqGL1fpJNAUN8ORQgIPD+b6l+CzC2t8="},
|
||||
{"key": "MTV","name": "🎶明星┃MV","type": 3,"api": "csp_BiliGuard","style": {"type": "rect","ratio": 1.597},"searchable": 0,"quickSearch": 0,"changeable": 0,"ext": {"json": "https://nos.netease.com/ysf/5af5fbe12a88b7c45aa1c21e6551826c.txt"}},
|
||||
{"key": "有声小说","name": "🎧有声┃小说","type": 3,"api": "csp_Tingshu275Guard","style": {"type": "rect","ratio": 1},"searchable": 0,"quickSearch": 0,"changeable": 0},
|
||||
{"key": "有声小说","name": "🎧有声┃小说","type": 3,"api": "csp_Tingshu275Guard","style": {"type": "rect","ratio": 1},"searchable": 1,"quickSearch": 0,"changeable": 0},
|
||||
{"key": "Aid","name": "🚑急救┃教学","type": 3,"api": "csp_FirstAidGuard","searchable": 0,"quickSearch": 0,"changeable": 0,"style": {"type": "rect","ratio": 3.8}},
|
||||
{"key": "虎牙js","name": "🐯虎牙┃直播","type": 3,"api": "./FTY/drpy2.min.js","ext": "./FTY/虎牙.js","style": {"type": "rect","ratio": 1.755},"timeout": 10,"playerType": "2","searchable": 1,"quickSearch": 0,"changeable": 0},
|
||||
{"key": "斗鱼js","name": "🐟斗鱼┃直播","type": 3,"api": "./FTY/drpy2.min.js","ext": "./FTY/斗鱼直播.js","style": {"type": "rect","ratio": 1.755},"timeout": 10,"playerType": "2","searchable": 1,"quickSearch": 0,"changeable": 0},
|
||||
@@ -57,9 +56,9 @@
|
||||
],
|
||||
"logo": "https://bdcache1-f1.v3mh.com/image/25-12-16/6941612717007.gif",
|
||||
"hosts": [
|
||||
"img1.wsyzy.org=fan.cloudflare.182682.xyz",
|
||||
"fiizvfck.top=fan.cloudflare.182682.xyz",
|
||||
"images.67c6c7a.com=fan.cloudflare.182682.xyz"
|
||||
"img1.wsyzy.org=cmcc.vvvv.ee",
|
||||
"fiizvfck.top=cmcc.vvvv.ee",
|
||||
"images.67c6c7a.com=cmcc.vvvv.ee"
|
||||
],
|
||||
"lives": [
|
||||
{"name": "综合直播","type": 0,"url": "http://193.123.86.190:14888/TV/iptv.php","ua": "bingcha/1.1 (mianfeifenxiang)","playerType": 2},
|
||||
|
||||
BIN
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"spider": "./jar/spider.jar;md5;c1978e5cec469f66f07efd37d39ec26a",
|
||||
"spider": "./jar/spider.jar;md5;a4638e7ba814dd552472501335ecdc47",
|
||||
"lives": [
|
||||
{"name": "migu","type": 0,"url": "https://develop202.github.io/migu_video/interface.txt","playerType": 1,"ua": "okhttp/3.8.1","timeout": 20,"epg": "https://epg.cdn.loc.cc/?ch={name}&date={date}","logo": "https://logo.wyfc.qzz.io/{name}.png"},
|
||||
{"name": "live","type": 0,"url": "https://epg.pw/test_channels.m3u","playerType": 1,"ua": "okhttp/3.8.1","timeout": 20,"epg": "https://epg.cdn.loc.cc/?ch={name}&date={date}","logo": "https://logo.wyfc.qzz.io/{name}.png"},
|
||||
@@ -77,7 +77,9 @@
|
||||
{"key": "面包影视","name": "面包 • 影视","type": 3,"api": "csp_XBPQ","ext": {"请求头": "User-Agent$MOBILE_UA","编码": "UTF-8","分类url": "https://v.aiwule.com/vodshow/{cateId}-{area}-{by}-{class}-{lang}-{letter}---{catePg}---{year}.html","分类": "电影$20#电视剧$21#动漫$23#综艺$22#短剧$47","简介": "简介:&&"}},
|
||||
{"key": "1905","name": "1905 • 影视","type": 3,"api": "csp_Web1905","searchable": 1,"quickSearch": 0,"filterable": 0},
|
||||
{"key": "番社动漫","name": "番社 • 动漫","type": 3,"api": "csp_XBPQ","ext": {"请求头": "User-Agent$MOBILE_UA","编码": "UTF-8","主页url": "https://dora.xiaoxinbk.com/","数组": "class=\"card-img-bili\"&&</a>","标题": "alt=\"&&\"","图片": "data-url=\"&&\"","链接": "href=\"&&\"","线路标题": "mt-0\">&&</h3>","播放数组": "class=\"card-body button-list\"&&</div>","播放列表": "<a&&a>","播放链接": "href=\"&&\"","播放标题": ">&&</","分类url": "https://www.dora-video.cn/search/sy/?niandai={year}&cat={class}&tag={cateId}&gaojijiansuo=1&zhuangtai={by}","分类": "全部$0#动画$20#剧场版$21#MV$22#预告片$23#直播$27#同人$25#民间$26#目录$28#中篇$30","剧情": "哆啦A梦新番$1#新哆啦A梦 台湾配音$2#哆啦A梦剧场版$3#最新预告片$6#剧场版集合$7#哆啦A梦MV$4#哆啦A梦七小子集合$11#生日特别篇$19#哆啦A梦生日特别篇$12#哆啦美生日特别篇$14#大雄生日特别篇$13#静香生日特别篇$15#胖虎生日特别篇$16#小夫生日特别篇$17#24小时直播$24#哆啦A梦中篇附映$29#哆啦A梦大山版 - 哆啦a梦1979版国语旧版 - 旧版$31#哆啦A梦大山修复&补档区$32#藤子·F·不二雄【其它动画】$33","排序": "全部$0#完结$2#连载$1#待定$-1"},"style": {"type": "list"}},
|
||||
{"key": "巴士动漫","name": "巴士 • 动漫","type": 3,"api": "csp_XBPQ","ext": {"请求头": "User-Agent$MOBILE_UA#Accept$text/html#accept-language$zh-CN,zh;q=0.8","分类url": "https://dmbus.cc/show-{cateId}--{by}-{class}--{year}-{catePg}.html","分类": "国漫$1#日漫$2#欧美动漫$3#电影$4","数组": "class=\"item\">&&</li>","简介": "剧情:&&</p>","标题": "title=\"&&在线观看\"","副标题": "desc\">&&</span>","图片": "data-bg=\"&&\"","搜索url": "https://dmbus.cc/s----------.html?wd={wd}","倒序": "1"}},
|
||||
{"key": "巴士动漫","name": "巴士 • 动漫","type": 3,"api": "csp_AnimeBashi"},
|
||||
{"key": "吉里动漫","name": "吉里 • 动漫","type": 3,"api": "csp_AnimeGiri"},
|
||||
{"key": "花子动漫","name": "花子 • 动漫","type": 3,"api": "csp_AnimeHuazi"},
|
||||
{"key": "荐片","name": "荐片 • 磁力","api": "csp_JianPian","type": 3},
|
||||
{"key": "New6v","name": "New6V • 磁力","type": 3,"api": "csp_New6v","searchable": 1,"quickSearch": 1,"filterable": 1,"ext": "https://www.xb6v.com"},
|
||||
{"key": "美剧迷","name": "美剧迷 • 磁力","type": 3,"api": "csp_MeijuMi","searchable": 1,"quickSearch": 1,"filterable": 1},
|
||||
|
||||
+62
-2
@@ -1,3 +1,59 @@
|
||||
#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# @file : 听书世界.py (hipy-server T4 版; 与 听书世界_T3.py 同源)
|
||||
"""
|
||||
听书世界 (275听书 + 拾音盘) TVBox py 爬虫 —— T4 hipy-server 运行时
|
||||
|
||||
原理 (逆向自 拾音盘APP com.shiyinpan.app 与 TingShijie java 爬虫):
|
||||
1. 275听书官方接口 (app.365ting.com/listen/Apitzg2025/) 书单/搜索/详情正常,
|
||||
但其播放地址接口 AppGetChapterUrl2023 已损坏 (所有章节返回同一占位音频,
|
||||
网页版 api_chapter.php 同样返回 url:null) —— 原 java 版
|
||||
"获取不到播放地址/起播不成功" 的根因。
|
||||
2. 拾音盘APP (275官方配套播放器) 使用另一套接口:
|
||||
- 搜索: GET https://api.365ting.com/tingyou-app/search?keyword=xx
|
||||
- 提取: POST https://api.365ting.com/tingyou-app/import {user_id, album_id}
|
||||
-> task_id -> GET import/status?task_id= 轮询 (热门书有克隆缓存秒回)
|
||||
- 曲目: GET https://api.365ting.com/api/albums/{platform_album_id}/tracks?user_id=
|
||||
- 播放: GET https://api.365ting.com/tingyou/stream?album={tingyou_id}&idx={序号}
|
||||
匿名直连, 支持 Range 拖动
|
||||
3. 设备登录: POST /api/auth/device-login {device_id} 免注册, 同 device_id 恒定同 user_id。
|
||||
|
||||
分类/首页/详情元数据走 275 官方接口, 播放走拾音盘 stream 直链;
|
||||
275 bookId 与拾音盘专辑 id 体系不同, 详情时按"书名+演播"自动匹配拾音盘专辑。
|
||||
|
||||
详情提速 (对比上一版):
|
||||
- device_id 固定落盘 -> 跨启动同一 user_id, 已提取专辑直接命中歌单, 跳过 import 轮询;
|
||||
- 275->拾音盘 映射与专辑 platform_id 落盘 -> 重复打开直接拿曲目列表;
|
||||
- 轮询"先查后睡"(0.4s) 替代固定 sleep(1) x2, 去掉提取完成后的多余歌单回查;
|
||||
- 启动探活默认地址优先 (原分发地址已失效, 每次白等 3s 超时)。
|
||||
|
||||
稳健性 (修"偶发选集/暂无播放数据"):
|
||||
- 所有请求走 _req: 网络抖动/超时/429/5xx 退避重试 3 次;
|
||||
- 提取轮询单次异常只记日志不中断, 整个提取失败再提交一轮;
|
||||
- 曲目列表瞬时异常/空列表重试 3 次, 仍空则重置 plat 重新提取 1 次;
|
||||
- 曲目彻底拿不到时按元数据集数合成选集 (第N集), 详情页永不出空;
|
||||
- detailContent 整体重试 2 轮;
|
||||
- playerContent 不再探活 (探活抖动=空url="暂无播放数据"), 直接给拼好的直链。
|
||||
|
||||
- 拾音盘搜索没有 TME 独家书 (我弟是神棍/盗墓笔记/雨村笔记/祖祀/重启之极海听雷等
|
||||
演播方为 TME有声剧场 的书全部 0 结果), 原逻辑匹配失败 -> 详情页空;
|
||||
- 现在匹配不到/提取失败/曲目为空时, 自动改走 275 官方章节接口
|
||||
chapter?size=1000&page=&sort=asc&bookId= 拉真实选集;
|
||||
- 播放走 AppGetChapterUrl (老接口, xmcdn 源, 实测 12/12 全成功), 需 timeStamp+盐
|
||||
双重 md5 签名 addItParapet (签名缺失服务端回 data:null); AppGetChapterUrl2023
|
||||
(自家 audio.tingshijie.com 源) 常年 status:1 只当备用;
|
||||
音频 CDN 拦截官方 UA (Access Denied: Please use the official App),
|
||||
播放 header 用 okhttp UA 即可, 支持 Range 拖动;
|
||||
- 搜索同步合并 275 appSearch (需 app_token=abcSEARCH-2025), 拾音盘搜不到的书也能搜。
|
||||
|
||||
配置示例 (hipy-server T4):
|
||||
{
|
||||
"key": "hipy_tingshijie", "name": "听书世界", "type": 4,
|
||||
"api": "http://127.0.0.1:5707/api/v1/vod/听书世界",
|
||||
"searchable": 1, "quickSearch": 1, "filterable": 0
|
||||
}
|
||||
可选 ext: {"name":"自定义源名"} —— 不传则用默认名。
|
||||
"""
|
||||
|
||||
import hashlib
|
||||
import json
|
||||
@@ -26,6 +82,8 @@ except Exception:
|
||||
|
||||
UA = 'TingShiJie/1.8.8 (m.i275.com)'
|
||||
APP_UA = 'okhttp/4.9.3'
|
||||
BROWSER_UA = ('Mozilla/5.0 (Linux; Android 13; M2102K1C) AppleWebKit/537.36 '
|
||||
'(KHTML, like Gecko) Chrome/124.0.0.0 Mobile Safari/537.36')
|
||||
DEFAULT_BASE = 'https://app.365ting.com/listen/Apitzg2025/'
|
||||
CONFIG_URLS = ['http://101.43.48.231:8090/config/tingchina2025.txt']
|
||||
API = 'https://api.365ting.com'
|
||||
@@ -627,8 +685,9 @@ class Spider(A):
|
||||
def playerContent(self, flag, pid, vipFlags):
|
||||
# 直链由 album+idx 规则拼出, 不做探活: 探活请求一旦抖动就返回空 url,
|
||||
# 播放器必然报"暂无播放数据" —— 交给播放器自己拉流即可。
|
||||
# header 用 okhttp UA: audio.tingshijie.com 会拦截官方 UA
|
||||
# (Access Denied: Please use the official App), okhttp/浏览器 UA 放行
|
||||
# 275 原生源: okhttp UA (audio.tingshijie.com 拦官方 UA, okhttp 放行)
|
||||
# 拾音盘直链: 浏览器 UA —— api.365ting.com/tingyou/stream 对 okhttp UA
|
||||
# 会卡死 (0 KB/s), 浏览器 UA 可正常播放; xmcdn 源不受影响
|
||||
S = {'parse': 0, 'jx': 0, 'playUrl': '', 'url': '', 'header': {'User-Agent': APP_UA}}
|
||||
try:
|
||||
parts = str(pid).split('|')
|
||||
@@ -637,6 +696,7 @@ class Spider(A):
|
||||
if not S['url']:
|
||||
LOG('playerContent 275 播放地址获取失败: %s' % pid)
|
||||
elif len(parts) == 2 and parts[1].isdigit(): # 拾音盘直链
|
||||
S['header']['User-Agent'] = BROWSER_UA
|
||||
S['url'] = '%s/tingyou/stream?album=%s&idx=%s' % (API, parts[0], parts[1])
|
||||
else:
|
||||
LOG('playerContent 参数异常: %s' % pid)
|
||||
|
||||
+4
-2
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"spider": "./spider.jar;md5;c1978e5cec469f66f07efd37d39ec26a",
|
||||
"spider": "./spider.jar;md5;a4638e7ba814dd552472501335ecdc47",
|
||||
"wallpaper": "http://127.0.0.1:9978/proxy?do=wallpaper",
|
||||
"logo": "https://pic7.fukit.cn/autoupload/gE6Y0Af2tjXBCNig6CtNDI12_FRYNb81z6UPhMWD8iI/20251224/dJkT/1080X1080/logo.jpg/webp",
|
||||
"danmaku": "http://127.0.0.1:9978/proxy?do=danmaku&name={name}&episode={episode}",
|
||||
@@ -65,7 +65,9 @@
|
||||
{"key": "面包影视","name": "面包 • 影视","type": 3,"api": "csp_XBPQ","ext": {"请求头": "User-Agent$MOBILE_UA","编码": "UTF-8","分类url": "https://v.aiwule.com/vodshow/{cateId}-{area}-{by}-{class}-{lang}-{letter}---{catePg}---{year}.html","分类": "电影$20#电视剧$21#动漫$23#综艺$22#短剧$47","简介": "简介:&&"}},
|
||||
{"key": "1905","name": "1905 • 影视","type": 3,"api": "csp_Web1905","searchable": 1,"quickSearch": 0,"filterable": 0},
|
||||
{"key": "番社动漫","name": "番社 • 动漫","type": 3,"api": "csp_XBPQ","ext": {"请求头": "User-Agent$MOBILE_UA","编码": "UTF-8","主页url": "https://dora.xiaoxinbk.com/","数组": "class=\"card-img-bili\"&&</a>","标题": "alt=\"&&\"","图片": "data-url=\"&&\"","链接": "href=\"&&\"","线路标题": "mt-0\">&&</h3>","播放数组": "class=\"card-body button-list\"&&</div>","播放列表": "<a&&a>","播放链接": "href=\"&&\"","播放标题": ">&&</","分类url": "https://www.dora-video.cn/search/sy/?niandai={year}&cat={class}&tag={cateId}&gaojijiansuo=1&zhuangtai={by}","分类": "全部$0#动画$20#剧场版$21#MV$22#预告片$23#直播$27#同人$25#民间$26#目录$28#中篇$30","剧情": "哆啦A梦新番$1#新哆啦A梦 台湾配音$2#哆啦A梦剧场版$3#最新预告片$6#剧场版集合$7#哆啦A梦MV$4#哆啦A梦七小子集合$11#生日特别篇$19#哆啦A梦生日特别篇$12#哆啦美生日特别篇$14#大雄生日特别篇$13#静香生日特别篇$15#胖虎生日特别篇$16#小夫生日特别篇$17#24小时直播$24#哆啦A梦中篇附映$29#哆啦A梦大山版 - 哆啦a梦1979版国语旧版 - 旧版$31#哆啦A梦大山修复&补档区$32#藤子·F·不二雄【其它动画】$33","排序": "全部$0#完结$2#连载$1#待定$-1"},"style": {"type": "list"}},
|
||||
{"key": "巴士动漫","name": "巴士 • 动漫","type": 3,"api": "csp_XBPQ","ext": {"请求头": "User-Agent$MOBILE_UA#Accept$text/html#accept-language$zh-CN,zh;q=0.8","分类url": "https://dmbus.cc/show-{cateId}--{by}-{class}--{year}-{catePg}.html","分类": "国漫$1#日漫$2#欧美动漫$3#电影$4","数组": "class=\"item\">&&</li>","简介": "剧情:&&</p>","标题": "title=\"&&在线观看\"","副标题": "desc\">&&</span>","图片": "data-bg=\"&&\"","搜索url": "https://dmbus.cc/s----------.html?wd={wd}","倒序": "1"}},
|
||||
{"key": "巴士动漫","name": "巴士 • 动漫","type": 3,"api": "csp_AnimeBashi"},
|
||||
{"key": "吉里动漫","name": "吉里 • 动漫","type": 3,"api": "csp_AnimeGiri"},
|
||||
{"key": "花子动漫","name": "花子 • 动漫","type": 3,"api": "csp_AnimeHuazi"},
|
||||
{"key": "荐片","name": "荐片 • 磁力","api": "csp_JianPian","type": 3},
|
||||
{"key": "New6v","name": "New6V • 磁力","type": 3,"api": "csp_New6v","searchable": 1,"quickSearch": 1,"filterable": 1,"ext": "https://www.xb6v.com"},
|
||||
{"key": "美剧迷","name": "美剧迷 • 磁力","type": 3,"api": "csp_MeijuMi","searchable": 1,"quickSearch": 1,"filterable": 1},
|
||||
|
||||
+62
-2
@@ -1,3 +1,59 @@
|
||||
#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# @file : 听书世界.py (hipy-server T4 版; 与 听书世界_T3.py 同源)
|
||||
"""
|
||||
听书世界 (275听书 + 拾音盘) TVBox py 爬虫 —— T4 hipy-server 运行时
|
||||
|
||||
原理 (逆向自 拾音盘APP com.shiyinpan.app 与 TingShijie java 爬虫):
|
||||
1. 275听书官方接口 (app.365ting.com/listen/Apitzg2025/) 书单/搜索/详情正常,
|
||||
但其播放地址接口 AppGetChapterUrl2023 已损坏 (所有章节返回同一占位音频,
|
||||
网页版 api_chapter.php 同样返回 url:null) —— 原 java 版
|
||||
"获取不到播放地址/起播不成功" 的根因。
|
||||
2. 拾音盘APP (275官方配套播放器) 使用另一套接口:
|
||||
- 搜索: GET https://api.365ting.com/tingyou-app/search?keyword=xx
|
||||
- 提取: POST https://api.365ting.com/tingyou-app/import {user_id, album_id}
|
||||
-> task_id -> GET import/status?task_id= 轮询 (热门书有克隆缓存秒回)
|
||||
- 曲目: GET https://api.365ting.com/api/albums/{platform_album_id}/tracks?user_id=
|
||||
- 播放: GET https://api.365ting.com/tingyou/stream?album={tingyou_id}&idx={序号}
|
||||
匿名直连, 支持 Range 拖动
|
||||
3. 设备登录: POST /api/auth/device-login {device_id} 免注册, 同 device_id 恒定同 user_id。
|
||||
|
||||
分类/首页/详情元数据走 275 官方接口, 播放走拾音盘 stream 直链;
|
||||
275 bookId 与拾音盘专辑 id 体系不同, 详情时按"书名+演播"自动匹配拾音盘专辑。
|
||||
|
||||
详情提速 (对比上一版):
|
||||
- device_id 固定落盘 -> 跨启动同一 user_id, 已提取专辑直接命中歌单, 跳过 import 轮询;
|
||||
- 275->拾音盘 映射与专辑 platform_id 落盘 -> 重复打开直接拿曲目列表;
|
||||
- 轮询"先查后睡"(0.4s) 替代固定 sleep(1) x2, 去掉提取完成后的多余歌单回查;
|
||||
- 启动探活默认地址优先 (原分发地址已失效, 每次白等 3s 超时)。
|
||||
|
||||
稳健性 (修"偶发选集/暂无播放数据"):
|
||||
- 所有请求走 _req: 网络抖动/超时/429/5xx 退避重试 3 次;
|
||||
- 提取轮询单次异常只记日志不中断, 整个提取失败再提交一轮;
|
||||
- 曲目列表瞬时异常/空列表重试 3 次, 仍空则重置 plat 重新提取 1 次;
|
||||
- 曲目彻底拿不到时按元数据集数合成选集 (第N集), 详情页永不出空;
|
||||
- detailContent 整体重试 2 轮;
|
||||
- playerContent 不再探活 (探活抖动=空url="暂无播放数据"), 直接给拼好的直链。
|
||||
|
||||
- 拾音盘搜索没有 TME 独家书 (我弟是神棍/盗墓笔记/雨村笔记/祖祀/重启之极海听雷等
|
||||
演播方为 TME有声剧场 的书全部 0 结果), 原逻辑匹配失败 -> 详情页空;
|
||||
- 现在匹配不到/提取失败/曲目为空时, 自动改走 275 官方章节接口
|
||||
chapter?size=1000&page=&sort=asc&bookId= 拉真实选集;
|
||||
- 播放走 AppGetChapterUrl (老接口, xmcdn 源, 实测 12/12 全成功), 需 timeStamp+盐
|
||||
双重 md5 签名 addItParapet (签名缺失服务端回 data:null); AppGetChapterUrl2023
|
||||
(自家 audio.tingshijie.com 源) 常年 status:1 只当备用;
|
||||
音频 CDN 拦截官方 UA (Access Denied: Please use the official App),
|
||||
播放 header 用 okhttp UA 即可, 支持 Range 拖动;
|
||||
- 搜索同步合并 275 appSearch (需 app_token=abcSEARCH-2025), 拾音盘搜不到的书也能搜。
|
||||
|
||||
配置示例 (hipy-server T4):
|
||||
{
|
||||
"key": "hipy_tingshijie", "name": "听书世界", "type": 4,
|
||||
"api": "http://127.0.0.1:5707/api/v1/vod/听书世界",
|
||||
"searchable": 1, "quickSearch": 1, "filterable": 0
|
||||
}
|
||||
可选 ext: {"name":"自定义源名"} —— 不传则用默认名。
|
||||
"""
|
||||
|
||||
import hashlib
|
||||
import json
|
||||
@@ -26,6 +82,8 @@ except Exception:
|
||||
|
||||
UA = 'TingShiJie/1.8.8 (m.i275.com)'
|
||||
APP_UA = 'okhttp/4.9.3'
|
||||
BROWSER_UA = ('Mozilla/5.0 (Linux; Android 13; M2102K1C) AppleWebKit/537.36 '
|
||||
'(KHTML, like Gecko) Chrome/124.0.0.0 Mobile Safari/537.36')
|
||||
DEFAULT_BASE = 'https://app.365ting.com/listen/Apitzg2025/'
|
||||
CONFIG_URLS = ['http://101.43.48.231:8090/config/tingchina2025.txt']
|
||||
API = 'https://api.365ting.com'
|
||||
@@ -627,8 +685,9 @@ class Spider(A):
|
||||
def playerContent(self, flag, pid, vipFlags):
|
||||
# 直链由 album+idx 规则拼出, 不做探活: 探活请求一旦抖动就返回空 url,
|
||||
# 播放器必然报"暂无播放数据" —— 交给播放器自己拉流即可。
|
||||
# header 用 okhttp UA: audio.tingshijie.com 会拦截官方 UA
|
||||
# (Access Denied: Please use the official App), okhttp/浏览器 UA 放行
|
||||
# 275 原生源: okhttp UA (audio.tingshijie.com 拦官方 UA, okhttp 放行)
|
||||
# 拾音盘直链: 浏览器 UA —— api.365ting.com/tingyou/stream 对 okhttp UA
|
||||
# 会卡死 (0 KB/s), 浏览器 UA 可正常播放; xmcdn 源不受影响
|
||||
S = {'parse': 0, 'jx': 0, 'playUrl': '', 'url': '', 'header': {'User-Agent': APP_UA}}
|
||||
try:
|
||||
parts = str(pid).split('|')
|
||||
@@ -637,6 +696,7 @@ class Spider(A):
|
||||
if not S['url']:
|
||||
LOG('playerContent 275 播放地址获取失败: %s' % pid)
|
||||
elif len(parts) == 2 and parts[1].isdigit(): # 拾音盘直链
|
||||
S['header']['User-Agent'] = BROWSER_UA
|
||||
S['url'] = '%s/tingyou/stream?album=%s&idx=%s' % (API, parts[0], parts[1])
|
||||
else:
|
||||
LOG('playerContent 参数异常: %s' % pid)
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user