0

I am learning basics of web scraping. I would like to automate following process

  1. Go to a site for example: http://www.vesseltracker.com

  2. Provide the vessel name or MMSI number

  3. Download the image of the vessel

  4. Repeat this process

I followed the

Get all Images from WebPage Program | Java

link to get the basic but with little success. Could any one provide me with example in java??

Thanks a lot in advance

Community
  • 1
  • 1
user745475
  • 95
  • 1
  • 3
  • 11

1 Answers1

0

Either of the examples on the stack-overflow question that you referenced should work for downloading images. Simply replace the System.out.println line with Ben Noland's saveUrl function from this stack-overflow question.

If you want a specific image, you'll need to determine how you want to filter it out from the others. Perhaps only save the images that contain /vessel/ in the url?

Community
  • 1
  • 1
David
  • 13,133
  • 1
  • 30
  • 39