By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,548 Members | 1,454 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,548 IT Pros & Developers. It's quick & easy.

Module for creating a screenshot of a web page given a URL?

P: n/a
Is there a Python module that, given a URL, will grab a screenshot of
the web page it goes to? I'd like to be able to feed such a module a
list of URLs from a file.

Thanks very much.

Jul 5 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
da*****@yahoo.com wrote:
Is there a Python module that, given a URL, will grab a screenshot of
the web page it goes to? I'd like to be able to feed such a module a
list of URLs from a file.

Thanks very much.
Not as I know of, but it's easy to write

Something like this quasi-code:

import time,webbrowser
from PIL import ImageGrab

list_of_urls = [''http://www.google.com', 'http://www.egg.net']

for url in list_of_urls:
webbrowser.open(url)
time.sleep(5) # wait for it to load
screen = ImageGrab.grab(coords etc)
screen.save(some_name_in_some_path)

Untestetd, but I'm pretty sure something like this will do.
If you need more control, and on windows, try pywinauto

Jul 5 '06 #2

P: n/a
Untestetd, but I'm pretty sure something like this will do.
If you need more control, and on windows, try pywinauto
I do need it to run on Windows. I'll check out pywinauto. Thanks.

Jul 6 '06 #3

P: n/a
da*****@yahoo.com writes:
Untestetd, but I'm pretty sure something like this will do.
If you need more control, and on windows, try pywinauto

I do need it to run on Windows. I'll check out pywinauto. Thanks.
Note he didn't say you *need* pywinauto to run on Windows.
John
Jul 9 '06 #4

P: n/a

John J. Lee wrote:
>
da*****@yahoo.com writes:
Untestetd, but I'm pretty sure something like this will do.
If you need more control, and on windows, try pywinauto

I do need it to run on Windows. I'll check out pywinauto. Thanks.

Note he didn't say you *need* pywinauto to run on Windows.
John
--
http://mail.python.org/mailman/listinfo/python-list

Is there anyway to do the same job in linux?
The ImageGrab doesn't support for linux system.

If anyone knows that, please, reply me. Thanks a lot.
--
View this message in context: http://www.nabble.com/Module-for-cre...p20127934.html
Sent from the Python - python-list mailing list archive at Nabble.com.

Oct 23 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.