downthemall / anticontainer

DownThemAll! AntiContainer (Extension to a Firefox, Seamonkey extension)
Mozilla Public License 2.0
93 stars 41 forks source link

Expander Usage #34

Closed Caynadian closed 11 years ago

Caynadian commented 12 years ago

I have a site that uses page #s to link to the individual image pages. For example. the blog will have some text story and then at the bottom will have 1 2 3 4 5 6 7 8 9 10 11 12... etc. Each of the numbers will link to a page with 1 or more images (full size, not linked). Could I create an expander that would create a new job for each number and then each new job would download the images on it's page? Thanks!

Caynadian commented 12 years ago

See http://www.moejackson.com/2011-zulay-henao-boy-wonder-havana-heat-terrence-howard-fighting-0930 for an example.

Caynadian commented 12 years ago

A better example: http://www.moejackson.com/2011-kathleen-robertson-starz-boss-kelsey-grammer-connie-nielsen-1007

poke commented 12 years ago

Yeah, you can use an expander for that. You basically create an expander plugin for the pages that contain the links to the images. Then you specify what the expander should match and it will create an additional download job for each matched link. If those image links are container pages themselves, then you need another plugin (probably a resolver) that gets the single image link out of it. This is how it is done for Facebook galleries (although it’s broken for yet unknown reasons, need to investigate there), so you can get the basic idea by looking at that’s source.

In case not all page links are shown, you can’t do it that easily. For example for the studivz galleries, not all page links are visible at once, so one idea is to also detect all pages for each sub-page. However then you’ll end up with duplicated links. What we did then was creating a custom sandbox that in the first step opens all pages and internally stores all photo links. Then in the second step, the expander functionality (addDownload) can be used to spawn a new download for the stored image links. From then one, a second plugin handles the single photo download.

I’ll try to update the documentation for the expander quickly, so you can get additional information on how to use it. Otherwise feel free to ask, if you have further questions.

nmaier commented 11 years ago

Actually a dupe of issue #9