-3

I wanted to take screenshots of different pages of our internal websites and mail it to someone on weekly basis. I tried in Perl however I do not see any relevant modules which can help in this. please suggest.

halfer
  • 19,824
  • 17
  • 99
  • 186
  • 1
    Possible duplicate of [How can I take screenshots of webpages with Perl?](http://stackoverflow.com/questions/2312852/how-can-i-take-screenshots-of-webpages-with-perl) – Chankey Pathak Dec 05 '16 at 10:32
  • 3
    Oh another *"Did not work"* error message. We're seeing these so often I think there must be a fundamental error in the basics of computer science that affects all software on all machines. – Borodin Dec 05 '16 at 10:32
  • 1
    @Borodin as I said below, I think this needs hammering. Would you do the honors? – simbabque Dec 05 '16 at 10:33
  • 1
    @simbabque: Sorry, I don't have a hammer with me. Voted to close instead. – Borodin Dec 05 '16 at 10:35
  • 1
    You could look into a Perl driver for PhantomJS - I've done this in PHP and it works very well. – halfer Dec 05 '16 at 11:00
  • 1
    @halfer: [WWW::Mechanize::PhantomJS](https://metacpan.org/pod/WWW::Mechanize::PhantomJS#mech-content_as_png-coordinates) also has `content_as_png` method :) – Chankey Pathak Dec 05 '16 at 11:11

1 Answers1

1

i tried in Perl however i do not see any relevant modules which can help in this

There are plenty. Did you even try to search it on CPAN? A simple search containing "screenshot" as search string.

Did you search about it on StackOverflow itself? See the below question which lists many ways to do it.

How can I take screenshots of webpages with Perl?

Simplest approach would be to use WWW::Mechanize::Firefox module's $mech->content_as_png method.

mail it to someone on weekly basis

Again, there are plenty of Email:: modules available on CPAN. Pick the one you like.

Community
  • 1
  • 1
Chankey Pathak
  • 21,187
  • 12
  • 85
  • 133