Results 1 to 2 of 2

Thread: Tip: Small script to download youtube videos

  1. #1
    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.
    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.

  2. #2
    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.

Similar Threads

  1. Replies: 7
    Last Post: 24-05-2013, 01:47 PM
  2. Download YouTube videos as MP4
    By KAMAL60 in forum Windows Software
    Replies: 5
    Last Post: 27-12-2009, 12:16 AM
  3. Download youtube videos to wmv
    By Giriraj in forum Technology & Internet
    Replies: 3
    Last Post: 14-08-2009, 03:55 PM
  4. How to download videos from youtube?
    By rohit007 in forum Windows Software
    Replies: 8
    Last Post: 13-09-2008, 08:06 AM
  5. Can't download videos from YouTube.
    By Dolla in forum Windows XP Support
    Replies: 2
    Last Post: 22-04-2008, 12:41 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,638,559,512.62789 seconds with 16 queries