Jump to content

How to get the "URL" used in style sheets of a HTML response?


Recommended Posts

Hello All,

I'm using qt-webkit to make http/https request and process the html response of it. I want to parse the style sheets present in the HTML response to get the specific elements of style sheets.
e.g. I have following web page received after HTTP request:


<!DOCTYPE html>
body {
    background-image: url("http://www.w3schools.com/css/border.png"), url("img_flwr.gif");
    background-color: #cccccc;
div {
    cursor: url(http://i.imgur.com/jto5jnA.gif), auto;
This is text



Now from above HTML response, I want to parse the style sheet and the get the "URL" used. e.g. URL used for "background-image" or "cursor".
Any pointer on how to get these URLs used in style-sheet?

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...