Eanya-Tonic / CCTV_Viewer

电视浏览器,一款基于tv.cctv.com和央视频的简易电视直播收看软件,用于方便的在机顶盒上收看电视节目
https://www.bilibili.com/video/BV1Gc41187D6
1.15k stars 103 forks source link

关于央视频定时任务bug #45

Open Zcodeoooo opened 5 months ago

Zcodeoooo commented 5 months ago

本人https://github.com/Zcodeoooo/CCTV_Viewer 分支作者 写过油猴脚本,所以对于vue,react等动态页面了解一些(具体可以参考https://bbs.tampermonkey.net.cn/thread-1425-1-1.html) 问题代码

try {
     if (document.querySelector('.voice.on').style.display == 'none') {
          document.querySelector('.voice.on').click();
     }
     document.querySelector('.play.play1').click();
} catch (e) {
}

document.querySelector('.play.play1').click(); 不是每次都会获取到dom对象的,因为执行click会造成页面元素刷新,导致下次执行该代码会无法获取到dom对象,所以可以考虑使用MutationObserver监视DOM的变化,执行修改,或者获取vue内部方法执行例如

if(document.querySelector('.voice.on').style.display == 'none'){
     document.querySelector(".container").__vue__.volume = 1
     document.querySelector(".container").__vue__.changeVolume()
 }
if(!document.querySelector(".container").__vue__.playStatus.isPaused){
     document.querySelector(".container").__vue__.togglePlay()
}
zbby1987 commented 5 months ago

请问一下。。。 油猴脚本,adblock这类插件, 他们的原理是。。。 a.广告其实自然加载了,只是前端不显示出来呢!? b.还是压根没加载进运存,从加载之前就从根儿上给他屏蔽了!? 这种的会有效提高网页加载速度么!! 直播浏览器弄上这个是不是加载速度会变得超级快

Zcodeoooo commented 5 months ago

都可以做到,只是有时候页面混淆了,有时候页面更新了又不行了,时间成本太大 https://github.com/lizongying/my-tv 这个项目就是解密了央视频的js算法实现的,我也参考了实现的播放vip节目功能 一般使用sekiro方案(多设备注入js,提供负载均衡的服务器接口获取数据),可以达到各个方面的均衡,例如兼容性安卓版本 稳定性 速度,可以达到商业性的标准

zbby1987 commented 5 months ago

都可以做到,只是有时候页面混淆了,有时候页面更新了又不行了,时间成本太大 https://github.com/lizongying/my-tv 这个项目就是解密了央视频的js算法实现的,我也参考了实现的播放vip节目功能 一般使用sekiro方案(多设备注入js,提供负载均衡的服务器接口获取数据),可以达到各个方面的均衡,例如兼容性安卓版本 稳定性 速度,可以达到商业性的标准

它现在又改了新直播源获取路径了吧,看着不是央视频得了。 不过它的平铺式全屏选台界面也是一个特色,就是图片太占空间了! 电视浏览器项目,可以点菜单键时,出一个类似我的电视这样的无图版平铺式菜单,默认选中屏幕最底部的设置相关按钮。设置按钮上面全部是平铺式选节目列表。 同时保持住确定键的一二级选台菜单弹窗!

Zcodeoooo commented 5 months ago

就是央视频的源你不看代码当然看不出来哈哈哈,不得不说这个作者确实牛逼,不靠扒代码js,硬逆混淆的js算法实现的

zbby1987 commented 5 months ago

都可以做到,只是有时候页面混淆了,有时候页面更新了又不行了,时间成本太大 https://github.com/lizongying/my-tv 这个项目就是解密了央视频的js算法实现的,我也参考了实现的播放vip节目功能 一般使用sekiro方案(多设备注入js,提供负载均衡的服务器接口获取数据),可以达到各个方面的均衡,例如兼容性安卓版本 稳定性 速度,可以达到商业性的标准

做一个一样的本地网页,只从本地打开! 只保留播放器和视频模块就行了,其他的全删了。。。它再变也不耽误用! . 其实央视频的网页视频数据没加密,可以直接用浏览器自带的播放器去播放直播,比先加载网页要快得多!

Zcodeoooo commented 5 months ago

确实没加密使用这个sekiro,就能实现了(基本我已经本地验证了),只是需要服务器,如果需要vip节目控制好不同vip账号的访问量就ok,我不敢搞罢了,这样搞比my-tv还稳定了

zbby1987 commented 5 months ago

就是央视频的源你不看代码当然看不出来哈哈哈,不得不说这个作者确实牛逼,不靠补js,硬逆混淆的js算法实现的

你们都是怎么传图片的?我怎么传不了? 我的电视并没有隐藏过数据源地址啊。。。

"央视频道 \nCCTV1 综合, http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226231/index.m3u8 \nCCTV2 财经, http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226195/index.m3u8 \nCCTV3 综艺, http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226397/index.m3u8 \nCCTV4 中文国际, http://39.134.24.161/dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226191/index.m3u8; http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226191/index.m3u8 \nCCTV5 体育, http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226395/index.m3u8 \nCCTV6 电影, http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226393/index.m3u8 \nCCTV7 国防军事, http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226192/index.m3u8 \nCCTV8 电视剧,http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226391/index.m3u8 \nCCTV9 记录,http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226197/index.m3u8 \nCCTV10 科教,http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226189/index.m3u8 \nCCTV11 戏曲,http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226240/index.m3u8 \nCCTV12 社会与法,http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226190/index.m3u8 \nCCTV13 新闻,https://live-play.cctvnews.cctv.com/cctv/merge_cctv13.m3u8;http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226233/index.m3u8 \nCCTV14 少儿,http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226193/index.m3u8 \nCCTV15 音乐,http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221225785/index.m3u8 \nCCTV16 奥林匹克,http://39.134.24.162/dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226921/index.m3u8;http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226921/index.m3u8 \nCCTV17 农业农村,http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226198/index.m3u8 \nCCTV5+ 体育赛事,http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226221/index.m3u8 \nCCTV4K 超高清,\nCCTV8K 超高清,\n风云剧场, http://dbiptv.sn.chinamobile.com/PLTV/88888893/224/3221226950/index.m3u8 \n第一剧场,http://dbiptv.sn.chinamobile.com/PLTV/88888893/224/3221226959/index.m3u8 \n怀旧剧场,http://dbiptv.sn.chinamobile.com/PLTV/88888893/224/3221226972/index.m3u8 \n世界地理,\n风云音乐,http://dbiptv.sn.chinamobile.com/PLTV/88888893/224/3221226953/index.m3u8 \n兵器科技,http://dbiptv.sn.chinamobile.com/PLTV/88888893/224/3221226975/index.m3u8 \n风云足球,http://dbiptv.sn.chinamobile.com/PLTV/88888893/224/3221226984/index.m3u8 \n高尔夫网球,http://dbiptv.sn.chinamobile.com/PLTV/88888893/224/3221226978/index.m3u8 \n女性时尚,http://dbiptv.sn.chinamobile.com/PLTV/88888893/224/3221226969/index.m3u8 \n央视文化精品,http://dbiptv.sn.chinamobile.com/PLTV/88888893/224/3221226981/index.m3u8 \n央视台球,http://dbiptv.sn.chinamobile.com/PLTV/88888893/224/3221226956/index.m3u8 \n电视指南,http://dbiptv.sn.chinamobile.com/PLTV/88888893/224/3221226987/index.m3u8 \n卫生健康,\n地方频道\n东方卫视,http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226217/index.m3u8 \n湖南卫视,http://ottrrs.hl.chinamobile.com/PLTV/88888888/224/3221226307/index.m3u8;http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226211/index.m3u8 \n湖北卫视,http://ottrrs.hl.chinamobile.com/PLTV/88888888/224/3221226477/index.m3u8;http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226194/index.m3u8 \n辽宁卫视,http://ottrrs.hl.chinamobile.com/PLTV/88888888/224/3221226546/index.m3u8;http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226201/index.m3u8 \n江苏卫视,http://39.134.24.166/dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226200/index.m3u8;http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226200/index.m3u8 \n江西卫视,http://ottrrs.hl.chinamobile.com/PLTV/88888888/224/3221226344/index.m3u8;http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221225764/index.m3u8 \n山东卫视,http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226209/index.m3u8 \n广东卫视,http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226216/index.m3u8 \n广西卫视,http://live.gxrb.com.cn/tv/gxtvlive03/index.m3u8;http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221225770/index.m3u8 \n重庆卫视,http://ottrrs.hl.chinamobile.com/PLTV/88888888/224/3221226409/index.m3u8;http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226202/index.m3u8 \n河南卫视,http://ottrrs.hl.chinamobile.com/PLTV/88888888/224/3221226480/index.m3u8;http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221225767/index.m3u8 \n河北卫视,http://ottrrs.hl.chinamobile.com/PLTV/88888888/224/3221226406/index.m3u8;http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221225750/index.m3u8 \n贵州卫视,http://ottrrs.hl.chinamobile.com/PLTV/88888888/224/3221226474/index.m3u8;http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221225793/index.m3u8 \n北京卫视,http://ottrrs.hl.chinamobile.com/PLTV/88888888/224/3221225728/index.m3u8;http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226222/index.m3u8 \n黑龙江卫视,http://ottrrs.hl.chinamobile.com/PLTV/88888888/224/3221226327/index.m3u8;http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226215/index.m3u8 \n浙江卫视,http://hw-m-l.cztv.com/channels/lantian/channel01/1080p.m3u8;http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226199/index.m3u8 \n安徽卫视,http://ottrrs.hl.chinamobile.com/PLTV/88888888/224/3221226391/index.m3u8;http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226203/index.m3u8 \n深圳卫视,http://39.134.24.166/dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226205/index.m3u8;http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226205/index.m3u8 \n四川卫视,http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221225768/index.m3u8;http://39.134.24.166/dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221225768/index.m3u8 \n东南卫视,http://ottrrs.hl.chinamobile.com/PLTV/88888888/224/3221226341/index.m3u8;http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221225766/index.m3u8 \n海南卫视,http://ottrrs.hl.chinamobile.com/PLTV/88888888/224/3221226465/index.m3u8;http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221225769/index.m3u8 \n天津卫视,\n新疆卫视, \n国际频道\nCGTN,http://live.cgtn.com/1000/prog_index.m3u8 \nCGTN 法语频道,https://livefr.cgtn.com/1000f/prog_index.m3u8 \nCGTN 俄语频道,http://liveru.cgtn.com/1000r/prog_index.m3u8 \nCGTN 阿拉伯语频道,http://livear.cgtn.com/1000a/prog_index.m3u8 \nCGTN 西班牙语频道,http://livees.cgtn.com/500e/prog_index.m3u8;http://livees.cgtn.com/1000e/prog_index.m3u8 \nCGTN 纪录频道,https://livedoc.cgtn.com/500d/prog_index.m3u8"

Zcodeoooo commented 5 months ago

看了下,kt代码我不太熟悉,作者没用这个估计是备用的

zbby1987 commented 5 months ago

看了下,kt代码我不太熟悉,作者没用这个估计是备用的

你的分支版本,怎么实现快捷换台的? 我记得你是点确定键看回播的弹窗,没见选台相关弹窗

Zcodeoooo commented 5 months ago

没有,最好别用我的,因为是我个人给老人用的简单就行

zbby1987 commented 5 months ago

没有,最好别用我的,因为是我个人给老人用的简单就行

你家老人,只用上下键换台!?? 这样从央1换到央13换台多难受。。。

Zcodeoooo commented 5 months ago

我家老人确实是数字键和上下键换台,其他操作确实教不会的,就和以前的模拟电视换台方式一样就行

zbby1987 commented 5 months ago

我家老人确实是数字键和上下键换台,其他操作确实教不会的,就和以前的模拟电视换台方式一样就行

matrix3d那个分支里,改的webview不加载图片的效果真牛逼! 网页视频的加载速度明显快多了! 你会用对应的类似方法去改x5内核么!?

43

webview屏蔽图片效果视频:https://share.feijipan.com/s/BlUuxIDi (手机浏览器需把ua改成pc模式,才能直接下载观看下载)

Zcodeoooo commented 5 months ago

我家老人确实是数字键和上下键换台,其他操作确实教不会的,就和以前的模拟电视换台方式一样就行

matrix3d那个分支里,改的webview不加载图片的效果真牛逼! 网页视频的加载速度明显快多了! 你会用对应的类似方法去改x5内核么!? #43

这个思路可以实现减少资源的加载,不过我不倾向这种

zbby1987 commented 5 months ago

我家老人确实是数字键和上下键换台,其他操作确实教不会的,就和以前的模拟电视换台方式一样就行

matrix3d那个分支里,改的webview不加载图片的效果真牛逼! 网页视频的加载速度明显快多了! 你会用对应的类似方法去改x5内核么!? #43

这个思路可以实现减少资源的加载,不过我不倾向这种

看来你的设备性能太高了, 而且你家老人对换台时比较久的加载时间也不敏感! 市面上巨量的中低端性能孱弱设备,是极度需要这种的!

Zcodeoooo commented 5 months ago

我家老人确实是数字键和上下键换台,其他操作确实教不会的,就和以前的模拟电视换台方式一样就行

matrix3d那个分支里,改的webview不加载图片的效果真牛逼! 网页视频的加载速度明显快多了! 你会用对应的类似方法去改x5内核么!? #43

这个思路可以实现减少资源的加载,不过我不倾向这种

看来你的设备性能太高了, 而且你家老人对换台时比较久的加载时间也不敏感! 市面上巨量的中低端性能孱弱设备,是极度需要这种的!

...老人确实不对这些敏感的,买菜都会找很多地方比价,还会在乎这点时间,我用的树莓派4b性能上应该也是中端靠拢,确实不在乎这些,可以向作者提issues