Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need an program (or even better, a python script) that can take a screenshot of a webpage in regular time intervals and save it to a .jpg (... or .gif, or .tif ... or any common image format) with an increasing index, to a pre-defined directory.

Anyone know of anything that can do that?

share|improve this question
    
Do you need to use the computer for other things? You could python and a few libraries to control mouse movement, screen capture and save capture as image. It would suck to dedicate a computer to just this, but could work. I've done similar with Diablo 3 Beta to constantly monitor Gold Prices in the Real Life Auction house (For educational purposes only, of course). –  kobaltz May 29 '12 at 23:33
    
I also rewrote the script in Ruby. (was really a project of learning how to control mouse movements and content aware of mouse location and specific key stroke injection). –  kobaltz May 29 '12 at 23:34
    
Do you mean capture a browser session where you are navigating thru your own pages? Or to monitor an external website where you don't have control? There are a few dedicated and independent solutions for each goal. If you want to capture an external site to a graphic, are you trying to get the entire html page or just a changing image (like from a webcam)? What OS will the capture be run on? –  jdh May 30 '12 at 0:08
    
@kobaltz - Yes, I need to be able use the computer for other things while doing so. I'm not interested in capturing any kind of video or movement, nor doing anything manually (like taking captures from that video), for that would defeat the whole purpose of automating the process of taking the screenshots. –  ldigas May 30 '12 at 0:38
    
@jdh - No, the pages are not under my control. They are the pages of the local meteorology department. I want to take the 'shot about every 8 hours, and save it to a predefined directory under a name with an increasing index or under a name that is a timestamp. We used to parse html from those pages, but they changed the layout some time ago and it proved to be complicated from then on. So, I just want a screenshot of the browser's content, so to say. –  ldigas May 30 '12 at 0:41
add comment

1 Answer 1

wkhtmltopdf is a CLI tool which renders a URL or HTML file to PDF. It does need to run under X, but can be run in the background. You could then use convert tool from ImageMagick to convert that into PNG or whatever format you want (although PDF would be better).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.