Go Back   TechArena Community > Software > Tips & Tweaks
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Thread Tools Search this Thread
Old 12-04-2010
Join Date: Dec 2009
Posts: 23
Tip: Small script to download youtube videos

Here is a script to download youtube.com videos.

Save this script in file C:/Scripts/Hex2Ascii.txt.
# 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 <> "")
    wex -p "1" $entry > $char
    wex -p "2" $entry > $code
    while ( { sen ("^"+$code+"^") $value } > 0 )
        sal ("^"+$code+"^") $char $value > null
    lex "1" $replacelist > $entry
echo $value

save this script in file C:/Scripts/youtube.txt.
# 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.

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.
Reply With Quote
Old 01-05-2010
Join Date: May 2009
Posts: 245
Re: Tip: Small script to download youtube videos

This is quiet an nice option where you get a automated service to download and install youtube videos. I am using a addon extension on firefox called as download helper. This small addon offers you direct download of youtube videos in flv format on your hard drive. That the most easiest way I think about the same.
Reply With Quote

  TechArena Community > Software > Tips & Tweaks
Tags: , , , ,

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads for: "Tip: Small script to download youtube videos"
Thread Thread Starter Forum Replies Last Post
Internet Download Manager fails to download videos from Youtube in Windows 7 ronaldobrazil Windows Software 7 24-05-2013 02:17 PM
Download YouTube videos as MP4 KAMAL60 Windows Software 5 27-12-2009 12:46 AM
Download youtube videos to wmv Giriraj Technology & Internet 3 14-08-2009 04:25 PM
How to download videos from youtube? rohit007 Windows Software 8 13-09-2008 08:36 AM
Can't download videos from YouTube. Dolla Windows XP Support 2 22-04-2008 01:11 AM

All times are GMT +5.5. The time now is 11:34 PM.