Thursday, June 9, 2011

making google preview

With phantomjs, I made a simple search preview like Google's preview.

When user input query, thumbnail for each search result is gathered simultaneously. This works with render function of phantomjs(webkit based script binary). The image it made is saved with hashed url as a filename so that it would not render twice. And it also highlight with red box where the query appears in the page(You can see little tiny red bordered box in the thumbnail above, right?). Though it consumes lots of system resources, it works.

No comments:

Post a Comment