Greasy Fork is available in English.
发现网页果然是开放的技术,抖音视频在网页版随手一个F12就能下载,就随手做了这个脚本,随手分享一下,不知道能活多久。用于抖音网页版。
当前为
// ==UserScript==
// @name 抖音视频下载
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 发现网页果然是开放的技术,抖音视频在网页版随手一个F12就能下载,就随手做了这个脚本,随手分享一下,不知道能活多久。用于抖音网页版。
// @author Fyratree
// @match https://www.douyin.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant GM_registerMenuCommand
// @grant GM.registerMenuCommand
// @license none
// ==/UserScript==
(function() {
'use strict';
function download () {
if (!document.querySelector('xg-video-container.xg-video-container video')) return
if (!document.querySelector('xg-video-container.xg-video-container video').lastChild) return
window.open(document.querySelector('xg-video-container.xg-video-container video').lastChild.src)
}
/*以下代码参考了Picviewer CE+的代码*/
var _GM_registerMenuCommand
if(typeof GM_registerMenuCommand!='undefined'){
_GM_registerMenuCommand=GM_registerMenuCommand;
}else if(typeof GM!='undefined' && typeof GM.registerMenuCommand!='undefined'){
_GM_registerMenuCommand=GM.registerMenuCommand;
}else{
_GM_registerMenuCommand=(s,f)=>{};
console.log('[抖音视频下载]当前脚本管理器不支持菜单命令,无法下载视频。')
}
/*感谢Picviewer CE+的作者大佬们,写的脚本随便一段代码都可以帮助我这样的小白*/
_GM_registerMenuCommand('下载或打开当前视频直链', download)
})();