您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Vimeo视频下载脚本,可以在视频下方生成下载按钮,只支持含有1080p的视频,有个跨域请求,请允许该操作,可到上面我的博客反映Bug。
当前为
// ==UserScript== // @name Vimeo视频下载脚本 // @namespace https://zhang18.top // @version 0.2 // @description Vimeo视频下载脚本,可以在视频下方生成下载按钮,只支持含有1080p的视频,有个跨域请求,请允许该操作,可到上面我的博客反映Bug。 // @author ZLOE // @match https://player.vimeo.com/video/*?autoplay=1 // @match https://vimeo.com/* // @grant GM_xmlhttpRequest // @grant GM_download // @require https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js // ==/UserScript== (function() { 'use strict'; //获取视频下载链接 function get_mp4(text){ var re = /aaa(\S*?)fff/ var re_str = /"width":1920,"mime":"video\/mp4","fps":23,"url":"(\S*?)","cdn":"akamai_interconnect","quality":"1080p"/ var find = text.match(re_str)[1]; return find } //请求HTML function get_find(url){ GM_xmlhttpRequest({ method: "GET", url: url, onload: function(res) { console.log("请求HTML成功!") if (res.status == 200) { var text = res.responseText; var find = get_mp4(text) console.log(find) $('.clip_info-subline--watch .sc-jhAzac').after("<button class='sc-jhAzac cejtKN' style='margin-left: 20px;'><a href='"+find+"' style='color:rgb(248, 249, 250)'>+ 下载</a></button>") } } }); } //判断是否有下载按钮 var text = $(".CyyRw .bwClz .eEsEgP").text() if (text != 'DownloadShare'){ var url = $('meta[property="og:video:url"]').attr("content") console.log("获取url成功") //调用获取下载链接函数 get_find(url) }else{ console.log("已经有下载链接了!") } // Your code here... })();