Greasy Fork镜像 还支持 简体中文。

DY无水印解析

DY

目前為 2022-08-25 提交的版本,檢視 最新版本

// ==UserScript==
// @name         DY无水印解析
// @namespace    http://tampermonkey.net/
// @version      0.4
// @description  DY
// @author       You
// @include        https://*.douyin.com/*
// @include        https://*.iesdouyin.com/*
// @grant        GM_xmlhttpRequest
// @grant        GM_notification
// @require      https://code.jquery.com/jquery-3.6.0.min.js
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';
    let url_prefix = 'https://www.iesdouyin.com/web/api/v2/aweme/iteminfo/?item_ids=';
    let location = window.location.href;

    let id = 0;
    if(window.location.href.includes('iesdouyin'))
        id = location.match('video/(.*)/')[1];
    else
        id = location.match('video/(.*)(#|$)')[1];


    const url = url_prefix + id;
    console.log('Request:'+url);

    $(".xg-video-container").before('<span id="dy_loading" style="position:absolute;color:#FFF;">解析中...</span>')

    var toNew = function(url){
        window.open();
        location.href(url);
    }
    GM_xmlhttpRequest({
        method: "get",
        url: url,
        onload: function(response){
            $("#dy_loading").remove();
            let data = JSON.parse(response.responseText);
            let play_url = (data.item_list[0].video.play_addr.url_list[0]).replace('wm','');
            let mp3_url = (data.item_list[0].music.play_url.url_list[0]);

            console.log(' MP4:',play_url);
            console.log(' MP3:',mp3_url);

            $(".xg-video-container").before('<a href='+play_url+' target="_blank" style="opacity:0.5;position:absolute;left:0;top:0;z-index: 999;background:#fff;">MP4</a>');
            $(".xg-video-container").before('<a href='+mp3_url+' target="_blank" style="opacity:0.5;position:absolute;left:3em;top:0;z-index: 999;background:#fff;">MP3</a>');

            $(".btn-wrap").append('<div class="login-btn" onclick="window.open(\''+play_url+'\')" target="_blank" style="opacity:0.5;z-index: 999;background:#fff;">MP4</div>');
            $(".btn-wrap").append('<div class="login-btn" onclick="window.open(\''+mp3_url+'\')" target="_blank" style="opacity:0.5;z-index: 999;background:#fff;">MP3</div>');

        }
    })



    // Your code here...

})();

QingJ © 2025

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