2 Replies - 6268 Views - Last Post: 29 March 2010 - 04:10 PM Rate Topic: -----

#1 irobot  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 41
  • Joined: 02-August 09

Extract images from website

Posted 27 March 2010 - 10:58 AM

Good day all, I am trying to figure a way to extract images from a website or webpage using java. I have been hearing of using a parser but don't really know much about it. I was wondering if there is any other way i can go about it or links about using parsers in my code. i have checked java api docs and have not found something concrete except i missed something.

by the way, can this solution also work in j2me cos thats where i need it most. Thank you

This post has been edited by irobot: 27 March 2010 - 11:01 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Extract images from website

#2 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2876
  • View blog
  • Posts: 11,051
  • Joined: 15-July 08

Re: Extract images from website

Posted 28 March 2010 - 07:49 PM

I do not know about J2ME, but I can help you do this with normal Java. What you have to do is read the source code of the website: See Here How. Then just search for the img tags.

Now, once you find the image source, all you must do is download them.
For small images, you can use ImageIO.read(): Part 1 of my tutorial here: http://www.dreaminco...howtopic=162748
For larger images, you may want to consider a Swing Worker, which a simple way for multi-threaded GUIs: Part 3 of my tutorial here: http://www.dreaminco...howtopic=162999
Was This Post Helpful? 2
  • +
  • -

#3 irobot  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 41
  • Joined: 02-August 09

Re: Extract images from website

Posted 29 March 2010 - 04:10 PM

Thank you very much!.. will look into those links and i hope i can find a solution in there that will allow me to choose selected images. Thanks once again

This post has been edited by irobot: 29 March 2010 - 04:40 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1