Jump to content
Sign in to follow this  
Jjo

Help needed, video download

Recommended Posts

Jjo

I tried to search solution but every youtube downloader's source code is too complicated.

so what i'm doing wrong here, it says that size is 0.

#include <String.au3>
#include <inet.au3>

$id="XAYhNHhxN0A&feature=related&fmt=18"
$download = "http://www.youtube.com/get_video?video_id=" & $id & ""
MsgBox(0,"File size", InetGetSize($download))
InetGet($download, "D:\music\file.flv", 1, 1)
While @InetGetActive
    TrayTip("",@InetGetBytesRead,1000)
wend
Edited by Melba23
Title adjusted

Share this post


Link to post
Share on other sites
JohnOne

Im no expert but I assume you cant run a funcion within a msgbox (I could be wrong)

I would create a variable with InetGetSize, and then ask the msgbox to display it.

#include <String.au3>
#include <inet.au3>

$id="XAYhNHhxN0A&feature=related&fmt=18"
$download = "http://www.youtube.com/get_video?video_id=" & $id & ""
$s = InetGetSize($download)
MsgBox(0,"File size", $s)
InetGet($download, "D:\music\file.flv", 1, 1)
While @InetGetActive
    TrayTip("",@InetGetBytesRead,1000)

Or something like that

wend

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
Jjo

Still doesn't work, any ideas?

E: got it working, I'll post it too if someone is interested about simple youtube downloader.

 

<snip>

Edited by Melba23
Code removed

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.