Already stated in the first post...the above script is only for youtube videos having size less than 100Mb only
Why not check if the clipboard already contains an url and just confirm if the user wants to download it / let him type one if none was found? Surrounding spaces or quotes are removed automatically.i have added option to download from the clipboard or type URL
Code: Select all
// Check clipboard if it contains a youtube url
$cp = formatlist("<clipboard>", "tu");
if (regexreplace($cp, "https?://www\.youtube", "") != $cp) {
$url = input("Do you want to download from the following source?", , $cp, , , 400, 200);
} else {
$url = input("Please insert the youtube url:", , , , , 400, 200);
if ($url == "") {
status "No url provided, aborted", FF0000, "alert";
end(true);
}
}
$YoutubeSource_All = readurl($url);