in reply to Automated Screenshot Grabbing via LWP?

Turning HTML into an Image
Rendering HTML / capturing pixels


MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
I run a Win32 PPM repository for perl 5.6x+5.8x. I take requests.
** The Third rule of perl club is a statement of fact: pod is sexy.

  • Comment on Re: Automated Screenshot Grabbing via LWP?

Replies are listed 'Best First'.
Re: Automated Screenshot Grabbing via LWP?
by hacker (Priest) on Apr 07, 2003 at 15:05 UTC
    These links offer interesting solutions, but fail for me in a few ways:

    • HTML::FormatPS assumes I have a local file, which I won't. Suffers from the same problems as getstore(), because I won't have a reference to the images linked in the file (nor will they show up in the output)

    • html2ps was remarkably close, but for normal-sized text on a very long scrolling page, such as The UBC Psychology Department website for handhelds, the .ps looks good, but the png version created from convert is completely illegible; the text is turned into a "city skyline".

    • I need to pass a very specific UserAgent string to the sites I'm "snapshotting" in some cases, as they restrict who can view the content by UserAgent.

    • I need to specify the viewport size to be exactly 160x160 pixels, or 320x240 pixels, depending on the user's preferences for preview size (determined by their chosen Palm type, standard or high-resolution). Most of these tools seem to grab the site in it's "natural" capacity, which is in A4 or "page" size.

    I'll keep looking, I'm sure there's something I can use here, thanks for the great ideas thus far.

      So don't use getstore. Be a little more creative HTML::LinkExtor/HTML::LinkExtractor, w3mir.

      As for convert not doing a good job, you give up too easy (plus i'm sure there are other ways of manipulating postscript files).


      MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
      I run a Win32 PPM repository for perl 5.6x+5.8x. I take requests.
      ** The Third rule of perl club is a statement of fact: pod is sexy.