Greasy Fork

Greasy Fork is available in English.

音视频解析

支持多个平台视频解析

当前为 2024-12-08 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         音视频解析
// @namespace    http://tampermonkey.net/
// @version      1.4.2
// @description  支持多个平台视频解析
// @author       Yutes
// @match        *://*.163.com/*/song?id=*
// @match        *://*.iqiyi.com/v*
// @match        *://*.bilibili.com/bangumi/play/*
// @match        *://*.youku.com/alipay_video/id_*
// @match        *://*.v.qq.com/x/*/play?cid=*
// @match        *://*.acfun.cn/v/?ab=*
// @match        *://play.tudou.com/*
// @match        *://*.sohu.com/v*
// @match        *://*.le.com/vplay_*
// @match        *://*.pptv.com/show/*
// @match        *://*.ixigua.com/*?logTag=*
// @match        *://*.fun.tv/*play/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const videoSites = {
        "bilibili.com": "https://jx.xymp4.cc/?url=",
        "fun.tv":       "https://jx.xymp4.cc/?url=",
        "youku.com":    "https://jx.xmflv.com/?url=",
        "v.qq.com":     "https://jx.xmflv.com/?url=",
        "iqiyi.com":    "https://jx.xmflv.com/?url=",
        "tudou.com":    "https://jx.xmflv.com/?url=",
        "sohu.com":     "https://jx.xmflv.com/?url=",
        "le.com":       "https://jx.xmflv.com/?url=",
        "pptv.com":     "https://jx.xmflv.com/?url=",
        "ixigua.com":   "https://jx.xmflv.com/?url=",
        "acfun.cn":     "https://jx.playerjy.com/?url="
    };

    const url = window.location.href;

    // 视频平台解析
    for (const site in videoSites) {
        if (url.includes(site)) {
            if (confirm('确定播放?')) {
                window.location.href = videoSites[site] + encodeURIComponent(url);
            }
            return;
        }
    }

    // 网易云音乐解析
    const match = url.match(/id=(\d+)/);
    if (match && confirm('确定播放?')) {
        window.location.href = `http://music.163.com/song/media/outer/url?id=${match[1]}`;
    }
})();