using python to visit web sites and print the web sites image to files
Hi there, I wonder whether python can be used to simulate a real user to do the following: 1) open a web site in a browser; 2) printscreen, so to copy the current active window image to clipboard; 3) save the image file to a real file Any pointer will be apprieciated! Xiong -- http://mail.python.org/mailman/listinfo/python-list
Re: using python to visit web sites and print the web sites image to files
On 3月13日, 上午4时26分, "Paul Boddie" <[EMAIL PROTECTED]> wrote: > Goldfish wrote: > > You can definitely create a web bot with python. It doesn't require > > that you "drive" A real web browser. > > That's true, but if you want to print the page to a file, you need > something that can reproduce the intended layout. The Pyglet library > developers mention "XML/HTML+CSS" as something the layout engine can > deal with, which sounds quite impressive if its support of CSS is > comprehensive: > > http://pyglet.org/ > > Paul Thanks for all the replies. I will check pyglet to see if it can help. The reason I want to do simulation but not just crawling is : we have to check many web pages' front page to see whether it conform to our visual standard, e.g, it should put a search box on the top part of the page. It's tedious for human work. So I want to 'crawl and save the visual presentation of the web site automatically', and check these image files later with human eyes. -Xiong -- http://mail.python.org/mailman/listinfo/python-list
Re: using python to visit web sites and print the web sites image to files
On 3月13日, 上午12时39分, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Mar 12, 7:32 am, "imx" <[EMAIL PROTECTED]> wrote: > > > I wonder whether python can be used to simulate a real user to do the > > following: > > 1) open a web site in a browser; > > 2) printscreen, so to copy the current active window image to > > clipboard; > > 3) save the image file to a real file > > Any pointer will be apprieciated! > > Xiong > > Google pywinauto. > > HTH > > Davy I checked pyglet, it's in early development stage. Since I'm using windows, I will try pywinauto. Thanks, Xiong -- http://mail.python.org/mailman/listinfo/python-list
Re: using python to visit web sites and print the web sites image to files
On 3月14日, 上午5时44分, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > The reason I want to do simulation but not just crawling is : we have > > to check many web pages' front page to see whether it conform to our > > visual standard, e.g, it should put a search box on the top part of > > the page. It's tedious for human work. So I want to 'crawl and save > > the visual presentation of the web site automatically', and check > > these image files later with human eyes. > > > -Xiong > > Hi Xiong, > > I have been working on a program to do something very similar to > generate thumbnails of websites. > > The code is in IronPython (which may put you off!) and would need > modified or scripted with pywinauto to deal with multiple images. > > Let me know if it is of use to you and I will upload it. > > Cheers, > Davy Cool, but does it mean that I will need .net to run the code? Xiong -- http://mail.python.org/mailman/listinfo/python-list
cannot start IDLE in WinXP
Hi, Enviroment: WinXP sp2, python 2.5 problem: click IDLE using shorcut menu or run phthonw.exe directly, nothing happen! But running python.exe from the command line is fine. I searched this issue on the net and this forum and tried some suggestions but with no luck. Any ideas? Thanks in advance, Xiong -- http://mail.python.org/mailman/listinfo/python-list
Re: cannot start IDLE in WinXP
On 3月18日, 下午5时47分, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sat, 17 Mar 2007 08:09:16 -0300, imx <[EMAIL PROTECTED]> escribió: > > > Enviroment: WinXP sp2, python 2.5 > > problem: click IDLE using shorcut menu or run phthonw.exe directly, > > nothing happen! But running python.exe from the command line is fine. > > pythonw.exe does not open a window so it's almost invisible. > IDLE now uses a socket to connect to the subprocess which runs the python > code; perhaps your firewall is blocking that connection. Try starting IDLE > with the -n switch. > > -- > Gabriel Genellina Thanks for reply, I've already reinstall xp and now IDLE is ok. -Xiong -- http://mail.python.org/mailman/listinfo/python-list