04-02-18, 04:58 AM
وجدت لك هذه الطريقة بدون ويب براوزر
PHP كود :
Imports System.Text.RegularExpressions
Public Class Form1
Dim dt As New DataTable
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
dt.Columns.Add("Title")
dt.Columns.Add("URL")
End Sub
Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
Dim wc As New Net.WebClient
Dim a As String = wc.DownloadString("http://articles.islamweb.net/media/index.php?page=maincategory&lang=A&vPart=49")
Dim b As MatchCollection = Regex.Matches(a, "(<div class=""ItemTitle"">).+?(</div>)", RegexOptions.Singleline)
ListBox1.Items.Clear()
For Each c As Match In b
Dim d As String = Regex.Match(c.Value, "(?<=<font.+>).+?(?=</font>)").Value
Dim u As String = "http://articles.islamweb.net/media/" & Regex.Match(c.Value, "(?<=href="").+?(?="")").Value
dt.Rows.Add(d, u)
Next
ListBox1.DataSource = dt
ListBox1.DisplayMember = "Title"
ListBox1.ValueMember = "URL"
End Sub
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles ListBox1.SelectedIndexChanged
If ListBox1.SelectedValue.GetType IsNot GetType(DataRowView) Then
Process.Start(sender.SelectedValue)
End If
End Sub
End Class

