LuckyPuppy514 / Play-With-MPV

使用 MPV 播放网页中的视频
MIT License
603 stars 20 forks source link

部分动画看不了(源是好的) #154

Closed IKUNNUKI closed 5 months ago

IKUNNUKI commented 6 months ago
IKUNNUKI commented 5 months ago

次元城看不了的解决方法: 第120、121行把原本的cycdm01.top改成.cycanime.com 3789行到3828行请一字不落地覆盖: // ✅ https://www.cycanime.com/watch/3388/1/1.html name: "次元城动漫", home: ["https://www.cycanime.com"], regex: /^https:\/\/www.cycanime.com\/watch\/.*/g, handler: class Handler extends BaseHandler { constructor() { super(); this.addIframeListener(); } }, }, { name: "次元城动漫播放器", regex: /^https:\/\/player.cycanime.com\/\?url=.+/g, handler: class Handler extends BaseHandler { constructor() { super(); this.addTopListener(); } async parse() { let url = this.videoParser(); if (url) { let index = url.indexOf("?"); if (index != -1) { // 获取 ? 之前的部分 let beforeQuery = url.substring(0, index); // 如果 ? 之前包含 + 号,对 + 号进行编码 if (beforeQuery.includes("+")) { beforeQuery = beforeQuery.split("+").join("%2B"); } // 获取 ? 之后的部分,并对其进行编码 let queryParams = encodeURIComponent(url.substring(index + 1)); // 组合成新的URL url = beforeQuery + "?" + queryParams; } this.media.setVideoUrl(url); } } }, },