Jump to content
Sign in to follow this  
Muhammad_Awais_Sharif

how to download this link using innet get

Recommended Posts

$Surl = "http://download.oracle.com/otn-pub/java/jdk-nb/8u101-8.1/jdk-8u101-nb-8_1-windows-x64.exe"

MsgBox(0,"Size of File",InetGetSize($Surl))

this is simplest code 

 

When i tried to download with this function 
I am getting same thing 

$Surl = "http://download.oracle.com/otn-pub/java/jdk-nb/8u101-8.1/jdk-8u101-nb-8_1-windows-x64.exe"



_DownloadProgress($Surl, "jdk-8u101-nb-8_1-windows-x64.exe","jdk with Netbeans")

Func _DownloadProgress($FileURL, $FileName, $ProgramName)

    $FileSaveLocation = @ScriptDir & "\" & $FileName
    $FileSize = InetGetSize($FileURL)
    $FileDownload = InetGet($FileURL, $FileSaveLocation, 0, 1)

    Do
        $Percentage = InetGetInfo($FileDownload, 0) * 100 / $FileSize
        ConsoleWrite(Round($Percentage, 0) & @CRLF)

        ConsoleWrite(Round($Percentage, 0) & "% Downloaded " & Round(InetGetInfo($FileDownload, 0) / 1048576, 2) & " of " & Round($FileSize / 1048576, 2) & " MB" &@CRLF)
        Sleep(550)
    Until InetGetInfo($FileDownload, 2)

EndFunc

It's original size is 312 MB

But i am getting 5307 with InetGetSize

 

Share this post


Link to post
Share on other sites

This is not a normal link 

it has some id with it 

for example when i give http://download.oracle.com/otn-pub/java/jdk-nb/8u101-8.1/jdk-8u101-nb-8_1-windows-x64.exe link to Internet Download Manager.I don't know what it does but it get url some thing like this

http://download.oracle.com/otn-pub/java/jdk-nb/8u101-8.1/jdk-8u101-nb-8_1-windows-x64.exe?AuthParam=1474790381_0fee755787a7d73f2f42549cee65ab35

 

So can i do something with Autoit that it will get this authParam ?

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