Wget/bash downloading certain DIV

3

I just came across this problem and my little knowledge in programming is killing me right now ;) So, i have a certain gallery on a image sharing website this is ImageBam, i have never downloaded images from this website.

right now I am using this code:

wget -P pics -H -nd -r -A '.jpg,.jpeg,.png,.gif,' -erobots=off http://www.imagebam.com/gallery/hwtfu6m7es3gun1emmpy2uheohrcckmt/

This code is downloading the whole website, when i only need to download content from a certain DIV, that includes thumbnails and original image.

Do you know if its possible to create a script in bash or any other language to download content from one div and not the whole webiste and all the possible hyperlinks ?

thanks for help

user29200

Posted 2012-12-23T23:18:04.347

Reputation: 31

Answers

0

Scrapy would be a good option.

daya

Posted 2012-12-23T23:18:04.347

Reputation: 2 445

0

wget is not meant to parse files, only download them.

What you want is cURL which is like wget, but with the added ability to parse files for the desired target.

Synetech

Posted 2012-12-23T23:18:04.347

Reputation: 63 242

cool, thanks for that, but how can I make it download images and thumbnails ? – user29200 – 2012-12-23T23:43:57.197

Hmm, I think I am thinking of cURL in the context of PHP. In that case, you would use XPath to denote the target DIV. I’m guessing that you are not looking to do any programming, so I’ll check for a simpler option… – Synetech – 2012-12-24T00:16:27.593