A 站视频缓存 视频链接解析

谁不想在遇到好视频的时候能够缓存下来呢?

目前为 2020-04-15 提交的版本。查看 最新版本

// ==UserScript==
// @name         A 站视频缓存 视频链接解析
// @namespace 	 czzonet
// @version      1.0.7
// @description  谁不想在遇到好视频的时候能够缓存下来呢?
// @author       czzonet
// @include      *://www.acfun.cn/v/ac*
// @include      *://www.acfun.cn/bangumi/aa*
// @exclude      *://*.eggvod.cn/*
// @connect      www.acfun.cn
// @license      GPL License
// @grant        GM_download
// @grant        GM_openInTab
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_xmlhttpRequest
// @grant        GM_addStyle
// @grant        unsafeWindow
// @grant        GM_setClipboard
// @grant        GM_getResourceURL
// @grant        GM_getResourceText
// ==/UserScript==

// 等待页面加载完毕
window.onload = function () {
    setTimeout(() => {
        // 视频链接的json对象
        console.log('window',window[0]);
        console.log('window.pageInfo',window[0].pageInfo);
        
        var acdata = JSON.parse(window[0].pageInfo.currentVideoInfo.ksPlayJson)
            .adaptationSet.representation;
        console.log(
            "Please copy m3u8 url below(max screen resolution):\n复制以下m3u8链接(最高清晰度):\n",
            acdata.pop().url
        );
    }, 5000);
}

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址