Jan 11, 2015 09:12 AM
(This post was last modified: Jun 24, 2016 10:01 AM by Karnaugh.)
Will soon update this into ASP.Net, so it's easier to use.
We all know Instagram doesn't let us download the images without having to go into Inspect Element or some sort of Add-on, so here's a simple software that does the trick for you (:
Video
Will soon make a mass download feature, which allows you to download the whole Instagram profile images!
Source: Pastebin Link
Please leave a post!
Hope you like this!
Coder looking for partner with good ideas
PM me.
I think the source code would be more useful than the executable. Post it on pastebin pls with vb.net syntax highlighting. Thanks babe
(Jan 11, 2015 09:20 AM)+Haze Wrote: I think the source code would be more useful than the executable. Post it on pastebin pls with vb.net syntax highlighting. Thanks babe
Updated it with the PB link. Hope more people leave the post duh...
Coder looking for partner with good ideas
PM me.
DO NOT DEAL WITH THIS MEMBER
Jan 11, 2015 09:45 AM
(This post was last modified: Jan 11, 2015 09:46 AM by nathan72389.)
lol @ creating controls just to hold a string.
you should of just made this whole project into a function.
function GetImage(link as string) as image
ect...
I'm agree with "nathan72389" you could do it with the function and returning the the image
anyway thanks for sharing it is usefull
Honestly mate, it takes less time and effort to use Inspect Element:
No problem doing this for academic purposes though!
Just so this post isn't totally useless: if you do end up creating a website for this, you needn't bother with a server-side technology - just do it on the client-side using JS.
Jan 11, 2015 10:45 AM
(This post was last modified: Jan 11, 2015 12:35 PM by +Haze.)
OP don't take this as me being an ass, I want to help you learn something different.
To extend of what Nathan said. You could use a function to get the image url of your instagram URL. And you could use a regex pattern to get the download URL of the URL instead of using that GetBetween which I don't quiet understand.
You can created a shared class. I'm gonna name mine InstagramHelper.vb
Code Imports System.Net
Imports System.Text.RegularExpressions
Public Class InstagramHelper
Private Shared Regex As Regex
Public Shared Function GetImageURL(imgURL As String) As String
Using wc As New WebClient
Dim src As String = wc.DownloadString(imgURL)
Regex = New Regex("http://(.*).jpg")
Dim match As Match = Regex.Match(src)
Return match.Groups(0).Value.ToString()
End Using
End Function
End Class
You can then call it like.
PHP Code
<?php Dim imgURL As String = InstagramHelper.GetImageURL("http://instagram.com/p/xPgjyMgUdN/?modal=true") PictureBox1.Image = New Bitmap(New MemoryStream(New WebClient().DownloadData(imgURL)))
But like ByteBlast said, it's easier to inspect element. But I guess this could be good for learning purposes.
(Jan 11, 2015 10:32 AM)+Bourbon Wrote: Honestly mate, it takes less time and effort to use Inspect Element:
https://i.imgur.com/6SCSSkB.gif
No problem doing this for academic purposes though!
Just so this post isn't totally useless: if you do end up creating a website for this, you needn't bother with a server-side technology - just do it on the client-side using JS.
😊 do u think b4 u reply dont think u do it this time
(Jan 11, 2015 10:45 AM)+Haze Wrote: OP don't take this as me being an ass, I want to help you learn something different.
To extend of what Nathan said. You could use a function to get the image url of your instagram URL. And you could use a regex pattern to get the download URL of the URL instead of using that GetBetween which I don't quiet understand.
You can created a shared class. I'm gonna name mine InstagramHelper.vb
You can then call it like.
PHP Code
<?php Dim imgURL As String = InstagramHelper.GetImageURL("http://instagram.com/p/xPgjyMgUdN/?modal=true") PictureBox1.Image = New Bitmap(New MemoryStream(New WebClient().DownloadData(imgURL)))
But like ByteBlast said, it's easier to inspect element. But I guess this could be good for learning purposes.
why u need class for something like this ?
and what if u need to do it with 100 images 😊
Is every image on instagram a jpeg file?
(Jan 11, 2015 10:45 AM)+Haze Wrote: OP don't take this as me being an ass, I want to help you learn something different.
To extend of what Nathan said. You could use a function to get the image url of your instagram URL. And you could use a regex pattern to get the download URL of the URL instead of using that GetBetween which I don't quiet understand.
You can created a shared class. I'm gonna name mine InstagramHelper.vb
Code Imports System.Net
Imports System.Text.RegularExpressions
Public Class InstagramHelper
Private Const IMG_URL_PATTERN As String = "http://(.*).jpg"
Private Shared Regex As Regex
Public Shared Function GetImageURL(imgURL As String) As String
Try
Using wc As New WebClient
Dim src As String = wc.DownloadString(imgURL)
Regex = New Regex(IMG_URL_PATTERN)
Dim match As Match = Regex.Match(src)
Return match.Groups(0).Value.ToString()
End Using
Catch ex As WebException
Throw New Exception(ex.Message)
End Try
End Function
End Class
You can then call it like.
PHP Code
<?php Dim imgURL As String = InstagramHelper.GetImageURL("http://instagram.com/p/xPgjyMgUdN/?modal=true") PictureBox1.Image = New Bitmap(New MemoryStream(New WebClient().DownloadData(imgURL)))
But like ByteBlast said, it's easier to inspect element. But I guess this could be good for learning purposes.
Well, don't forget to save it to the folder, because that was the intention. To download the image to the folder, that picturebox is just to show the image (:
Coder looking for partner with good ideas
PM me.
PictureBox1.Image.Save(Application.Startup & imgURL & ".jpg")
Try to use string.Format rather than: var1 & var2 & var3
I've updated your code a little bit and removed some not needed variables.
Updated: https://pastr.me/!/jqVYqb
Apart from that, good work!
DO NOT DEAL WITH THIS MEMBER
Jan 11, 2015 12:55 PM
(This post was last modified: Jan 11, 2015 12:59 PM by Naywyn.)
(Jan 11, 2015 12:32 PM)stackoverflowin Wrote: Try to use string.Format rather than: var1 & var2 & var3
I've updated your code a little bit and removed some not needed variables.
Updated: https://pastr.me/!/jqVYqb
Apart from that, good work!
I don't understand that part :
PHP Code
<?php Dim imgURL As String = Nothing Dim id As String = Nothing Dim path As String = Nothing
Why are you setting variables to nothing ? default values of strings are already nothing, so you don't need to specifiate any value. :)
Also, you should use :
PHP Code
<?php Using Web As New WebClient 'do End Using
(Jan 11, 2015 12:55 PM)Naywyn Wrote: I don't understand that part :
PHP Code
<?php Dim imgURL As String = Nothing Dim id As String = Nothing Dim path As String = Nothing
Why are you setting variables to nothing ? default values of strings are already nothing, so you don't need to specifiate any value. :)
Also, you should use :
PHP Code
<?php Using Web As New WebClient 'do End Using
I didn't change that part of the code, that is the original code :P
DO NOT DEAL WITH THIS MEMBER
(Jan 11, 2015 12:55 PM)Naywyn Wrote: I don't understand that part :
PHP Code
<?php Dim imgURL As String = Nothing Dim id As String = Nothing Dim path As String = Nothing
Why are you setting variables to nothing ? default values of strings are already nothing, so you don't need to specifiate any value. :)
You do it to initialize the variable. Avoids null reference cases when reading without assigning a value along with various other reasons.
|