吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 405|回复: 6
收起左侧

[求助] 自动下一集遇见的问题

[复制链接]
神仙不在 发表于 2024-12-14 11:00
本帖最后由 神仙不在 于 2025-2-16 20:03 编辑

下面3个信息请用Base64解码一下(https://www.toolhelper.cn/EncodeDecode/Base64)网址:aHR0cDovL3d3dy50ZWFjaGVyc2VkdS5jbi9sb2dpbg==
账号:MjR4eXN=
密码:c3gxMjMM=
我在console下面实现了第一集看完可以自动看第二集,但是第二集看完了不会跳第3集,不知道怎么办了,求帮助
可以登录后测试下面网址
https://www.teachersedu.cn/course/projectcourseinfo?projectid=623292683296703749&id=633861735635223813
[JavaScript] 纯文本查看 复制代码
1
2
3
4
5
6
let video = document.querySelector('video')
video.addEventListener('ended', function () {
    let div_current = document.querySelector('.is-current')
    let next = div_current.nextElementSibling
    next.querySelector('a').click()
})

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

知心 发表于 2024-12-14 13:13
本帖最后由 知心 于 2024-12-14 13:47 编辑

[JavaScript] 纯文本查看 复制代码
1
2
3
4
5
6
7
8
const video_node = document.querySelector('video');
video_node.addEventListener('ended', function () {
    setTimeout(() => {
        const current_item = document.querySelector('div[role="treeitem"].is-current');
        const next_item = current_item.nextElementSibling;
        next_item.querySelector('a.title').click();
    }, 3000);
})

试试,控制台不要清空,清空可能会异常
notproblem 发表于 2024-12-14 14:10
已经去测试过了,很好用,有两个方案:
方案一:
[JavaScript] 纯文本查看 复制代码
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
let curVideoSrc = ''
setVideo()
function setVideo () {
    let video = document.querySelector('video')
    if (video && video.src !== curVideoSrc) {
        curVideoSrc = video.src
        video.addEventListener('ended', function () {
            let div_current = document.querySelector('.task-item.active')
            let next = div_current.parentNode.parentNode.parentNode.nextElementSibling
            next.querySelector('a').click()
        })
    }
}
 
setInterval(() => {
  let button = document.querySelector('.alert-box-btns .confirm-btn')
  if (button && button.innerText === '下一节') {
      button.click()
  }
  setVideo()
}, 3000)


方案二:
[JavaScript] 纯文本查看 复制代码
1
2
var vid = document.getElementById("tcvideo_html5_api");
vid.currentTime = 629; // 把629改为视频时间,直接完成

免费评分

参与人数 1吾爱币 +1 热心值 +1 收起 理由
神仙不在 + 1 + 1 牛逼

查看全部评分

tantanxin147 发表于 2024-12-14 18:12
播放速度没有检测,直接拉满就行了,楼上方法可行,就是不知道后台能不能看见
 楼主| 神仙不在 发表于 2024-12-14 18:54
tantanxin147 发表于 2024-12-14 18:12
播放速度没有检测,直接拉满就行了,楼上方法可行,就是不知道后台能不能看见

我只想研究怎么自动下一集,不搞其他
 楼主| 神仙不在 发表于 2024-12-14 19:35
notproblem 发表于 2024-12-14 14:10
已经去测试过了,很好用,有两个方案:
方案一:
[mw_shl_code=javascript,true]  let curVideoSrc = ''
...

大老牛逼,我好好学习下
tutu2 发表于 2025-2-13 21:43
哥们   我遇到了和你一样的困扰  只不过我这是河北的   你方便把你自动下一集的代码发一下吗  谢谢了  我研究研究    另外现在你的账号密码还能进去  为保护账号安全  及时修改代码
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2025-3-9 17:36

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表