Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: How To Download DAT Files From Unsecured Website

by InfiniteSilence (Curate)
on Jan 31, 2012 at 02:26 UTC ( #950856=note: print w/ replies, xml ) Need Help??


in reply to How To Download DAT Files From Unsecured Website

I'm not sure that plucking code form the Internet (that you may or may not understand) and asking 'hey...how can you refactor this to do x and y?' is a brilliant strategy. Second, grabbing a whole bunch of files from somebody's website is probably a violation of their terms of service. Nevertheless, you might try something like this:

linux> perl -e 'for my $month (qw|June July|) {for(1..3){my $url = qq| +http://localhost/foo| . $_ . qq|\.tar&dt=| . qq|$month-2001|; print q +q|Doing >>> $url\n|; `wget $url` }}'
Replace the start of the URL with your target. Of course you'll need wget, but you can even download that for Windows nowadays. Please don't let this discourage you from learning Perl and trying to understand code that you find on the web. It just isn't a very good place to start if your intent is to learn this language. If your intent isn't to learn the language then you are in the wrong place. There are websites that will write scripts for you for a modest sum.

Celebrate Intellectual Diversity


Comment on Re: How To Download DAT Files From Unsecured Website
Download Code
Re^2: How To Download DAT Files From Unsecured Website
by Marjan (Initiate) on Feb 01, 2012 at 02:44 UTC

    Thank you for your help. The website makes the data available for downloading; as I'm a student I'm using it for research purposes.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://950856]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2014-09-19 00:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (129 votes), past polls