منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : جلب صورة شخصية من الانستغرام
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
السلام عليكم احبابي في الله
اريد جلب صورة شخية من الانستغرام و طبقت هذا الكود و لكن لم ينجح
ممكن مساعدة في حل المشكل
كود :
   Private cookies As CookieContainer = New CookieContainer
   Dim client As New WebClient
   Public PIC As String = """profile_pic_url"":""(.*?)"""
 
Public Sub GetPIC()
       Try
           Dim request As HttpWebRequest = DirectCast(WebRequest.Create("https://www.instagram.com/firashamdane/?__a=1"), HttpWebRequest)
           request.Method = "GET"
           request.CookieContainer = Me.cookies
           request.UserAgent = "Mozilla/5.0 (Windows NT 6.1; rv:47.0) Gecko/20100101 Firefox/47.0"
           request.ContentType = "application/x-www-form-urlencoded"
           Dim reader As New StreamReader(request.GetResponse.GetResponseStream, Encoding.UTF8)
           Dim input As String = reader.ReadToEnd
           Dim I As String = """dob"":""(.*?)"""
 
           Dim PICC As Match = Regex.Match(input, PIC.Trim, RegexOptions.IgnoreCase)
           Dim bitmap As Image = DirectCast(Image.FromStream(New MemoryStream(client.DownloadData(PICC.Groups(1).Value))), Bitmap)
           PictureBox1.Image = bitmap
       Catch ex As Exception
       End Try
   End Sub
    
   Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
       Application.DoEvents()
       Dim firas As New Thread(AddressOf GetPIC)
       firas.IsBackground = True
       firas.Start()
 
   End Sub
احذف
كود :
?__a=1
(15-11-18, 03:47 AM)rmnr كتب : [ -> ]احذف
كود :
?__a=1

شكرا يا غالي الله ينورك
لو ممكن كود اظهار عدد followers و following
followers
كود :
Dim followers As String = """edge_followed_by"":{""count"":(.*?)}"
Dim FLWRS As Match = Regex.Match(input, followers.Trim, RegexOptions.IgnoreCase)
MsgBox("followers: " & FLWRS.Groups(1).Value)

following
كود :
Dim following As String = """edge_follow"":{""count"":(.*?)}"
Dim FLWING As Match = Regex.Match(input, following.Trim, RegexOptions.IgnoreCase)
MsgBox("following: " & FLWING.Groups(1).Value)
(15-11-18, 04:10 AM)rmnr كتب : [ -> ]followers
كود :
Dim followers As String = """edge_followed_by"":{""count"":(.*?)}"
Dim FLWRS As Match = Regex.Match(input, followers.Trim, RegexOptions.IgnoreCase)
MsgBox("followers: " & FLWRS.Groups(1).Value)

following
كود :
Dim following As String = """edge_follow"":{""count"":(.*?)}"
Dim FLWING As Match = Regex.Match(input, following.Trim, RegexOptions.IgnoreCase)
MsgBox("following: " & FLWING.Groups(1).Value)

شكرا يا غالي الله يجازيك كل خير