Scrapping Images from webPage
I am trying to save all the images from the webpage...can anyone help me with this
I know what I have to do but I am unable to figure out how to do it
what i have done till now is
Code:
public void actionPerformed(ActionEvent e) {
if (e.getSource() == jButton2) {
fc.showOpenDialog(this);
File selFile = fc.getSelectedFile();
BufferedReader inputStream;
try {
inputStream = new BufferedReader(new FileReader(selFile));
String l;
while ((l = inputStream.readLine()) != null) {
System.out.println(l);
}
} catch (Exception ex) {
Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex);
} finally {
try {
ScrapData sc = new ScrapData();
} catch (Exception ex) {
Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
}
}
what above code does is that we save the webpage full manually ..it gets the code of the page
what i want is i give the url path and it save the images in one folder