Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: How to get/save image with LWP

by hippo (Bishop)
on Jul 07, 2021 at 20:57 UTC ( #11134777=note: print w/replies, xml ) Need Help??


in reply to How to get/save image with LWP

my $response = $ua->get('https://en.wikipedia.org/wiki/File:ENIAC-changing_a_tube.jpg');

Have you looked at that URL? It isn't an image which is why it is "not renderable". Use the actual URL of the image: https://upload.wikimedia.org/wikipedia/commons/thumb/e/e5/ENIAC-changing_a_tube.jpg/725px-ENIAC-changing_a_tube.jpg


🦛

Replies are listed 'Best First'.
Re^2: How to get/save image with LWP
by cormanaz (Deacon) on Jul 07, 2021 at 21:31 UTC
    Good point. I saw it ended in .jpg so I assumed it was an image. Should have checked it manually. With the actual image link it works fine. Sorry for the cycles.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2022-08-19 05:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?