Eusebio Posted October 6, 2006 Share Posted October 6, 2006 (edited) The download file must be renamed to extension .flv and then you can see the video with flv viewer or convert to other formats (avi,mpg) with your prefered tools.#include <INet.au3> #include <IE.au3> Local $sYouTubeLink="http://www.youtube.com/watch?v=lv4Potdpjhw" Local $oIE $sYouTubeLink=InputBox("Download YouTube videos","YouTube link:", $sYouTubeLink) if stringlen($sYouTubeLink)=0 Then Exit EndIf $sCode=_INetGetSource ($sYouTubeLink) $s_t=StringRegExp($sCode, "&t=(.*?)&", 3) $s_v=stringmid($sYouTubeLink,stringinstr($sYouTubeLink,"v=")+2) $sDownloadLink="http://youtube.com/get_video?video_id=" & $s_v & "&t=" & $s_t[0] $oIE=_IECreate ($sDownloadlink,0, 0, 1)The code could be better, you can change and post here.I would like detect when cancel download button is pressed for abort/exit script. Edited November 6, 2013 by Melba23 Title adjusted WhoIsYouTube Video downloaderSoundex - SoundexEx - Levenshtein Distance (algorithms)[font="Arial"]I3osé[/font][font="Arial"]AutoIT[/font] Link to comment Share on other sites More sharing options...
FuryCell Posted October 6, 2006 Share Posted October 6, 2006 This is awesome. Now I just need to use a program to convert to mp4. Thanks for sharing. HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
FuryCell Posted October 6, 2006 Share Posted October 6, 2006 (edited) Made the cancel button function like you asked. #include <INet.au3> #include <IE.au3> Local $sYouTubeLink="http://www.youtube.com/watch?v=lv4Potdpjhw" Local $oIE $sYouTubeLink=InputBox("Download YouTube videos","YouTube link:", $sYouTubeLink) If @Error then Exit if stringlen($sYouTubeLink)=0 Then Exit EndIf $sCode=_INetGetSource ($sYouTubeLink) $s_t=StringRegExp($sCode, "&t=(.*?)&", 3) $s_v=stringmid($sYouTubeLink,stringinstr($sYouTubeLink,"v=")+2) $sDownloadLink="http://youtube.com/get_video?video_id=" & $s_v & "&t=" & $s_t[0] $oIE=_IECreate ($sDownloadlink,0, 0, 1) Edited October 6, 2006 by SolidSnake Ivan_Zindl 1 HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
ConsultingJoe Posted October 6, 2006 Share Posted October 6, 2006 This looks very Cool. I cant wait to try it. Did you know there is a site out there that does this. maybe it would be smother to do a get method to there site and make them do all the work Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
FuryCell Posted October 6, 2006 Share Posted October 6, 2006 This looks very Cool. I cant wait to try it.Did you know there is a site out there that does this.maybe it would be smother to do a get method to there site and make them do all the workWould you mind posting a link to the site? HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
Eusebio Posted October 6, 2006 Author Share Posted October 6, 2006 (edited) In this page you can do the same:http://javimoya.com/blog/youtube.phpEusebio. Edited October 6, 2006 by Eusebio WhoIsYouTube Video downloaderSoundex - SoundexEx - Levenshtein Distance (algorithms)[font="Arial"]I3osé[/font][font="Arial"]AutoIT[/font] Link to comment Share on other sites More sharing options...
Administrators Jon Posted October 6, 2006 Administrators Share Posted October 6, 2006 I use the VideoDownloader plugin in Firefox. But this is cool too Deployment Blog:Â https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming:Â https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Eusebio Posted October 6, 2006 Author Share Posted October 6, 2006 Yes, of course.. There are many ways to download from youtube, but this is in autoIt and you can look how work the other tools... WhoIsYouTube Video downloaderSoundex - SoundexEx - Levenshtein Distance (algorithms)[font="Arial"]I3osé[/font][font="Arial"]AutoIT[/font] Link to comment Share on other sites More sharing options...
ConsultingJoe Posted October 6, 2006 Share Posted October 6, 2006 In this page you can do the same:http://javimoya.com/blog/youtube.phpEusebio.That is a great tool, I just got it. there are a lot of site that do this too, for example: http://keepvid.com/but the Firefox tool is the best Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
GtaSpider Posted October 6, 2006 Share Posted October 6, 2006 Hi! Nice work! I've ReWritten it with a GUI and so one: expandcollapse popup#include <GUIConstants.au3> #include <inet.au3> #Region ### START Koda GUI section ### Form= GUICreate("You Tube", 223, 114, 193, 121, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE)) $DwnInput = GUICtrlCreateInput("http://www.youtube.com/watch?v=", 8, 24, 201, 21) GUICtrlCreateLabel("You Tube Download Link:", 8, 8, 198, 15) $start = GUICtrlCreateButton("&Start", 8, 48, 99, 25, 0) $Progress = GUICtrlCreateProgress(8, 80, 202, 16) $abb = GUICtrlCreateButton("A&bbort", 112, 48, 99, 25, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $start GUICtrlSetState($start,$GUI_DISABLE) $dwnlink = GUICtrlRead($DwnInput) $sCode=_INetGetSource ($dwnlink) $s_t=StringRegExp($sCode, "&t=(.*?)&", 3) $s_v=stringmid($dwnlink,stringinstr($dwnlink,"v=")+2) $save = FileSaveDialog("Save SWF","","Flash(*.swf)",-1,$s_v) If StringRight($save,4) <> ".swf" Then $save&=".swf" _Download("http://youtube.com/get_video?video_id=" & $s_v & "&t=" & $s_t[0],$save,$Progress) GUIDelete() MsgBox(0,"","Done!") Exit EndSwitch WEnd ;By GtaSpider Func _Download($site,$punkt,$prog=0) $orisize = InetGetSize($site) InetGet($site,$punkt,1,1) If $prog = 0 Then ProgressOn("Download","") Do $msg = GUIGetMsg() If $msg = $abb Then If MsgBox(4,"","Abbort?") = 6 Then Exit EndIf $size1 = FileGetSize($punkt) $MBsize1 = FileGetSize($punkt) ;~ $Prozent = $size1 / $orisize * 100 $inetget = @InetGetBytesRead $Prozent = (100 * $inetget ) / $orisize $decimalplace = Round ($Prozent) $decimalplaceMBsize1 = Round (@InetGetBytesRead / 1024) If $prog = 0 Then ProgressSet ($Prozent, $decimalplace & "% " & "(" & $decimalplaceMBsize1 & ") Kb has been Downloaded.") Else GUICtrlSetData($prog,$Prozent) EndIf Until @InetGetActive = 0 If $prog = 0 Then ProgressOff () Return $punkt EndFunc Spider www.AutoIt.de - Moderator of the German AutoIt Forum  Link to comment Share on other sites More sharing options...
Eusebio Posted October 6, 2006 Author Share Posted October 6, 2006 (edited) Fantastic GUI (with download progress). Thanks for rewrite and do better the code (only with inet). Now is perfect. Eusebio. Edited October 6, 2006 by Eusebio WhoIsYouTube Video downloaderSoundex - SoundexEx - Levenshtein Distance (algorithms)[font="Arial"]I3osé[/font][font="Arial"]AutoIT[/font] Link to comment Share on other sites More sharing options...
Richard Robertson Posted October 6, 2006 Share Posted October 6, 2006 Nice job. I've had a program that did this for about a week, but I trust this one more. Link to comment Share on other sites More sharing options...
Paulie Posted October 7, 2006 Share Posted October 7, 2006 How do you play the downloaded file? I got a file called 'get_video' with no extension How do you use it? Link to comment Share on other sites More sharing options...
Vivvic Posted October 7, 2006 Share Posted October 7, 2006 Nice file, I love it, one sugestion I had though, maby add this http://www.wimpyplayer.com/products/wimpy_...flv_player.html its a standalone flv player so maby could incorporate it to download them and be able to play them all in one nice program^^ [quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote] Link to comment Share on other sites More sharing options...
Eusebio Posted October 7, 2006 Author Share Posted October 7, 2006 (edited) Hi Paulie,You must put ".flv" extension to the download file. Then you can view the video with a flv player or use another tool for convert the file to other format like: avi,mpg... I use "cinemaforge 2.0" you can download it from this link: http://www.download.com/CinemaForge/3000-2...4-10496506.htmlEusebio. Edited October 7, 2006 by Eusebio WhoIsYouTube Video downloaderSoundex - SoundexEx - Levenshtein Distance (algorithms)[font="Arial"]I3osé[/font][font="Arial"]AutoIT[/font] Link to comment Share on other sites More sharing options...
AzKay Posted October 7, 2006 Share Posted October 7, 2006 Heres an idea, Now make an flv player with autoit that previews the dowloaded file # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
ConsultingJoe Posted October 7, 2006 Share Posted October 7, 2006 (edited) Hi Paulie,You must put ".flv" extension to the download file. Then you can view the video with a flv player or use another tool for convert the file to other format like: avi,mpg... I use "cinemaforge 2.0" you can download it from this link: http://www.download.com/CinemaForge/3000-2...4-10496506.htmlEusebio.Now how do you get the flv file from a swf like this: http://www.cyberzerocool.com/projectsNote: there is no preloader so just wait a sec before you play it Edited October 7, 2006 by zerocool60544 Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
dlshoong Posted October 17, 2006 Share Posted October 17, 2006 Is there anyway to se the download speed? Link to comment Share on other sites More sharing options...
RazerM Posted October 28, 2006 Share Posted October 28, 2006 Using @InetGetBytesRead and a timer, you could work it out. My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop. Link to comment Share on other sites More sharing options...
busysignal Posted October 29, 2006 Share Posted October 29, 2006 @Eusebio, very cool tool. I have been getting the .FLV or .SWF files from my cache. This helps out a lot.. Thx to @GtaSpider for the GUI. Cheers.. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now