HTML:
<html><head></head>
<body> <div style="width:638px; margin-left:-1px;">
<center><br /><img class="store_header" id="store_top" name="store_top"
src="" /><div class="store_sub_header">
<span class="yellow_glow_40">Some Text</span>
<div class="white_black_glow_24">
Date-Date</div>
</div>
<p> </p></center>
<div>
</div>
<div>
</div><div class="yellow_glow_24">
New
Deals</div>
<div class="white_black_glow_18">
New discounts</div>
<div class="white_black_glow_18">
Everyday of the week</div>
<div class="white_black_glow_18">
Every weekend</div>
<div class="button_center">
<img class="green-button" src="" /><a class="button_gradient" href="">Learn More</a> <img class="green-button" src="" /></div>
</div>
<!--My Promo Box End--
><div class="promotion_block">
<div class="yellow_glow_24">
What a day for summer</div>
<div class="white_black_glow_18">
is back for a limited time</div>
<div class="white_black_glow_18">
Join in!</div>
<div
class="white_black_glow_18">
Now through 10/25</div>
</div>
<!--Limited--></div>
<div class="free_copy">
<div
class="white_black_glow_18">
Day ? Day</div>
<div class="yellow_glow_24">
MegaChung
Bucks x1</div>
<div class="white_black_glow_18">
Use Code <span class="coupon_code">IMRDY1</span> 1/Account</div>
</body>
</html>
VB.NET:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'On Error Resume Next
Dim StoreCode As String, StoreText As String, StoreDate As String
MyWin = New WinHttp.WinHttpRequest
MyWin.Option(WinHttpRequestOption.WinHttpRequestOption_EnableHttp1_1) = True
MyWin.Option(WinHttpRequestOption.WinHttpRequestOption_EnableRedirects) = True
MyWin.Option(WinHttpRequestOption.WinHttpRequestOption_EnableHttpsToHttpRedirects) = True
Try
MyWin.Open("GET", "C:/Parsing-Splitting.html", False)
MyWin.SetRequestHeader("Host", "localhost")
MyWin.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20100101 Firefox/14.0.1")
MyWin.SetRequestHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
MyWin.SetRequestHeader("Connection", "keep-alive")
MyWin.Send()
A1 = MyWin.ResponseText
'<div class="free_copy">
'<div class="white_black_glow_18">
'' Day-Day</div>
'<div class="yellow_glow_24">
' MegaChung x1</div>
'<div class="white_black_glow_18">
' Use Code <span class="coupon_code">IMRDY1</span> 1/Account</div>
StoreText = ParseInfo(A1, "<div class=" & Chr(34) & "yellow_glow_24" & Chr(34) & ">", " x1</div>")
StoreCode = ParseInfo(A1, "<span class=" & Chr(34) & "coupon_code" & Chr(34) & ">", "</span>")
lblStoreItem.Text = StoreText
lblCode.Text = StoreCode
MyWin.Abort()
Catch ex As Exception
Return
End Try
End Sub
This works perfectly as far as grabbing everything but unfortunetly where i try to grab StoreText it does not grab anything of it & i know it has to do with the fact the html has severl yellow_glow_24 div tags and i been trying to grab the text MegaChung x1...but iv'e tried everything i know to get around it any ideas or help please i been trying for almost a week now.