LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-04-2010, 12:08 PM   #1
nglnx3
LQ Newbie
 
Registered: Mar 2010
Posts: 3

Rep: Reputation: 0
using wget to download .zip files


Hello,

I am having troubles using wget to download .zip files, the problem is that wget is just downloading the index.html file, no the .sip file that I want.

I have tried several options like --level=0, --np -r, --no-parent, etc etc.

My command is something like:

wget -P/get --level=0 --load-cookies=my-cookies.txt -A.zip http://page.page.company.com/valid/t...e/last9876.zip --no-check-certificate

I am not getting any error, just something like:

100%[==================================================================>] 4,416 --.--K/s

12:51:46 (350.95 MB/s) - `/get/index.html?"http:%2F%2Fpage.page.company.com%2Fvalid%2Ftest%2Fanothertest%2Frelease%2Fwin_nlm_releas e%2Flast9876.zip"' saved [4416/4416]

but if I go th the folder /get I just have the html document.

Please help!!
 
Old 03-04-2010, 12:25 PM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
try
Code:
wget -P /get --level=0 --load-cookies=my-cookies.txt --no-check-certificate -A .zip http://page.page.company.com/valid/t...e/last9876.zip
You don't need to specify the -A .zip anyway. Or --no-check-certificate, and --load-cookies is expecting to find the cookie in the same directory as you are running the command from. Is it a netscape/firefox/IE cookie ? Do you need a cookie ?

If the site redirects everything to the front page then you're out of luck.

Last edited by smoker; 03-04-2010 at 12:28 PM.
 
Old 03-04-2010, 12:42 PM   #3
nglnx3
LQ Newbie
 
Registered: Mar 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by smoker View Post
try
Code:
wget -P /get --level=0 --load-cookies=my-cookies.txt --no-check-certificate -A .zip http://page.page.company.com/valid/t...e/last9876.zip
You don't need to specify the -A .zip anyway. Or --no-check-certificate, and --load-cookies is expecting to find the cookie in the same directory as you are running the command from. Is it a netscape/firefox/IE cookie ? Do you need a cookie ?

If the site redirects everything to the front page then you're out of luck.
I tried both, with -A .zip and without it.
I am using --no-check-certificate, because if not I get a certification verification error and doesn't download anything.
I created my.cookies.txt with this command: --post-data='s-login=myuser&s-pass=mypwd' --save-cookies=my-cookies.txt --keep-session-cookies

I am using that because I have to login to the page. I also tried setting directly in the command the user and password.

and yes, seems that the login page redirects the another login page.

My page is like: http://page.page.company.com/ and redirects to https://page.page.company.com/ICSLogin/
 
Old 03-04-2010, 01:12 PM   #4
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
So why are you using the http address instead of the https address in the wget command ?
 
Old 03-04-2010, 02:04 PM   #5
nglnx3
LQ Newbie
 
Registered: Mar 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by smoker View Post
So why are you using the http address instead of the https address in the wget command ?
I have tried with both. If I use https I get "ERROR: Certificate verification error for : self signed certificate in certificate chain"

to access the page manually I don't need https and I don't have to accept or add any certificate. =/
 
Old 03-05-2010, 06:03 PM   #6
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,146
Blog Entries: 6

Rep: Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833
can you use curl to see where the .zip is actually sitting. If you are getting a .html file then the link is a redirect. Find out where the .zip is sitting.

The link you gave is no good. Post a valid link and I'll look.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] wget: download multiple files Steve W Linux - Software 6 05-25-2009 11:29 AM
wget - download cgi files estratos Linux - Software 7 02-06-2009 06:36 AM
download only zip files using wget command Fond_of_Opensource Linux - Newbie 1 08-09-2006 03:47 AM
wget fail to download pdf files powah Linux - Software 2 05-04-2006 03:38 PM
wget download all files of certain type GT_Onizuka Linux - Software 1 05-10-2004 08:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration