News for hackers. Stuff that matters.
Re:Webkit2png: Python (cmd) tool that creates png screenshot... by kqueue on Sunday April 11, 2010 @03:24AM (#1256517)
Re:Webkit2png: Python (cmd) tool that creates png screenshot... by waleedka on Sunday April 11, 2010 @07:02AM (#1256681)
Their site says: "Qt double-escapes % characters in addresses, meaning those cannot be loaded".

That sounds like a major issue, isn't? Using % in a URL is very common.

Re:Webkit2png: Python (cmd) tool that creates png screenshot... by abhiyerra on Sunday April 11, 2010 @03:40AM (#1256532)
Seconded.
Re:Webkit2png: Python (cmd) tool that creates png screenshot... by waleedka on Sunday April 11, 2010 @02:49AM (#1256483)
Can someone recommend a similar tool that runs on Linux and can render flash?
Re:Webkit2png: Python (cmd) tool that creates png screenshot... by ChuckN on Sunday April 11, 2010 @04:02PM (#1257481)
python-webkit2png mentioned above does and it runs on xvfb which is extremely handy.
Re:Webkit2png: Python (cmd) tool that creates png screenshot... by anathema on Sunday April 11, 2010 @03:12AM (#1256506)
If anyone's interested, I ported this into a Ruby Gem a couple of years back. I haven't given it too much love lately, but it should still be good/useful: http://github.com/jurisgalang/snapurl
Re:Webkit2png: Python (cmd) tool that creates png screenshot... by sailormoon on Sunday April 11, 2010 @08:15AM (#1256739)
This is probably the wrong forum but there is a mistake in the regex in the makeFilename method. In trying to detect https it will strip the first letter of any domain starting with s. Check it out:

  >> name = 'http://super.com/'
  => "http://super.com/"
  >> name.gsub!(/\W/, '')
  => "httpsupercom"
  >> name.gsub!(/^http(s)?/i, '')
  => "upercom"
Cool, though ; )
Re:Webkit2png: Python (cmd) tool that creates png screenshot... by 3ds on Sunday April 11, 2010 @08:39AM (#1256763)
Then there is the aviary.com browser plugin where you can get an image version of the website you are viewing and even upload it directly to host (and edit) it on their site:

http://aviary.com/viewfull?fguid=a1c828de-96b6-102d-a9f3-003...

usually they also provide a service where you can go to URLs like this to get an image (the plugin is faster though):

http://aviary.com/http://news.ycombinator.com/item?id=125638...

Re:Webkit2png: Python (cmd) tool that creates png screenshot... by xal on Sunday April 11, 2010 @12:46PM (#1257178)
I build a web service for this in my spare time: http://www.web2png.com . You can set up profiles where you select the resulting resolution of the screenshot and apply all sorts of effects like polaroid frame, drop shadows and stuff like this. Once created you get a special URL through which you can get screenshots of web sites using your specifications.

Do you think this may be worth $19 a month? I provide a jquery plugin which makes this all really easy..

Re:Webkit2png: Python (cmd) tool that creates png screenshot... by tptacek on Sunday April 11, 2010 @07:54PM (#1257971)
Who would it be worth a monthly fee to? Answer that question first.
Re:Webkit2png: Python (cmd) tool that creates png screenshot... by ptomato on Sunday April 11, 2010 @11:52AM (#1257062)
There's also a gui OS X tool that does the same thing.

http://derailer.org/paparazzi/

Re:Webkit2png: Python (cmd) tool that creates png screenshot... by aphyr on Sunday April 11, 2010 @01:51PM (#1257261)
We use a modified webkit2png, along with some ruby and erlang RPC stuff, to take thumbnails of flash videos at vodpod.com. It works great!
Re:Webkit2png: Python (cmd) tool that creates png screenshot... by deno on Sunday April 11, 2010 @02:40PM (#1257357)
Wouldn’t something like getting the actual video file (flv or h.264) be a simpler approach? I mean don’t you have to have some kind of sandboxing etc. since you are executing unknown code (swf)?
Re:Webkit2png: Python (cmd) tool that creates png screenshot... by aphyr on Monday April 12, 2010 @12:06PM (#1259473)
Oh, believe me, I'd love to. The difficulty, however, is that extracting H264 or FLV streams from embed codes is a process that every video host is actively attempting to thwart--and there's some 15,000 of them, and one of me. :)
Re:Webkit2png: Python (cmd) tool that creates png screenshot... by coderholic on Sunday April 11, 2010 @01:32PM (#1257239)
I released PyWebShot today, which does a similar thing for Linux, but generates thumbnails (or arbitrary size) rather than whole page images. Details at http://www.coderholic.com/pywebshot-generate-website-thumbna... and code on GitHub
Re:Webkit2png: Python (cmd) tool that creates png screenshot... by saurabh on Sunday April 11, 2010 @02:01AM (#1256435)
Can this be ported to Windows?

EDIT: took a look at the source, it uses OS X specific API's.

Re:Webkit2png: Python (cmd) tool that creates png screenshot... by timmorgan on Sunday April 11, 2010 @02:30AM (#1256463)
Probably won't help you much, but this one, based on QtWebKit, runs on Linux: http://www.blogs.uni-osnabrueck.de/rotapken/2008/12/03/creat...
Re:Webkit2png: Python (cmd) tool that creates png screenshot... by swirlee on Sunday April 11, 2010 @02:32AM (#1256466)
wkhtmltopdf renders web pages to PDF using WebKit and works great on Windows, for what it's worth. It's just one more step to go from PDF to PNG. The results were great when I used it, but I'm not sure how it deals with e.g. Flash.

http://code.google.com/p/wkhtmltopdf/

Re:Webkit2png: Python (cmd) tool that creates png screenshot... by mike-cardwell on Sunday April 11, 2010 @09:56AM (#1256837)
wkhtmltopdf is excellent software. I use it to generate previews of text/html parts in emails at http://spamalyser.com/
Re:Webkit2png: Python (cmd) tool that creates png screenshot... by saurabh on Sunday April 11, 2010 @08:06AM (#1256732)
thanks, i checked it out, i wish it could output png though.
Re:Webkit2png: Python (cmd) tool that creates png screenshot... by 3ds on Sunday April 11, 2010 @08:55AM (#1256776)
either use aviary.com or:

all you need is imagemagick

wkhtmltopdf www.google.com google.pdf && convert google.pdf google.png

results aren't nearly as good as the browser addon but it works

Re:Webkit2png: Python (cmd) tool that creates png screenshot... by alien_acorn on Sunday April 11, 2010 @02:30AM (#1256464)
For Firefox on Windows, try Fireshot, https://addons.mozilla.org/en-US/firefox/addon/5648 .
Re:Webkit2png: Python (cmd) tool that creates png screenshot... by olaf on Sunday April 11, 2010 @05:10AM (#1256597)
"Fireshot" is "Windows-only".
Re:Webkit2png: Python (cmd) tool that creates png screenshot... by 2rs1 on Sunday April 11, 2010 @03:29AM (#1256524)
Webshot is an alternative. http://www.websitescreenshots.com/
Re:Webkit2png: Python (cmd) tool that creates png screenshot... by paraschopra on Sunday April 11, 2010 @02:57AM (#1256491)
I have used it on server and it works flawlessly. But you will need Xvfb on server and X11-fonts installed to make it work.
Re:Webkit2png: Python (cmd) tool that creates png screenshot... by Alcides on Sunday April 11, 2010 @08:29AM (#1256754)
Re:Webkit2png: Python (cmd) tool that creates png screenshot... by simonw on Sunday April 11, 2010 @01:08PM (#1257213)
webkit2png is at least five and a half years old: http://simonwillison.net/2004/Sep/11/webkitpng/
Re:Webkit2png: Python (cmd) tool that creates png screenshot... by ChuckN on Sunday April 11, 2010 @03:57PM (#1257470)
Python-Webkit2png is the best solution - believe me I've been through them all, it's based off of Roland's script mentioned below and is on PyPI:

http://pypi.python.org/pypi/webkit2png

http://github.com/AdamN/python-webkit2png

-Adam