I have a website where I have to take weekly screen shots of sister sites. I was wondering how this maybe done. I had obtained the code for taking screen shots but have no idea how to open up the browser at a set particular time so that the website screen shots maybe taken. I understood that I had to use crontab to schedule my tasks but how to open the browser?
My script to take screen shots is as follows
import gtk.gdk
w = gtk.gdk.get_default_root_window()
sz = w.get_size()
#print "The size of the window is %d x %d" % sz
pb = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB,False,8,sz[0],sz[1])
pb = pb.get_from_drawable(w,w.get_colormap(),0,0,0,0,sz[0],sz[1])
if (pb != None):
pb.save("screenshot.png","png")
# print "Screenshot saved to screenshot.png."
else:
# print "Unable to get the screenshot."
Any idea how to to open the browser via a python script?
I'm open to suggestions if this is not the right way to implement my idea.