(31-08-17, 10:56 PM)سعود كتب : لبحث عن مواقع اهتمام بالقرآن اكتب بقوقل : index of /quran
حاولت مع هذا الموقع لكن مش عارف أين يكمن الخطأ تحديدا ؟
الكود
كود :
Dim url As String = "https://download.quranicaudio.com/quran/wadee_hammadi_al-yamani/"
Dim hweb As New HtmlAgilityPack.HtmlWeb
Dim doc As HtmlAgilityPack.HtmlDocument = hweb.Load(url, "Get")
Dim nod As HtmlAgilityPack.HtmlNode = doc.GetElementbyId("//pre")
For Each h As HtmlAgilityPack.HtmlNode In nod.ChildNodes
If h.InnerText.Trim <> "" Then
lst.Add(h.Attributes("href").Value & ".mp3")
ListBox1.Items.Add(h.InnerText.Trim)
End If
Nextلكن جربت بهذه الطريقة وجلبت كل الروابط لكنى لا احب الويب براوزر
كود :
Dim input As HtmlElementCollection
input = WebBrowser1.Document.GetElementsByTagName("a")
For Each item As HtmlElement In input
If item.GetAttribute("href").Contains("mp3") Then
item.GetAttribute("href")
ListBox1.Items.Add(item.GetAttribute("href"))
End If
Next item
