Get CSS bg image from web page on VB.NET -


i have code of web page , contains lots of "divs" backgroud images this:

style="background-image: url(/images/image1.jpg)" 

is there easy way in vb.net urls bg images page?

you can start getting html using webclient:

dim client new webclient()          ' add user agent header in case          ' requested uri contains query.         client.headers.add("user-agent", "mozilla/4.0 (compatible; msie 6.0; windows nt 5.2; .net clr 1.0.3705;)")          dim data stream = client.openread(args(0))         dim reader new streamreader(data)         dim s string = reader.readtoend()         console.writeline(s)         data.close()         reader.close() 

from here can parse string (s) looking matches "backgroudn-image: {*}" - else need chime in, regex-fu horrible. regex.matches() - msdn


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -