punisa Posted October 15, 2008 Share Posted October 15, 2008 (edited) hello, I have a rather fun challenge for a script. I tried myself, but haven't succeed yet, I'll keep trying anyway.What's it about? If you love British humor they you'll love developing this script I just found yesterday a user on youtube who posted all Black Adder episodes and has them organized in one big playlist (link here: http://www.youtube.com/user/nirbateman ) You can find it under playlist (112 videos)I have some "FLV get" firefox addons which work as expected, but it would be really fun to "somehow" make a script that would run through all of those videos and download them to specific folder.I'm not sure how to start this, I know that there is a certain pattern and the loop could be created.Any suggestions? Edited October 15, 2008 by punisa carpe diem Link to comment Share on other sites More sharing options...
dbzfanatic Posted October 15, 2008 Share Posted October 15, 2008 If you can read the playlist just get the file locations and use INetGet(). Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
punisa Posted October 15, 2008 Author Share Posted October 15, 2008 If you can read the playlist just get the file locations and use INetGet().I'm not sure how would I read the playlist, I presume get the actual FLV links? I dunno how, I only download the FLV files with a FLV getter. carpe diem Link to comment Share on other sites More sharing options...
torels Posted October 15, 2008 Share Posted October 15, 2008 (edited) Func _download($code) $yourpath = @desktopdir & "\youtube videos" $innertxt = _INetGetSource("http://it.youtube.com/watch?v=" & StringReplace(GUICtrlRead($code), " ", "")) $t = _StringBetween($innertxt, "&t=", "&hl=") $url = "video_id=" & $code & "&t=" & $t[0] $t = _StringBetween($innertxt, "&title=", "';") $title = $t[0] $img_url = "http://i.ytimg.com/vi/" & $code & "/default.jpg" InetGet("http://youtube.com/get_video?" & $url, $yourpath & $title & ".flv", 0, 1) $size = InetGetSize("http://youtube.com/get_video?" & $url) ProgressOn("Downloading","Getting youtube videos") While 1 ProgressSet(Floor(@InetGetBytesRead * 100 / $size)) WEnd ProgressOff() EndFunc ;==>_download this will do the job Edited October 15, 2008 by torels Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org Link to comment Share on other sites More sharing options...
punisa Posted October 15, 2008 Author Share Posted October 15, 2008 Func _download($code) $innertxt = _INetGetSource("http://it.youtube.com/watch?v=" & StringReplace(GUICtrlRead($code), " ", "")) $t = _StringBetween($innertxt, "&t=", "&hl=") $url = "video_id=" & $code & "&t=" & $t[0] $t = _StringBetween($innertxt, "&title=", "';") $title = $t[0] $img_url = "http://i.ytimg.com/vi/" & GUICtrlRead($code) & "/default.jpg" InetGet("http://youtube.com/get_video?" & $url, GUICtrlRead($path_edit) & $title & ".flv", 0, 1) $size = InetGetSize("http://youtube.com/get_video?" & $url) ProgressOn("Downloading","Getting youtube videos") While 1 ProgressSet(Floor(@InetGetBytesRead * 100 / $size)) WEnd ProgressOff EndFunc ;==>_download this will do the job Looks like a nice script : ) But, pardon my n00bnes sir, how would one use it? BTW, autoit (scite) gave me an error so I turned "ProgressOff" into "ProgressOff()", is that correct? carpe diem Link to comment Share on other sites More sharing options...
torels Posted October 15, 2008 Share Posted October 15, 2008 (edited) yes it is anywayjust call the function and write the youtube code (the 11 character one after the http://youtube.com/?watch=) as a parameterI am working on a function to retrieve all elements in a playlist but it won't work XDanyway copy again the code since I made some little changescheers! Edited October 15, 2008 by torels Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org 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