473,403 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

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

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
4 2287
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
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
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

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Steven Bethard | last post by:
In the "empty classes as c structs?" thread, we've been talking in some detail about my proposed "generic objects" PEP. Based on a number of suggestions, I'm thinking more and more that instead of...
2
by: Mike Mimic | last post by:
Hi! I would like to know if there is some kind of program which would make a screenshot of a web page without use of X Windows. I have a server without X Windows and I would like to have a...
2
by: Kenneth McDonald | last post by:
I'd like to propose a new PEP , for a standard library module that deals with files and file paths in an object oriented manner. I believe this module should be included as part of the standard...
25
by: Xah Lee | last post by:
Python Doc Problem Example: gzip Xah Lee, 20050831 Today i need to use Python to compress/decompress gzip files. Since i've read the official Python tutorial 8 months ago, have spent 30...
11
by: Steve | last post by:
Hi All, I'm having a tough time converting the following regex.compile patterns into the new re.compile format. There is also a differences in the regsub.sub() vs. re.sub() Could anyone lend...
14
by: ccdetail | last post by:
http://www.tiobe.com/index.htm?tiobe_index Python is the 7th most commonly used language, up from 8th. The only one gaining ground besides VB in the top 10. We're glad, our app is written in...
19
by: mareeus | last post by:
Hi, Are there any ways I could get a screenshot of a web-page at a specific address in jpeg via php script? Regards, Marius.
13
by: Kirk | last post by:
I have been reading Scott Allen's article on Master Pages (http:// odetocode.com/Articles/450.aspx) but I am having problems understanding a concept. Specifically, I have created a property...
1
kamill
by: kamill | last post by:
Hi all, Is there anyway to let the php file take a screenshot for the given page or url? or We need a special tools to let php do that? Thanks for all
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.