Solved

Download Images using perl

Posted on 2004-03-31
6
291 Views
Last Modified: 2008-02-01
Hi all,
      I'm kind of familiar with perl but not yet gone deep into it... How to download images from a website. can LWP::UserAgent be used for this or is there a separate module for the purpose of images. If LWP::Useragent can be used, how to use it for getting images? 'coz I tried using it like for normal text but it did not work out.  ur help will be much appreciated. Thanx
0
Comment
Question by:subathra
6 Comments
 
LVL 20

Accepted Solution

by:
jmcg earned 32 total points
ID: 10728721
Yes, LWP::UserAgent can download any type of web content. Perhaps if you showed us what you tried, we could suggest how to make it right?
0
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 31 total points
ID: 10729158
Depending on what you are trying to do, LWP::Simple can download images as well.
0
 
LVL 6

Assisted Solution

by:christopher sagayam
christopher sagayam earned 31 total points
ID: 10730523
0
 
LVL 8

Assisted Solution

by:davorg
davorg earned 31 total points
ID: 10732369
use LWP::Simple;

my $url = 'http://example.com/url/of/image.png';

getstore($url, 'image.png');
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question