تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[VB.NET] جلب صورة شخصية من الانستغرام
#1
السلام عليكم احبابي في الله
اريد جلب صورة شخية من الانستغرام و طبقت هذا الكود و لكن لم ينجح
ممكن مساعدة في حل المشكل
كود :
   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
الرد }}}
تم الشكر بواسطة:
#2
احذف
كود :
?__a=1
الرد }}}
تم الشكر بواسطة: trakktour
#3
(15-11-18, 03:47 AM)rmnr كتب : احذف
كود :
?__a=1

شكرا يا غالي الله ينورك
لو ممكن كود اظهار عدد followers و following
الرد }}}
تم الشكر بواسطة:
#4
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)
الرد }}}
تم الشكر بواسطة:
#5
(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)

شكرا يا غالي الله يجازيك كل خير
الرد }}}
تم الشكر بواسطة:



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


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