تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
جلب الملفات بالأسم فقط من هذا الموقع
#1
السلام عليكم ورحمة الله وبركاته.
حاولت بهذا الكود جلب الروابط بالاسماء كى يتم تشغيلهم بهذا الكود لكن مش عاوزة تظبط

                                                                                        
كود :
Dim url As String = "https://www.tvquran.com/ar/scholar/224/profile/%D8%B1%D8%B9%D8%AF-%D8%A7%D9%84%D9%83%D8%B1%D8%AF%D9%8A"
       Dim wc As New WebClient
       wc.Encoding = Encoding.UTF8
       Dim html As String = wc.DownloadString(url)
       Dim doc As New HtmlAgilityPack.HtmlDocument
       doc.LoadHtml(html)
       For Each n As HtmlAgilityPack.HtmlNode In doc.DocumentNode.SelectNodes("//div[@class='listitem-details']/h4/a[@href]")
           ListBox1.Items.Add(n.InnerText)
           lst.Add("https://www.tvquran.com/ar/scholar/224/profile/رعد-الكردي" & n.Attributes("href").Value)
       Next

                                                                           
                                                                الموقع
                                                                      
                                                                  رعد الكردي
الرد }}}
تم الشكر بواسطة:
#2
جرب هذا

كود :
Dim url As String = "https://www.tvquran.com/ar/scholar/224/profile/%D8%B1%D8%B9%D8%AF-%D8%A7%D9%84%D9%83%D8%B1%D8%AF%D9%8A"
Dim wc As New WebClient
wc.Encoding = Encoding.UTF8
Dim html As String = wc.DownloadString(url)
Dim r = Regex.Matches(html, "<div class=""share-box"" id="".*?</a>", RegexOptions.Singleline)
For Each t As Match In r
   ListBox1.Items.Add(Regex.Match(t.Value, "(?<=data-title="").*?(?="")").Value)
   lst.Add("https://" & Regex.Match(t.Value, "(?<=href="").*?(?="")").Value)
Next
الرد }}}
تم الشكر بواسطة: ابو روضة , ابراهيم ايبو
#3
(18-10-18, 08:27 AM)rnmr كتب : جرب هذا


كود :
Dim url As String = "https://www.tvquran.com/ar/scholar/224/profile/%D8%B1%D8%B9%D8%AF-%D8%A7%D9%84%D9%83%D8%B1%D8%AF%D9%8A"
Dim wc As New WebClient
wc.Encoding = Encoding.UTF8
Dim html As String = wc.DownloadString(url)
Dim r = Regex.Matches(html, "<div class=""share-box"" id="".*?</a>", RegexOptions.Singleline)
For Each t As Match In r
  ListBox1.Items.Add(Regex.Match(t.Value, "(?<=data-title="").*?(?="")").Value)
  lst.Add("https://" & Regex.Match(t.Value, "(?<=href="").*?(?="")").Value)
Next

بارك الله فيك أخى الكريم وجزاك كل خير  فعلا نجح مائة بالمائة
الرد }}}
تم الشكر بواسطة: rnmr , ابراهيم ايبو



التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم