Greasy Fork is available in English.

TU-破解视频VIP集合-去广告-音乐直接解析播放

VIP视频破解集合;支持【爱奇艺,优酷视频,乐视TV,腾讯视频,土豆视频,搜狐视频,哔哩哔哩,音悦台,PPTV,华数TV】;移除部分干扰广告。9月23日新增精选接口,解析速度飞快,可供选择的更多。各种VIP节点播放,并且自动解析使用对应的播放节点,更快的播放速度,更稳定的播放效果。支持[Tampermonkey | Violentmonkey | Greasymonkey]

目前为 2018-09-23 提交的版本。查看 最新版本

// ==UserScript==
// @name            TU-破解视频VIP集合-去广告-音乐直接解析播放
// @description     VIP视频破解集合;支持【爱奇艺,优酷视频,乐视TV,腾讯视频,土豆视频,搜狐视频,哔哩哔哩,音悦台,PPTV,华数TV】;移除部分干扰广告。9月23日新增精选接口,解析速度飞快,可供选择的更多。各种VIP节点播放,并且自动解析使用对应的播放节点,更快的播放速度,更稳定的播放效果。支持[Tampermonkey | Violentmonkey | Greasymonkey]
// @icon            http://ww1.sinaimg.cn/large/6a155794ly1fubb8dy4pzj205k05kdg3.jpg
// @author          AC
// @create          2018-08-16
// @run-at          document-start
// @version         2.6
// @include         *//www.iqiyi.com/v_*
// @include         *//www.iqiyi.com/w_*
// @include         *//v.youku.com/v_show/*
// @include         *//*.le.com/ptv/vplay/*
// @include         *//v.qq.com/x/page/*
// @include         *//v.qq.com/x/cover/*
// @include         *//video.tudou.com/v/*
// @include         *//*.mgtv.com/b/*
// @include         *//tv.sohu.com/v/*
// @include         *//film.sohu.com/album/*
// @include         *//*.bilibili.com/bangumi/play/*
// @include         *//*.pptv.com/show/*
// @include         *//v.yinyuetai.com/video/*
// @include         *//*.wasu.cn/Play/show/*
// @namespace       TUJIDU
// @include         *//item.taobao.com/item.htm*
// @include         *//detail.tmall.com/item.htm*
// @include         *//s.taobao.com/search*
// @include         *//cart.taobao.com/*
// @include         *//uland.taobao.com/coupon/*
// @connect         open.lesiclub.cn
// @grant           GM_xmlhttpRequest
// @supportURL      https://shang.qq.com/wpa/qunwpa?idkey=a2c2082506abd0b6f32816f05057ccec7febb02e228de769f527bd8c8eb82046
// @feedback-url    https://shang.qq.com/wpa/qunwpa?idkey=a2c2082506abd0b6f32816f05057ccec7febb02e228de769f527bd8c8eb82046
// @copyright       2018, AC
// @lastmodified    2018-09-23
// @note            2018.09.23-2.6 更新地址匹配和优惠信息
// @note            2018.09.18-2.5 新增配置输出代码,修复以前的遗留问题
// @note            2018.09.06-2.4 新增鼠标移上去之后的特殊效果 & 爱奇艺部分链接新增支持
// @note            2018.08.24-2.3 修复在某些页面的启用问题
// @note            2018.08.23-2.2 修复在搜索结果之后选集导致的链接异常问题-腾讯
// @note            2018.08.22-2.1 新增好几个节点,并且暴露出url地址,方便在手机上观看视频
// @note            2018.08.16-1.1 第一版新增支持爱奇艺,优酷视频,乐视TV,腾讯视频,土豆视频,搜狐视频,哔哩哔哩,音悦台,PPTV,华数TV
// @require         https://greasyfork.org/scripts/39829-%E6%9C%89%E9%81%93-%E6%83%A0%E6%83%A0%E8%B4%AD%E7%89%A9%E5%8A%A9%E6%89%8B-%E6%96%B0-%E8%B4%AD%E7%89%A9%E6%AF%94%E4%BB%B7-%E4%BC%98%E6%83%A0%E5%88%B8%E6%9F%A5%E6%89%BE-%E4%B8%80%E9%94%AE%E9%A2%86%E5%8F%96%E8%B4%AD%E7%89%A9%E7%AB%8B%E7%9C%8180-2018-09-17%E5%8A%A0%E5%BC%BA%E7%A8%B3%E5%AE%9A%E7%89%88/code/%E6%9C%89%E9%81%93-%E6%83%A0%E6%83%A0%E8%B4%AD%E7%89%A9%E5%8A%A9%E6%89%8B(%E6%96%B0)-%E8%B4%AD%E7%89%A9%E6%AF%94%E4%BB%B7-%E4%BC%98%E6%83%A0%E5%88%B8%E6%9F%A5%E6%89%BE-%E4%B8%80%E9%94%AE%E9%A2%86%E5%8F%96%E8%B4%AD%E7%89%A9%E7%AB%8B%E7%9C%8180%25-%E3%80%9020180917%E5%8A%A0%E5%BC%BA%E7%A8%B3%E5%AE%9A%E7%89%88%E3%80%91.user.js
// ==/UserScript==
(function(){
    var mCurSite = null;
    var isDebug = false;
    var debugX = isDebug?console.log.bind(console):function(){};
    var Config = {
        iqiyi:{
            // 爱奇艺视频 https://www.iqiyi.com/v_19rrfq5ajk.html
            insertTo:".mod-play-tit, .title-score, .side-content>.qy-play-list .main-title, .public-vip .public-vip-text,.qy-player-detail .qy-player-title",
            adStyle:".pw-video>div[data-cupid]>div[style*='position']{display:none !important}",
            sStyle:"width: 4rem;",
            title:".detail-left #widget-videotitle",
        },
        youku:{
            // 优酷视频 https://v.youku.com/v_show/id_XMzc2ODA1OTQwNA==.html?spm=a2hww.11359951.m_26665_c_32069.5~5!3~5!2~5~5~A
            // 可用     https://v.youku.com/v_show/id_XMzc4MjEzMjg0NA==.html
            insertTo:".title-wrap>h1, .tvinfo>h2, .vip_info .vip_limit_title",
            adStyle:"",
            sStyle:"",
            title:".player-title .title-wrap>h1>span:nth-child(1)",
        },
        le:{
            // 乐视TV http://www.le.com/ptv/vplay/28636951.html
            insertTo:".briefIntro_tit, .column_body>.vip_tit, #le_playbox .playbox_vip_tip>h3",
            adStyle:".layout_play iframe{display:none;}",
            sStyle:"vertical-align: bottom;",
            title:".briefIntro_box .briefIntro_tit>a",
        },
        qq:{
            // 腾讯视频 https://v.qq.com/x/cover/au757x4acdk6jea.html
            // https://v.qq.com/x/page/q0390tz0d2o.html
            insertTo:".mod_intro>.video_base, .scroll_top .player_title, .tvip_open_wrap .tvip_open_lf>.tvip_open_btn",
            adStyle:"",
            sStyle:"height: 36px;line-height: 36px;margin: 0px 5px;font-size: 24px;width: 6rem;",
            title:".player_headline ._video_title",
        },
        tudou:{ //---地址match也有待检查
            // 土豆视频 http://video.tudou.com/v/XMzYxMzMyMDIzMg==.html
            // TODO 限制参数请求必须是:http://yun.baiyug.cn/vip/index.php?url=http://video.tudou.com/v/XMzYxMzMyMDIzMg== 不能带别的参数
            insertTo:".left-side .td-playbase .td-playbase__title, .td-listbox__b .td-listbox__list:nth-child(1) .td-video__meta__title",
            adStyle:"",
            sStyle:"width:unset;color: red !important;font-size:unset;",
            title:".td-playbase #subtitle",
        },
        mgtv:{
            // 芒果TV https://www.mgtv.com/b/318945/4470636.html
            insertTo:".v-panel-title, .c-player-aside-filmdl .txt .tilname",
            adStyle:"",
            sStyle:"width: unset;font-size:unset;height:unset;line-height:unset;",
            title:".v-panel-info .route-til",
        },
        sohu:{
            // 搜狐视频 https://tv.sohu.com/v/MjAxODA4MDIvbjYwMDU3NzU0NS5zaHRtbA==.html
            // https://film.sohu.com/album/9337002.html?channeled=1200030002 ---- 新增支持
            insertTo:".videoBox .vBox-desktop, .playerBox .juji_tips>h4, #player_vipTips .vipTipsIn>.p1, .player_wrap .player-top-info .player-top-info-name, .detailInfo_box>p:nth-child(1)",
            adStyle:"#crumbsBar .ad{display:none}.area>.left>.adv{display:none}",
            sStyle:"",
            title:"#crumbsBar .crumbs a:last",
        },
        bilibili:{
            // 哔哩哔哩 可能还有其他的视频地址
            // https://www.bilibili.com/bangumi/play/ep232412
            insertTo:".header-info .count-wrapper, #bangumi_player .limit-vip-wrap .pwe-popup-pay",
            adStyle:"",
            sStyle:"width: 6rem;margin-top: -0.5rem;margin-left: 2rem;",
            title:"#bangumi_detail .info-title h2",
        },
        pptv:{
            // PPTV http://v.pptv.com/show/d2A9uiaKIibDaZF38.html?spm=vip_index_web.vip_d58855eb506e6c89f7eeb434e0955c41.0.0.0
            insertTo:".player-sidebar .tithide li:nth-child(1)>a, #mainContent .cf ul.fl",
            adStyle:"",
            sStyle:"margin-top: 0.5rem;",
            title:".mobilelook-pop-wrap .tv-name",
        },
        yinyuetai:{
            // 音悦台 http://v.yinyuetai.com/video/3271056
            // http://v.yinyuetai.com/playlist/265520        ---- 不支持这个地址
            insertTo:".videoBox .video_info .videoName",
            adStyle:"",
            sStyle:"",
            title:".videoName:first", // split("    ")
        },
        wasu:{
            // 华数TV https://www.wasu.cn/Play/show/id/9567710
            insertTo:".container .play_site h3, .play_video_b #play_vod_hits",
            adStyle:".container div[class*='play_ads']{display:none}#MZAD_POP_PLACEHOLDER,.ad_list{display:none !important}",
            sStyle:"",
            title:".play_movie .play_video_t .player_info_m:first p a",
        }
    };
    function initSite(){
        for(var key in Config){
            if(location.host.indexOf(key) > 0){
                console.log("当前站点是:"+key);
                mCurSite = Config[key];
                mCurSite.name = key;
                break;
            }
        }
    }
    function safeRemove(node){
        try{
            faNodes[i].querySelector(".acInG").remove();
        }catch (e) {
        }
    }
    function TU_addStyle(css, className, addToTarget, isReload){ // 添加CSS代码,不考虑文本载入时间,带有className
        var tout = setInterval(function(){
            addToTarget = addToTarget || "body";
            isReload = isReload || false;
            if(document.querySelector(addToTarget) != null){
                clearInterval(tout);
                if(isReload == true){
                    safeRemove(document.querySelector("."+className));
                }else if(isReload == false && document.querySelector("."+className) != null){
                    // 节点存在 && 不准备覆盖
                    return;
                }
                var cssNode = document.createElement("style");
                if(className != null) cssNode.className = className;
                cssNode.id = "AC-"+className;
                cssNode.setAttribute("type", "text/css")
                cssNode.innerHTML = css;
                try{
                    document.querySelector(addToTarget).appendChild(cssNode);
                }catch (e){console.log(e.message);}
            }
        }, 50);
    }
    function doInsert(){
        if(mCurSite == null) return;
        TU_addStyle(mCurSite.adStyle, "tu-ad-style-remove"); // 添加部分拦截广告的规则
        let insertNode = document.createElement("span");
        insertNode.style = ";width: 4.5rem;cursor: pointer; text-decoration: none; color: red; padding: 0px 5px; border: 1px solid red; font-size: 17px; display: inline-flex; height: 24px; line-height: 24px; margin: 0px 5px;" + mCurSite.sStyle;
        insertNode.innerHTML = "VIP解析";
        insertNode.target = "_balnk";
        insertNode.className = "acInG";
        let title = "";
        try{
            title = document.querySelector(mCurSite.title).innerText.split("   ")[0].trim();
            title = encodeURIComponent(title);
        }catch (e) {
            debugX("找不到节点:" + mCurSite.name);
            debugX(e);
        }
        var url = "http://vip.tujidu.com/vip/?url=" + encodeURIComponent(location.href.replace(/\?[\S]*|#[\S]*/, "")) + "&title="+title;
        insertNode.dataset.url = url;
        insertNode.setAttribute("onclick", "window.open(this.dataset.url);");
        let faNodes = document.querySelectorAll(mCurSite.insertTo);

        for(var i = 0; i < faNodes.length; i++){
            if(faNodes[i].querySelector(".acInG:not([title])") == null){
                debugX("新增按钮");
                safeRemove(faNodes[i].querySelector(".acInG"));
                faNodes[i].appendChild(insertNode.cloneNode(true));
                faNodes[i].setAttribute("acIns", "");
                if(title != "") {
                    faNodes[i].setAttribute("title", title);
                }
            }else{
                faNodes[i].querySelector(".acInG:not([title])").dataset.url = url;
            }
        }
    }
    initSite();
    (function(){
        TU_addStyle(".acInG:hover{color: rgba(255,200,0,30) !important;border: 1px dashed rgba(255,200,100,10) !important;text-shadow: 0 0px rgba(242,33,49,30),0 0px 0px rgba(242,33,49,30),0 1px 1px rgba(242,33,49,30),1px 0 1px rgba(242,33,49,30),-1px 0 1px rgba(242,33,49,30),0 0 1px rgba(242,33,49,30) !important;}");
        document.addEventListener('DOMNodeInserted', function (e) {
            debugX("html文档载入完成");
            if(e.target != null && e.target.className != null && e.target.id.indexOf("AC-") == 0){ return; } //屏蔽掉因为增加css导致的触发insert动作
            doInsert();
        }, false);
    })();
})();