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>
<!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>
To copy to clipboard, switch view to plain text mode
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?
Bookmarks