header={ "recipe_version": "1.8", "title": "Video downloader yt-dlp", "description": "Download video from a given url", "tags": "Video,download,YouTube,Vimeo,Facebook,Dailymotion,Instagram,SoundCloud,Twitter,TikTok,Reddit,Tumblr,Pinterest,LinkedIn,Flickr,Twitch,LiveLeak,Veoh,Metacafe,TED,BBC iPlayer,CNN,ESPN,NBC,ABC,CBS,Fox News,Vimeo OTT,Bilibili,Niconico,Coub,Bandcamp,Mixcloud,8tracks,The New York Times,The Guardian,Vice,Udemy,Khan Academy,Coursera,Lynda,Adobe Connect,Xvideos,RedTube,PornHub,XHamster,YouPorn,XVideos-Downloader,Odysee,LBRY,Steam,NFL,NBA", "chef": "BeatRig", "dependencies": "yt-dlp", "spice": "BQ==:G+Hy36kJcnQQYYavb/JV2Il6eCYr6h4hRJHCF9rRbhX5BcazL6cuTgUMdz0xA50VWA5PmmV0Q7aWkiUtNFtbk991l+t0e8IBXMReMIT1GNjnZZDv7n2YRAo0xcSQbY0ixjG6LLH4wGKnspKAoA/v69iLn6N2IH0XzIZwTGdHSo4=", "time": 1699139981, "core_version": "0.6.2", "magnetron_version": "1.0.282", "functions": "main,onAbout", "uuid": "42949e3b94894f5e9aa8fd82e740b802", "instructions": "Run this recipe and enter the url of a video to download. Powered by youtube-dl, many platforms are supported, among; YouTube, Vimeo, Dailymotion, Facebook, Twitter, Instagram, SoundCloud, Twitch ect.", "type": "default", "os": "windows", "palette": "Clean Slate", "flavour": "r3TKgbnduZSsE8rqk8cQjT9i7PXT+v8XXVEoiU7OuDpVltFuYAnq2gbzHD8FRsvDf3VKs2+RPH1tR4qFGGQ+MJqWXj/9O9Ft+kSKgxMTEYcpKkvzbCXBWV2uEEM+/hKvnJPGq0x8+9D56363oMP+O8FWoLAY/Wy5qhZO2o83Llk=" }; /*---------------------------------------------------------------------------- https://github.com/ytdl-org/youtube-dl/releases https://github.com/ytdl-org/youtube-dl/blob/master/docs/supportedsites.md //var targetpath = openFolderDialog("select a save location", folders.output + gvar.pss); //args = ["--write-sub", "--sub-lang", "en", "--skip-download", "--output", targetpath + gvar.pss + "%(title)s.%(ext)s", url]; */ function CheckDependencies() { dependencies = header.dependencies.split(","); for (i=0; i 0) { setProgress(-1); args = ["--output", r.target + gvar.pss + "%(uploader)s-%(id)s.%(ext)s", r.url]; echo(objectToString(args)); cmd_r = (cmd("yt-dlp", args)); echo(cmd_r); error = findSubString(cmd_r, "ERROR:", "\n"); if (error.length > 0) abort(error); setProgress(100); } setMainMessage("done"); } function cmd_callback(cmd_name, cmd_output) { if (cmd_output.length > 0) { echo(cmd_name + " " + cmd_output); newPrecStr = findSubString(cmd_output, "[download]", "%"); echo(newPrecStr); p = toFixed(parseFloat(newPrecStr), 1); setProgress(p); setMainMessage(p + "%"); } return { "terminate": isCanceled(), // use this option to end the process if there is no better alternative "input": "" // send console input, like a quit signal (followed by a 'return' 0x0D) }; } function onAbout() { dialog( header.title, header.description, "i" ); } function dialog_callback(props) { if (props["name"] == "target") { echo(objectToString(props)); setGlobalVar("target_folder_" + header.uuid, props.path); } }