Forum Moderators: phranque

Message Too Old, No Replies

Konqueror / Command Line Options / Linux / Thumbnail Generation

         

brotherhood of LAN

2:19 pm on Feb 10, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have a little bash script that iterates a list of URL's and essentially takes screenshots. I am using Xvfb for the screen data, Konqueror for the page rendering and a bash script in Ubuntu.

- konqueror --geometry 1024x740
- qdbus `qdbus | grep -m1 konqueror` /konqueror/MainWindow_1 org.kde.Konqueror.MainWindow.openUrl $URL false

The above loads up Konqueror and for each URL, a single tab loads up whichever URL is fed through the command. The bash script then exports the screen and imagemagick does its work.

I'd like to, if possible, get the HTTP status code for each URL loaded so that I can determine whether it's a worthy screenshot or not, so there's not lots of thumbs with 404's and the like.

I see there's a plethora of interactivity using Konqueror and the command line but online discussion about it is a bit sparse.

Anyone have any experience with it or can point to an answer?

phranque

3:15 pm on Feb 10, 2011 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



you could do an additional request using something like lwp-request:
lwp-request -sd 'http://example.com/'

brotherhood of LAN

3:36 pm on Feb 10, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



That'd work, I was thinking that the extra request would not be needed though, as Konqueror would have received the HTTP headers already,