Greasy Fork

Greasy Fork is available in English.

VIP视频解析助手

VIP视频解析工具,支持优酷、爱奇艺、腾讯视频等主流视频网站VIP视频免费观看

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         VIP视频解析助手
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  VIP视频解析工具,支持优酷、爱奇艺、腾讯视频等主流视频网站VIP视频免费观看
// @author       You
// @license      MIT
// @match        *://*.youku.com/*
// @match        *://*.iqiyi.com/*
// @match        *://*.v.qq.com/*
// @match        *://*.bilibili.com/*
// @match        *://*.mgtv.com/*
// @match        *://*.le.com/*
// @match        *://*.pptv.com/*
// @match        *://*.1905.com/*
// @grant        GM_addStyle
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_notification
// ==/UserScript==

(function() {
    'use strict';

    // 检查验证状态和有效期
    function checkVerification() {
        const verifyData = GM_getValue('verifyData', null);
        if (!verifyData) return false;

        const now = new Date().getTime();
        const verifyTime = verifyData.time;
        const sixMonths = 6 * 30 * 24 * 60 * 60 * 1000;
        
        // 计算剩余天数
        const remainDays = Math.floor((verifyTime + sixMonths - now) / (24 * 60 * 60 * 1000));
        
        if (remainDays <= 0) {
            GM_setValue('verifyData', null);
            return false;
        }

        // 检查是否需要显示到期提醒
        checkExpireNotification(remainDays);
        
        return true;
    }

    // 到期提醒功能
    function checkExpireNotification(remainDays) {
        const lastNotifyTime = GM_getValue('lastNotifyTime', 0);
        const now = new Date().getTime();
        const oneDayMs = 24 * 60 * 60 * 1000;

        let shouldNotify = false;
        let notifyMessage = '';

        if (remainDays <= 3) {
            if (now - lastNotifyTime >= oneDayMs) {
                shouldNotify = true;
                notifyMessage = `您的VIP视频解析助手将在${remainDays}天后到期,请及时续期!`;
            }
        } else if (remainDays <= 7) {
            if (now - lastNotifyTime >= 3 * oneDayMs) {
                shouldNotify = true;
                notifyMessage = `您的VIP视频解析助手还有${remainDays}天到期,请注意续期!`;
            }
        } else if (remainDays <= 30) {
            if (now - lastNotifyTime >= 7 * oneDayMs) {
                shouldNotify = true;
                notifyMessage = `您的VIP视频解析助手还有${remainDays}天到期。`;
            }
        }

        if (shouldNotify) {
            GM_notification({
                title: 'VIP视频解析助手提醒',
                text: notifyMessage,
                timeout: 5000,
                onclick: function() {
                    createVerifyModal(true);
                }
            });
            GM_setValue('lastNotifyTime', now);
        }
    }

    // 创建验证弹窗
    function createVerifyModal(isRenew = false) {
        const mask = document.createElement('div');
        mask.className = 'verify-mask';
        
        const modal = document.createElement('div');
        modal.className = 'verify-modal';
        
        const expireDate = new Date();
        expireDate.setMonth(expireDate.getMonth() + 6);
        const expireStr = expireDate.toLocaleDateString();
        
        modal.innerHTML = `
            <h3>${isRenew ? '续期验证' : '首次使用验证'}</h3>
            <p>关注公众号获取验证码</p>
            <img src="https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=wx5ad906a853cb4265" alt="公众号二维码">
            <p class="qr-tip">扫描二维码关注公众号</p>
            <input type="text" placeholder="请输入验证码" id="verifyInput">
            <p class="error-tip">验证码错误,请重新输入</p>
            <button class="verify-btn">${isRenew ? '续期' : '验证'}</button>
            <p class="expire-tip">验证有效期至: ${expireStr}</p>
            <p style="font-size:12px;color:#999;">${isRenew ? '续期后可继续使用全部功能' : '验证后即可使用全部功能'}</p>
        `;
        
        document.body.appendChild(mask);
        document.body.appendChild(modal);

        modal.querySelector('.verify-btn').addEventListener('click', () => {
            const input = document.querySelector('#verifyInput');
            const code = input.value.trim();
            
            if(code === '5288') {
                GM_setValue('verifyData', {
                    time: new Date().getTime(),
                    verified: true
                });
                
                GM_setValue('lastNotifyTime', 0);
                
                GM_notification({
                    title: 'VIP视频解析助手',
                    text: isRenew ? '续期成功!有效期已延长6个月。' : '验证成功!可以开始使用了。',
                    timeout: 3000
                });
                
                mask.remove();
                modal.remove();
                
                if(!isRenew) {
                    initVideoParser();
                }
            } else {
                modal.querySelector('.error-tip').style.display = 'block';
                input.value = '';
            }
        });
    }

    // 初始化解析功能
    function initVideoParser() {
        const jxApis = [
            { name: '解析一', url: 'https://jx.xmflv.com/?url=' },
            { name: '解析二', url: 'https://jx.pangujiexi.cc/player.php?url=' },
            { name: '解析三', url: 'https://jx.bozrc.com:4433/player/?url=' },
            { name: '解析四', url: 'https://jx.parwix.com:4433/player/analysis.php?v=' },
            { name: '解析五', url: 'https://www.nxflv.com/?url=' },
            { name: '解析六', url: 'https://www.administratorw.com/video.php?url=' },
            { name: '解析七', url: 'https://okjx.cc/?url=' },
            { name: '解析八', url: 'https://www.ckmov.vip/api.php?url=' },
            { name: '解析九', url: 'https://jx.m3u8.tv/jiexi/?url=' },
            { name: '解析十', url: 'https://api.jiexi.la/?url=' }
        ];

        GM_addStyle(`
            .video-parse-button {
                position: fixed;
                top: 150px;
                left: 0;
                z-index: 9999999;
                background: #FF4D4F;
                color: white;
                padding: 8px 16px;
                cursor: pointer;
                border-radius: 0 4px 4px 0;
                font-size: 14px;
                box-shadow: 0 2px 6px rgba(0,0,0,0.2);
            }
            .video-parse-panel {
                position: fixed;
                top: 150px;
                left: -300px;
                width: 300px;
                background: white;
                z-index: 9999998;
                border-radius: 4px;
                box-shadow: 0 2px 10px rgba(0,0,0,0.2);
                transition: left 0.3s;
                padding: 10px;
            }
            .video-parse-panel.show {
                left: 50px;
            }
            .parse-button {
                display: inline-block;
                width: calc(33.33% - 10px);
                margin: 5px;
                padding: 8px 0;
                text-align: center;
                background: #FF4D4F;
                color: white;
                cursor: pointer;
                border-radius: 4px;
                font-size: 13px;
                transition: all 0.3s;
            }
            .parse-button:hover {
                background: #ff7875;
                transform: translateY(-1px);
            }
            .verify-modal {
                position: fixed;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                background: white;
                padding: 20px;
                border-radius: 8px;
                box-shadow: 0 2px 10px rgba(0,0,0,0.2);
                z-index: 9999999;
                width: 300px;
                text-align: center;
            }
            .verify-mask {
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background: rgba(0,0,0,0.5);
                z-index: 9999998;
            }
        `);

        createParseElements();
    }

    // 创建解析按钮和面板
    function createParseElements() {
        const button = document.createElement('div');
        button.className = 'video-parse-button';
        button.innerHTML = 'VIP解析';
        document.body.appendChild(button);

        const panel = document.createElement('div');
        panel.className = 'video-parse-panel';
        
        let buttonsHtml = '';
        jxApis.forEach(api => {
            buttonsHtml += `<div class="parse-button" data-url="${api.url}">${api.name}</div>`;
        });
        panel.innerHTML = buttonsHtml;
        document.body.appendChild(panel);

        button.addEventListener('click', () => {
            panel.classList.toggle('show');
        });

        panel.querySelectorAll('.parse-button').forEach(btn => {
            btn.addEventListener('click', () => {
                const url = btn.dataset.url;
                const videoUrl = location.href;
                const videoPlayer = document.querySelector('#player, .player, .video-player');
                if (videoPlayer) {
                    const iframe = document.createElement('iframe');
                    iframe.src = url + videoUrl;
                    iframe.style.width = '100%';
                    iframe.style.height = '100%';
                    iframe.style.border = 'none';
                    iframe.setAttribute('allowfullscreen', true);
                    iframe.setAttribute('frameborder', '0');
                    iframe.setAttribute('scrolling', 'no');
                    iframe.setAttribute('allow', 'autoplay; fullscreen');
                    videoPlayer.innerHTML = '';
                    videoPlayer.appendChild(iframe);
                }
                panel.classList.remove('show');
            });
        });
    }

    // 根据验证状态初始化功能
    if (checkVerification()) {
        initVideoParser();
    } else {
        createVerifyModal();
    }

})();