Jump to content

getting pictures off websites using vb.net


RSBDavid

Recommended Posts

Lets say I wanted to get all the pics off a certain page of a website. How would i go about doing that.

 

 

 

This is all I have so far:

 

 

 


Public Class Form1

   Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

       Dim getfile As System.Net.WebClient

       getfile = New System.Net.WebClient

       Dim src As String = getfile.DownloadString("http://img.4chan.org/b/imgboard.html")

       src = src.Substring(InStr(src, ("http://img.4chan.org/b/src/")))

       txtItems.Text = (src.ToString)

   End Sub

End Class

 

 

 

 

 

Edit: I tried the code above and all it does is show the source code. At least I am getting somewhere.

 

(and yes I used 4chan as an EXAMPLE!. It is not the actual site I plan to use it on.

 

I am pretty much lost after that. Would I have to download the string of the website then parse the html based on the "< img src""> tag?

 

 

 

*waits for Clare to help*

wii_wheaton.png

[software Engineer] -

[Ability Bar Suggestion] - [Gaming Enthusiast]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.