Jump to content

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


bsalunke

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>
<html>
<head>
<style>
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;
}
</style>
</head>
<body>
<div>
This is text
</div>
</body>
</html>
 

 

 

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

Archived

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

×
×
  • Create New...