Is there a way in Perl to get the contents of an URL in IMAGE format?
I can use LWP::Simple to get HTML, but still can't figure out how to get it in JPEG
You could us the Wight module, which allows usage of phantomjs from Perl. An example which renders a page to a .png file would look like:
use strict;
use Wight;
my $wight = Wight->new;
$wight->visit('http://www.google.com/');
$wight->render('google.png');
Another possibility would be to use the Perl selenium API in combination with phantomjs, as described in this blog article.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With