Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Re: LWP to download images, how to let LWP decide, wether it is an image or not?

by uwevoelker (Pilgrim)
on Oct 20, 2001 at 17:12 UTC ( [id://120243]=note: print w/replies, xml ) Need Help??


in reply to Re: LWP to download images, how to let LWP decide, wether it is an image or not?
in thread LWP to download images, how to let LWP decide, wether it is an image or not?

I like the idea of verifying the file format. You could use Image::Size to check for pictures. And maybe you need the filesize for the HTML-img-Tag (width and height).

Also I would open the OUTFILE right before the PRINT-statement. If the picture is not valid you end in having created a zero-length file.

Good bye, Uwe

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-03-29 14:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found