Here is a script to download youtube.com videos.
Save this script in file C:/Scripts/Hex2Ascii.txt.
Code:
# Script Hex2Ascii.txt
var str value, replacelist
set $replacelist = " \t%20\n!\t%21\n\"\t%22\n#\t%23\n$\t%24\n%\t%25\n&\t%26\n'\t%27\n(\t%28\n)\t%29\n*\t%2A\n+\t%2B\n,\t%2C\n-\t%2D\n.\t%2E\n/\t%2F\n:\t%3A\n;\t%3B\n<\t%3C\n=\t%3D\n>\t%3E\n?\t%3F\n@\t%40\n[\t%5B\n\\\t%5C\n]\t%5D\n\^\t%5E\n_\t%5F\n`\t%60\n{\t%7B\n|\t%7C\n}\t%7D\n~\t%7E\n"
set $wsep = "\t"
set $lsep = "\n"
var str entry, char, code
lex "1" $replacelist > $entry
while ($entry <> "")
do
wex -p "1" $entry > $char
wex -p "2" $entry > $code
while ( { sen ("^"+$code+"^") $value } > 0 )
sal ("^"+$code+"^") $char $value > null
lex "1" $replacelist > $entry
done
echo $value
save this script in file C:/Scripts/youtube.txt.
Code:
# Script youtube.txt
var str videolink, savefile, server, url
isstart "mysession" "description" "Mozilla/4.0"
iscon "mysession" "http://www.youtube.com" > null
stex "^.com^]" $videolink > null ; stex "[^&^2" $videolink > null
isret "mysession" $videolink > $url
stex "^fmt_url_map=^]" $url > null ; stex -r "[^(]&\n)^" $url > null
script "Hex2Ascii.txt" value($url) > $url
stex -c "]^http^" $url > null
stex -c "^.com^]" $url > $server
isdiscon "mysession"
iscon "mysession" $server > null
# $url has 3 urls separated by |, presumebly alternate urls for streaming video. Get the first url.
stex "[^|^" $url > null
# Remove the last comma from $url1.
stex "[^,^l" $url > null
isret -b "mysession" $url > null
# Save video
issave -b "mysession" ($savefile+".flv")
isdiscon "mysession"
isend "mysession"
Scripts are in biterscripting. You can translate them to another scripting language (please post your translated versions for others). To try the script, start biterscripting, copy and paste this command into it.
Code:
script youtube.txt videolink("http://www.youtube.com/watch?v=VZb177urjY8&feature=related") savefile("C:/funnydog")
It will download the video of the funny dog and save it into file C:/funnydog.flv. You can download your favorite video - right click on the video link, select properties, copy the URL, and paste it into above command instead of "http://www.youtube.com/watch?v=VZb177urjY8&feature=related" for the videolink() argument.
Bookmarks