Jump to content
Sign in to follow this  

Youtube video downloader

Recommended Posts

Well I only spent an hour on this so dont be so harsh ;-) It does work with several bugs ....

Basically I spent a few hours trolling and downloading an ever increasing list of youtube shareware video downloaders. Most dont have batch downloading and dont support file renaming. So I decided to have a crack at making my own, I didnt go for an app that downloads directs from youtube but thru the site vixy.net mainly because I like there encoding.

THe probelm I am having is recieving responses from the site when its finished encoding my file and is ready to give me a link to download,currently I put a 40 second sleep which is obviously sub standard. Also I want the youtube site to not load completly , all I do with this extra page is grab the title for file renaming purposes. It just wastes bandwidth by downloading the video twice. Can anyone offer any suggestions on how I can handle webpage responses and maybe not load the youtube page by getting the video title an alternative way.

Also the downloading tray tip doesnt work :-X

You also have to make a file called 'url.txt' , heres some small sample video links to put in there




#include <IE.au3>
#include <file.au3>
AutoItSetOption ("WinTitleMatchMode", 4)
Dim $aRecords
Dim $title
If Not _FileReadToArray("url.txt",$aRecords) Then
   MsgBox(4096,"Error", " Error reading log to Array     error:" & @error)

$oIE = _IECreate("http://vixy.net/")
$oIE2 = _IECreate("http://www.google.com")

For $x = 1 to $aRecords[0]
$oForm  = _IEFormGetCollection($oIE,0)

;put movie url in form
$oURL = _IEFormElementGetObjByName($oForm,'u')

;Select formating option 
;".avi" AVI for Windows (DivX + MP3)
;".mov" MOV for Mac (MPEG4 + MP3)
;".mp4" MP4 for iPod/PSP (MPEG4 + AAC)
;".3gp" 3GP for Mobile (MPEG4 + AAC)
;".mp3" MP3 (audio only)
$oOPT = _IEFormElementGetObjByName($oForm,'e')

;Click button to Process
    $oDoc = _IEDocGetObj ($oIE)
    $forms = _IEFormGetCollection ($oDoc)
        For $form in $forms
            $frmobjs = _IEFormElementGetCollection ($form)
                For $frmobj in $frmobjs
                    $value = $frmobj.value
                    if $value = "Start" Then
                        $butname = $frmobj.name  ; might have to use $frmobj.id instead
                        $oButton = _IEFormElementGetObjByName($form,$butname)
                        _IEAction($oButton, "click")            
                $oDoc = _IEDocGetObj ($oIE2)
                $filename = StringReplace($oDoc.title, "YouTube - ", "") & ".avi"

; Get links off Website         
$oLinks = _IELinkGetCollection ($oIE) 
For $oLink In $oLinks
    if StringInStr($oLink.href,"flvdl?") = True then ;See if the link is download link
    While @InetGetActive
    TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 10, 16)


Firefox's secret is the same as Jessica Simpson's: its effortless, glamorous style is the result of — shhh — extensions!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...