Imports System.IO
Imports System.Net
Imports System.Text.RegularExpressions
Public Class Form1
Dim wb As WebBrowser
Private Sub download_Click(sender As Object, e As EventArgs) Handles download.Click
p.Maximum = ListBox1.Items.Count - 1
For a = 0 To ListBox1.Items.Count - 1
ListBox1.SetSelected(a, True)
p.Value = a
Dim wc As New WebClient
Try
wc.DownloadFile("http://downloadinfo.html-5.me/Profile/" & ListBox1.Text, IO.Path.GetFileName(ListBox1.Text))
Catch ex As Exception
End Try
Next
End Sub
Private Sub ww(sender As Object, e As EventArgs)
Dim doc As New HtmlAgilityPack.HtmlDocument
doc.LoadHtml(wb.DocumentText)
p.Maximum = doc.DocumentNode.SelectNodes("//a[@href]").Count
For Each nod As HtmlAgilityPack.HtmlNode In doc.DocumentNode.SelectNodes("//a[@href]")
l.Text = nod.Attributes("href").Value
ListBox1.Items.Add(nod.Attributes("href").Value)
p.Value += 1
Next
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
wb = New WebBrowser
AddHandler wb.DocumentCompleted, AddressOf ww
wb.Navigate(TextBox1.Text)
End Sub
End Class