You are now on my old blog. Please update your bookmarks to my new blog
http://laurentschneider.com




15 September 2006

wget from otn

wget is a well-known command line utility for downloading files from the internet/intranet.

I like to use the limit-rate, so that my coworkers still can surf. Until today, I never succeeded to download from otn, because wgetting software required me to log in and accept the export restriction

How to automate login is actually extremly easy :

1) open your mozilla browser, go to the page, login, accept the export, download the file, click properties, copy paste the "Saving From", Cancel
2) find out where is located your cookies.txt file

$ find $HOME -name "cookies.txt"
/home/lsc/.mozilla/default/86iy2n5j.slt/cookies.txt

3) wget

$ wget --load-cookies /home/lsc/.mozilla/default/86iy2n5j.slt/cookies.txt --limit-rate 250k http://download-uk.oracle.com/otn/compaq/oracle10g/10202/10202_database_HP-Tru64.zip
100%[++++++++++++++++++++++++++++======>] 1,081,211,566 254.98K/s ETA 00:00

16:48:05 (249.99 KB/s) - `10202_database_HP-Tru64.zip.1' saved [1,081,211,566/1,081,211,566]



It works!

5 Comments:

Anonymous Anonymous said...

Very useful... thanks :)

17/9/06 04:58  
Blogger Carlos said...

I had the same need of using wget to download the oracle xe installer,I posted a
different approach
, taking the variables manually from the browser headers and using those variables in the wget command... but your way is far more simple. ;)

18/9/06 16:13  
Blogger Laurent Schneider said...

Thanks for the link. hopefully, I do not have to limit the rate to 3K here :-)

how did you get that output about what have been posted ?

18/9/06 16:19  
Blogger Carlos said...

I use the live HTTP headers extension for firefox, which lets you watch the request/response messages between browser and server.

The 3k limit rate was just for demonstration purposes :P

20/9/06 18:15  
Anonymous Anonymous said...

très bien vu !! Merci pour cette belle astuce bien pratique!

12/10/06 01:48  

Post a Comment

<< Home