-
Sep 26th, 2017, 01:53 AM
#1
Thread Starter
New Member
How to get text from webbrowser to vb.net <span> HELP!
Hi Forum
I'm new here and i thanks in advance who would help me fix this.
Tryed lot of things and i still have problem.
So let me explain
I want to store 3 Values from Webbrowser that are in <span> to vb.net label
Here is HTML ( of 3 Values i need )
HTML Code:
<li class="_bnq48">
<span class="_t98z6">
<!-- react-text: 27 -->
<!-- /react-text -->
<span class="_fd86t">11</span>
<!-- react-text: 29 --> posts<!-- /react-text -->
</span>
</li>
<li class="_bnq48">
<a class="_t98z6" href="/gembowa/reactions/">
<!-- react-text: 32 -->
<!-- /react-text -->
<span class="_fd86t" title="772">772</span>
<!-- react-text: 34 --> reactions<!-- /react-text -->
</a>
</li>
<li class="_bnq48">
<a class="_t98z6" href="/gembowa/Coins/">
<!-- react-text: 37 -->
<!-- /react-text -->
<span class="_fd86t">264</span>
<!-- react-text: 39 --> Coins<!-- /react-text -->
</a>
</li>
I need these Values 11, 772, 264 storred to vb.net labels
I tryed following with 1 loop because all classes are same. ( NOT WORKING ):
Code:
For Each h As HtmlElement In WebBrowser1.Document.GetElementsByTagName("span")
If Not Object.ReferenceEquals(h.GetAttribute("className"), Nothing) AndAlso h.GetAttribute("className").Equals("_fd86t") Then
Label1.Text = h.InnerText
Exit For
End If
Next
Is there way to copy these values with .InnerHtml.Contains or .Contains and get thought "text": posts, reactions, coins ?
Thank you all,
Great forum.
-
Sep 26th, 2017, 01:54 AM
#2
Thread Starter
New Member
Re: How to get text from webbrowser to vb.net <span> HELP!
Sorry for my bad english.
-
Sep 26th, 2017, 03:41 PM
#3
Thread Starter
New Member
Re: How to get text from webbrowser to vb.net <span> HELP!
Anyone could help, Thanks?
-
Sep 27th, 2017, 06:23 PM
#4
Thread Starter
New Member
Re: How to get text from webbrowser to vb.net <span> HELP!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|