EDN Admin
Well-known member
Hi there I been trying with this link code to grab it and add it to a listbox.
Dim theElementCollection As HtmlElementCollection = WebBrowser4.Document.GetElementsByTagName("a") For Each curElement As HtmlElement In theElementCollection If curElement.GetAttribute("href").Contains("/view/php?a=") Then ListBox1.Items.Add(curElement.GetAttribute("href")) End If
Dim lol2 As New WebBrowser
lol2.ScriptErrorsSuppressed = True
lol2.Navigate("https://www.test.com" + (ListBox1.Items.Item(0)))
from this webpage source<div id="all3 <div class="anc-style" onclick="window.open(./view.php?a=c2l0ZT1odHRwJTNBJTJGJTJGbGlua3MuZW1waXJlbW9uZXkuY29tJTJGY2xpY2sucGhwJTNGYWYlM0Q5MTM2JTI2cGQlM0QxJTI2bG4lM0QxMCUyNnBmJTNEODM2MiZzZWM9MSZsZW5nPWZpeGUmYW=) <table class="box-anuncio" cellspacing="0" cellpadding="0" onclick="mkC(1)" onmouseover="this.style.borderColor=#bbb;this.style.backgroundColor=#ffffcc" onmouseout="this.style.borderColor=#ccc;this.style.backgroundColor=#fff" style="border-color: rgb(204, 204, 204); background-color: rgb(255, 255, 255); <tbody><tr> … </tr><tr><td align="left" style="padding:3px 6px;vertical-align:top; <div class="anuncio-bottom … </td></tr></tbody></table>
I had to add the because it doesnt show the beginning of the website name in the source.
lol2.Navigate("https://www.test.com" + (ListBox1.Items.Item(0)))
I want to try and grab the code between(./view.php?a=c2l0ZT1odHRwJTNBJTJGJTJGbGlua3MuZW1waXJlbW9uZXkuY29tJTJGY2xpY2sucGhwJTNGYWYlM0Q5MTM2JTI2cGQlM0QxJTI2bG4lM0QxMCUyNnBmJTNEODM2MiZzZWM9MSZsZW5nPWZpeGUmYW=)
View the full article
Dim theElementCollection As HtmlElementCollection = WebBrowser4.Document.GetElementsByTagName("a") For Each curElement As HtmlElement In theElementCollection If curElement.GetAttribute("href").Contains("/view/php?a=") Then ListBox1.Items.Add(curElement.GetAttribute("href")) End If
Dim lol2 As New WebBrowser
lol2.ScriptErrorsSuppressed = True
lol2.Navigate("https://www.test.com" + (ListBox1.Items.Item(0)))
from this webpage source<div id="all3 <div class="anc-style" onclick="window.open(./view.php?a=c2l0ZT1odHRwJTNBJTJGJTJGbGlua3MuZW1waXJlbW9uZXkuY29tJTJGY2xpY2sucGhwJTNGYWYlM0Q5MTM2JTI2cGQlM0QxJTI2bG4lM0QxMCUyNnBmJTNEODM2MiZzZWM9MSZsZW5nPWZpeGUmYW=) <table class="box-anuncio" cellspacing="0" cellpadding="0" onclick="mkC(1)" onmouseover="this.style.borderColor=#bbb;this.style.backgroundColor=#ffffcc" onmouseout="this.style.borderColor=#ccc;this.style.backgroundColor=#fff" style="border-color: rgb(204, 204, 204); background-color: rgb(255, 255, 255); <tbody><tr> … </tr><tr><td align="left" style="padding:3px 6px;vertical-align:top; <div class="anuncio-bottom … </td></tr></tbody></table>
I had to add the because it doesnt show the beginning of the website name in the source.
lol2.Navigate("https://www.test.com" + (ListBox1.Items.Item(0)))
I want to try and grab the code between(./view.php?a=c2l0ZT1odHRwJTNBJTJGJTJGbGlua3MuZW1waXJlbW9uZXkuY29tJTJGY2xpY2sucGhwJTNGYWYlM0Q5MTM2JTI2cGQlM0QxJTI2bG4lM0QxMCUyNnBmJTNEODM2MiZzZWM9MSZsZW5nPWZpeGUmYW=)
View the full article