Hi,evryone.
This real bad problem i hate google do it
How to remove webcahe google copy sites links dublicates or all of them but only webcache ?
Here what i have need to remove.
This first 100 pages it's ok.
But this.
How to remove them.
here is my code:
I want to remove this problem from this code in it's own code place.
Code:Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted Dim theElementCollection As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("a") For Each curElement As HtmlElement In theElementCollection Dim linkURL As String = curElement.GetAttribute("href").ToString ListBox1.Items.Add(linkURL) Next 'reduce cpu in txtbox - http://www.codeguru.com/forum/showthread.php?t=410318 Dim i As Integer Dim n As Integer = 2 'modify the 2, to fit your needs For i = 0 To 10 If i Mod n = 0 Then SendKeys.Flush() End If System.Threading.Thread.Sleep(0) Next 'reduce end 'remove dupes ListBox1.Sorted = True ListBox1.Refresh() Dim index As Integer Dim itemcount As Integer = ListBox1.Items.Count If itemcount > 1 Then Dim lastitem As String = ListBox1.Items(itemcount - 1) For index = itemcount - 2 To 0 Step -1 If ListBox1.Items(index) = lastitem Then ListBox1.Items.RemoveAt(index) Else lastitem = ListBox1.Items(index) End If Next End If 'auto click link WebBrowser1.Document.Links(ListBox1.SelectedIndex).InvokeMember("click") End Sub





Reply With Quote
