جلب صورة شخصية من الانستغرام - trakktour - 15-11-18
السلام عليكم احبابي في الله
اريد جلب صورة شخية من الانستغرام و طبقت هذا الكود و لكن لم ينجح
ممكن مساعدة في حل المشكل
كود :
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
RE: جلب صورة شخصية من الانستغرام - rmnr - 15-11-18
احذف
RE: جلب صورة شخصية من الانستغرام - trakktour - 15-11-18
(15-11-18, 03:47 AM)rmnr كتب : احذف
شكرا يا غالي الله ينورك
لو ممكن كود اظهار عدد followers و following
RE: جلب صورة شخصية من الانستغرام - rmnr - 15-11-18
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)
RE: جلب صورة شخصية من الانستغرام - trakktour - 15-11-18
(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)
شكرا يا غالي الله يجازيك كل خير
|