JS to export subtitles from VEED
作者:互联网
JS to export subtitles from VEED - Online Video Editor - Video Editing Made Simple
var subtitles = document.getElementsByClassName('TextEditorStyled__Group-sc-nw7y0k-5 dDCwC'); let srcs = ""; for(var i = 0; i < subtitles.length; i ++) { var from = subtitles[i].getElementsByClassName("TimeInput__StyledInput-sc-3qy9xb-0 fYJwAF")[0].value.replace(".", ","); var to = subtitles[i].getElementsByClassName("TimeInput__StyledInput-sc-3qy9xb-0 fYJwAF")[1].value.replace(".", ","); var text = subtitles[i].getElementsByClassName("subtitle-row")[0].getElementsByTagName("textarea")[0].value; //console.log("00:%s00 --> 00:%s00\r\n%s", from, to, text); srcs += `${i+1}\r\n00:${from}00 --> 00:${to}00\r\n${text}\r\n\r\n`; } srcs += "\r\n"; console.log(srcs);
标签:__,00,getElementsByClassName,VEED,srcs,export,var,subtitles 来源: https://www.cnblogs.com/maizhongfei/p/16439062.html