in reply to Trying to download video from URL links

Did you read the WWW::Mechanize docs? A simple perusal gives a few obvious choices, plus, if the files are small enough to fit in memory, you can just $m_>get($link->url) and then save the $m->content to a file of your choosing.

There are many other options as well where you can get lower level and be able to deal with the file in chunks as it comes in, or save directly to disk, with other HTTP client modules on CPAN.

You can then get even more advanced and try to pull down multiple files in parallel, either inside a single thread (using event clients, such as POE or AnyEvent) or multi-threaded (using threads and queues). And then, more advanced, is to ensure you're only downloading some files at a time - because if you download too many it'll go slower than if you download only a few at a time. At least on most home internet connections.

Best of luck!

Replies are listed 'Best First'.
Re^2: Trying to download video from URL links
by Anonymous Monk on Dec 22, 2013 at 03:36 UTC

    Reading through WWW::MEchanize again did the trick! Thanks for the obvious but very helpful suggestion!

    Here is what I ended up with:

    #!/usr/bin/perl -w use strict; use WWW::Mechanize; my $mech = WWW::Mechanize->new(); my $filename = "fileblahblahblah.mp4"; my $url = "url"; $mech->get($url, ':content_file' => $filename );
    Thanks again!