Jump to content

The inetGet problem - downloaded file 0 kb


Recommended Posts

This gives me a file autoit-v3-setup.exe that is 0 kb :pirate: What really is the problem ? Any idea

InetGet("http://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe", "D:\autoit-v3-setup.exe", 1)

Gracias for any help :)

Edited by vij
Link to comment
Share on other sites

It works for me as written, except I don't have a D: drive, but other than that it works fine.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

This gives me a file autoit-v3-setup.exe that is 0 kb :pirate: What really is the problem ? Any idea

InetGet("http://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe", "D:\autoit-v3-setup.exe", 1)

Gracias for any help :)

Maybe you don't have sufficient permissions to write to D:. It doesn't matter if you are administrator if you run modern windows systems, you would still need to #RequireAdmin. Better solution is to simply use location you can write to (AppdataDir for example).

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

It works for me as written, except I don't have a D: drive, but other than that it works fine.

Oops... the file now shows as downloaded fully... maybe it just took a while... silly me :zorro:

The file is 0 Kb until the download is finished

Correct mikel

This was a test ex...I was not able to do it for a particular dynamic url(requiring the user to be logged in) so thought this would be the same... I will get back with more info :)

Edited by vij
Link to comment
Share on other sites

Guys

I have a dowload link which works only if I am logged into the site. So I login to the site(used _IE UDF) etc and then extracted the download link and then used it like this

InetGet("https://ahrefs.com/site-explorer/explorer_export.php?hash=07583511eee6896bb08af2edfe3bfdf1&export_type=3&tab=backlinks&charset=utf-8&backlinks_type=not_sitewide-href-all-all-all&unique_domains=1", "D:\testers.csv", 1)

But it doesnt download - gives me tester.csv with 0 kb.

But when I type that url into the browser, I am able to manually download... Whats going on guys.

Gius, please note you cannot use that link to manually download yourself(paid membership site) as one needs to be logged into the site to download(I am logged in using _IE stuff and still cant download)

Any ideas?

Edited by vij
Link to comment
Share on other sites

From the help file:

To use a username and password when connecting simply prefix the servername with "username:password@", e.g.

"http://myuser:mypassword@www.somesite.com"

This might be all you'd need to change.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

From the help file:

This might be all you'd need to change.

I tried. Doesnt work.. I think that is for a site that requires username and password to even open a page. This site doesnt need that to connect. It is open for all, but only needs user to be logged in for the extracted download link to function.

Edited by vij
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...