Skip to main content
GameDev.net gamedev.net
🔒 Locked

[web] Request for comments: web screenshot application

Started by markr Aug 31, 2006 at 7:21 AM 14 replies 3.5k views
Original Post
markr
markr
Hi all, I've written a little application which makes thumbnails / screenshots of web pages. I've put up a demo of this prototype, here: http://screencap.gensortium.com/ I would appreciate it if you would test it (perhaps on your own site) and let me know what you think. Would this be useful as an ASP style service? Cheers Mark
benryves
benryves
Quote:
Original post by markr
I would appreciate it if you would test it (perhaps on your own site) and let me know what you think.

It don't think it worked for http://benryves.com/ - it claims the title is LINKSUK.com - UK Business Directory and doesn't provide a screenshot. The site's HTML is seriously ugly (old nested table fare), but that shouldn't stop it..?

Seems like a nifty idea, though not sure what you mean by an "ASP-style service". I've only come across one similar system, which is MSN Search (providing thumbnails of search reports).
[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]
Mathachew
Mathachew
Nifty, but there were some issues. I submitted three sites that I currently have and two of the three had flash headers, as well as background images set with CSS. Neither of these two items showed up on the two domains, whereas my wife's website came up fine. I also have &#106avascript that loops text continuously on the same two web pages, which also doesn't appear. The websites are also cut off (one is 800x600 friendly and is cut off even at the sides).

Those are my immediate observations. There is a Firefox extension that expands on google searches and gives thumbnails of the sites listed in a very similar manner.

I also don't know what you mean by ASP style service. Nice work. Now purdy up your site ;)
Cygnus_X
Cygnus_X
A few things.

A) It would be nice if it could add http:// at the begining of the text if www. is the beginning of the url. I'm lazy and the 7 extra key strokes is annoying ;)

B) It doesn't seem to capture background images. Look at http://screencap.gensortium.com/siteinfo.php?id=32 as an example.

Other than that, its a very sweet application. I'd like to see this incorporated into a search engine such that thumbnails of the pages appeared before I had to visit the site. Again, I'm lazy, and I could weed out many sites from ever being clicked if this app was used.
Sander
Sander
Nice. How do you create the screenshot? Do you parse the HTML or do you screencap browser windows? There is definately a market for a browsercap site, especially one with multiple browsers. I have seen a few around but most are slow, buggy and only provide a few browsers. Others you have to pay for. Such sites are really handy for web developers who want to see quickly how their site looks across many different browsers.
markr
markr
Quote:
Original post by Sander
How do you create the screenshot? Do you parse the HTML or do you screencap browser windows?


Somewhere in between.

I don't parse the HTML myself, but neither do I screencap a (conventional) browser window.

A custom application written in &#106avascript based on Mozilla takes the screenshots. It is controlled by a PHP application which keeps its data in MySQL, including the screenshots themselves which are stored in BLOBs in the database.

Quote:

There is definately a market for a browsercap site, especially one with multiple browsers.


This was not my immediate focus; I have seen them before. The problem is that most just screencap the browser- hence they are slow because the application doesn't know how long the page will take to load.

Mine is faster, but has some issues at the moment - chiefly that the event which tells me the page is loaded happens too early, often before all the background images have loaded. I'm not sure what to do about this but I'm still investigating it (Yes, I know I could put a delay in but that would be admitting defeat- also not a good solution).

The focus of the app is to create thumbnails. To this end, it crops the edges off many sites to try to capture only the useful content area- unfortunately on some sites it gets this wrong.

Mark
Sander
Sander
Quote:
chiefly that the event which tells me the page is loaded happens too early, often before all the background images have loaded.


You should try to find out what trigger sets the statusbar to "Done" in mozilla then (or that stops the throbber from throbbing). That only happens when everything has loaded.
markr
markr
Quote:
Original post by Sander

You should try to find out what trigger sets the statusbar to "Done" in mozilla then (or that stops the throbber from throbbing). That only happens when everything has loaded.


Sadly, on the contrary, no, it does not.

Mark
Sander
Sander
There's a patch to a preference setting in that bug that makes Mozilla do the correct thing. Suerly you can apply that patch to your own code and make body.onload() work correctly, then attach your screencap routine to that event?

Edit: I also suggest you add your example to that bug report. Maybe that'll stirr them into action again.
Colin Jeanne
Colin Jeanne
Searching by domain doesnt seem to work very well. For example, the search field doesnt trim whitespace.
gavco98
gavco98
A few useability issues:

1) When you click "add a URL" and get the form, the following text is misleading: "URL (including http:// )" Seeing the text "http://" right next to the input box suggested to me that I did not need to add this as it would be added automatically. This was not the case and I got an error. If you need to add the http can you have that already entered into the text box so the user knows, and just adds their url onto the end of it. Granted it was my fault for not actually reading the text properly, but hey time is precious.

2) How does it actually work? What am I supposed to do? I clicked add url, filled out my sites URL and clicked add. I got a message saying "request sent". Now what? I returned to the home page, and the thumbnail of the sites I submitted do not appear. Ive waited 5 minutes now, and they are still not there. Do i have to wait longer? Has the script failed? Some feedback would be good telling me whats happening/happened...
Gavin Coates
[size="1"]IT Engineer / Web Developer / Aviation Consultant
[size="1"][ Taxiway Alpha ] [ Personal Home Page ]
markr
markr
Quote:
Original post by gavco98
1) When you click "add a URL" and get the form, the following text is misleading: "URL (including http:// )" Seeing the text "http://" right next to the input box suggested to me that I did not need to add this as it would be added automatically. This was not the case and I got an error. If you need to add the http can you have that already entered into the text box so the user knows, and just adds their url onto the end of it. Granted it was my fault for not actually reading the text properly, but hey time is precious.


I am aware of this issue.

The whole front-end UI was an extremely quick hack.

Quote:
Ive waited 5 minutes now, and they are still not there. Do i have to wait longer? Has the script failed? Some feedback would be good telling me whats happening/happened...


The screenshot fetching process seems to have crashed :)

Your site will be fetched but not until I restart it.

Mark

Captain P
Captain P
Nice system you've got there. :)

I tried my portfolio, but the normal link (www.captain-p.com) only showed a black image. Now I've got my domain at a different company as my webspace, so there's some sort of frame page or such in-between which fools your screenshot system. The direct link (http://theta.main-hosting.com/~captain/portfolio/index.php?page=1) does work just fine - although I do see a different font, I assume you don't have arial there? Hmm, gotta provide some alternate fonts in the css then.
markr
markr
If your site uses a &#106avascript-redirect, it won't work, as I've got &#106avascript disabled.<br><br>Currently the behaviour for a blank page isn't very sensible (The cropping routine goes a bit funny and ends up with a black/white box)- I should really put in some kind of message or note "This page is blank".<br><br>The Microsoft fonts aren't installed- this is purely down to laziness &#111;n my part not having installed them. I can install these no problem- in fact in my test environment they are present.<br><br>Mark
markr
markr
Quote:
Original post by Captain P
Now I've got my domain at a different company as my webspace, so there's some sort of frame page or such in-between which fools your screenshot system....


Yes. It's a bug. I'll fix it later.

The system which tries to figure out the dimensions of the page doesn't take frames into account, so although the frame set loads, the app doesn't screenshot it correctly.

Mark
Silent Dragon
Silent Dragon
Heh cool thingy =] I assume that is FireFox's view, becuase my site looks different in IE. Grr it's gunna be so annoying to get it to look the same in both x.x

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.