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

كود :
Public Class Form1

   Private url As String = "http://samihmasat.hostkda.com/%9f%ab%e8%a9%a0%a2%20%a2%a5%ea%ef%e9%20%9f%ee%20%e5%ef%a7%ef%ed%20%ea%eb%20%9f%e9%ef%ed%a2%ef%ed%a0%20%a0%9f%ea%a2%a7%9f%a7%a2%20%ea%a2%e3%a7%a7%a1/getvideo.php?videoid=https://www.youtube.com/watch?v=6p_g3yRCQM4&type=Download"

   Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
       Button1.Enabled = False
       Dim wb As New WebBrowser With {.ScriptErrorsSuppressed = False}
       wb.Navigate(url)
       AddHandler wb.DocumentCompleted, AddressOf wb_DocumentCompleted
   End Sub

   Private Sub wb_DocumentCompleted(sender As Object, e As WebBrowserDocumentCompletedEventArgs)
       Dim wc As New WebClient()
       wc.Headers.Add(HttpRequestHeader.Cookie, sender.Document.Cookie)
       Dim htmlSource As String = wc.DownloadString(url)
       Dim p = "<li><span class=""itag"">\d+</span> <a href=""(.+?)"""
       Dim a = Regex.Match(htmlSource, p, RegexOptions.Singleline).Groups(1).Value
       MsgBox(a)
       Button1.Enabled = True
   End Sub

End Class
الرد }}}
تم الشكر بواسطة: ابو روضة


الردود في هذا الموضوع
RE: ممكن اعرف ما هو الخطأ هنا - بواسطة rmnr - 15-11-18, 11:58 AM
RE: ممكن اعرف ما هو الخطأ هنا - بواسطة elgokr - 15-11-18, 08:02 PM
RE: ممكن اعرف ما هو الخطأ هنا - بواسطة elgokr - 15-11-18, 09:01 PM
RE: ممكن اعرف ما هو الخطأ هنا - بواسطة rmnr - 16-11-18, 03:20 AM


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


يقوم بقرائة الموضوع: