[Ext] ThumbsDown 0.22.5 - Bulk image downloader - 2016-03-28

Announce and Discuss the Latest Theme and Extension Releases.
Post Reply
uviol5
Posts: 2
Joined: February 21st, 2009, 2:37 pm

Re: [Ext] ThumbsDown 0.12.1 - Bulk/mass image downloader

Post by uviol5 »

Thanks for your quick answer!

Yes I'm pretty sure code is correct and images do exist but yes i suspected that problem might be the frames i just didn't know that it's not supported yet hm... yes it was imagevenue but i made script for imagevenue itself and it works fine problem appears when this images are linked via usercash so thumbnail is at imagevenue, link is at usercash and destination image is at imagevenue... the difference is imagevenue has no frames on destination page but usercash does frames..
could you explain please how this wrapped thing works? i couldn't find info at user guide page... i'll try to do it via wrapped script
Thanks again!
neojam
Posts: 35
Joined: April 6th, 2008, 10:43 am

Re: [Ext] ThumbsDown 0.12.1 - Bulk/mass image downloader

Post by neojam »

Wrapped works almost exactly like the custom script you've posted before. The only difference is that you can post regex or imageID (in your case "thepic") in a input field, instead of inserting it in a custom script.

Unfortunately wrapped won't work on usercash.com links, since they lead to a page with few several frames. :(

I've found an example you've asked, ake79:
thumb:
http://img227.imagevenue.com/loc357/th_ ... _357lo.jpg

link of the thumb, to the page with fullsize image (contains unappropriate ads):
hxxp://6074016705621.usercash.com/
ake79
Posts: 1344
Joined: February 17th, 2007, 6:05 am

Re: [Ext] ThumbsDown 0.12.1 - Bulk/mass image downloader

Post by ake79 »

Yes, Wrapped works like neojam said. Except in this case it doesn't work, as wrapped scripts can't handle frames.

But if you have working imagevenue script, make another script for usercash like this:

Code: Select all

name: usercash.com
matcher: http://\d+\.usercash\.com/
type: Custom
code:
switch (state) {
  case 0:
    LOAD(linkUrl);
  case 1:
    var frames = document.getElementsByTagName("frame");
    var frame = frames[1];
    REDIRECT(frame.src);
}


Should work.
My extensions: Save File to | ThumbsDown
neojam
Posts: 35
Joined: April 6th, 2008, 10:43 am

Re: [Ext] ThumbsDown 0.12.1 - Bulk/mass image downloader

Post by neojam »

yep, custom script works like a charm ^^
n2k
Posts: 4
Joined: April 5th, 2009, 4:41 pm

Re: [Ext] ThumbsDown 0.12.1 - Bulk/mass image downloader

Post by n2k »

Really nice add-on. Though not so user friendly yet. There's no -right of the bat- functionality, and most of the time users still need to know RegExp to make good use of this add-on.

Here is some feedback:
  • It would be nice if there were scripts atleast for the popular image galleries / share sites.
  • The Script Wizard, usually works like a charm, though sometimes at the start the links/pictures fail to load, or something else goes wrong, you cannot click next, resulting in not completing the script with the wizard.
  • If you are using RegExp in the Script Wizard and you cannot find a match to all filenames with a pattern (last step), you also cannot click next, same result as above ](*,)
  • It would be nice if somehow the user could be telling what script is 'in action' (while/after selecting images).
  • If there are lots of scripts, some might be overlapping, it would be nice to see some kind of priority list (also quick enabling/disabling scripts) would help.
  • Maybe add the possibility to use the same Matcher and Pattern rule but different Templates in different situations.
  • To really blow life into this add-on users should have a place to share scripts made by users for users :)

And a question, if you got an image-map how can I fetch the large pictures (since there are no thumbs, and no direct links I guess)?

Greets,
n2k
ake79
Posts: 1344
Joined: February 17th, 2007, 6:05 am

Re: [Ext] ThumbsDown 0.12.1 - Bulk/mass image downloader

Post by ake79 »

Thanks for the feedback, n2k. It's much appreciated.

About that user friendliness. You are right. It's just that being user-friendly takes time and effort, and I'm lazy. Apart from a couple of features that people have requested in this thread, I usually make changes only when something crosses my annoyance threshold ;)

1. True, but not likely to happen. If I add one, people ask for another. After I have added N scripts, one of the site changes, script breaks and I need to do a completely new release. The whole idea behind ThumbsDown is that people can write scripts themselves so I don't have to ;) Point 7 is probably more realistic solution for this.

2 This is intentional. It's kind of hard for the wizard to do anything intelligent if it doesn't have thumbnails/pages/images to work with. You have noticed, that you only need to two for the Next to be activated. And in the image page (2nd page), even if the image load fails (you get broken image icon), you can still usually figure out the correct one based on the file name and select it. But you are right, there's a room for improvement here. And bug reports are welcomed on those "something else goes wrong".

3. Intentional as well. It wouldn't make much sense to create a script that doesn't even match all the thumbnails on the page (or at least the ones you selected in the wizard). When you are creating a new script and the wizard fails to generate regexp, 1) regexp script is just not possible (-> go back and try Wrapped, or Custom) or 2) it's a bug (0.13 will fix a couple of these).

4. Hmm... Any ideas how this would work. I have considered some help for "debugging" in thumbnail's context menu. Or maybe on thumbnail hover showing some kind of tooltip or just message in the statusbar. Thoughts?

5. Added to todo.

6. Umm... How do you recognize these "different situations" if not via matcher and pattern. This has not been a problem for me as I usually write quite strict regexps.

7. Yeah, you are right. And not the first to say this. I have meant to create simple forum for ThumbsDown, but just haven't get around to do it.

Imagemaps are not supported at the moment. Added to todo.
My extensions: Save File to | ThumbsDown
n2k
Posts: 4
Joined: April 5th, 2009, 4:41 pm

Re: [Ext] ThumbsDown 0.12.1 - Bulk/mass image downloader

Post by n2k »

ake79 wrote:2 This is intentional. It's kind of hard for the wizard to do anything intelligent if it doesn't have thumbnails/pages/images to work with. You have noticed, that you only need to two for the Next to be activated. And in the image page (2nd page), even if the image load fails (you get broken image icon), you can still usually figure out the correct one based on the file name and select it. But you are right, there's a room for improvement here. And bug reports are welcomed on those "something else goes wrong".

If you're saying in all cases I only need 2 images, then this doesn't need to be fixed :p
Also make sure to let the user know somewhere that they atleast need to select 2 images, I've seen 'reviews' on the moz page that they can't click next because of that >_>;
[the average user is stupid]

ake79 wrote:3. Intentional as well. It wouldn't make much sense to create a script that doesn't even match all the thumbnails on the page (or at least the ones you selected in the wizard). When you are creating a new script and the wizard fails to generate regexp, 1) regexp script is just not possible (-> go back and try Wrapped, or Custom) or 2) it's a bug (0.13 will fix a couple of these).

I've had situations that they pull out the large images from different content servers, which I then can't match?
Ok I might suck at RegExp, what would you use for this:

Code: Select all

http://content2.xxxx.com/xxxx/1234/tn_01.jpg # thumbnail/pattern
http://content3.xxxx.com/xxxx/1234/01.jpg    # large picture


ake79 wrote:4. Hmm... Any ideas how this would work. I have considered some help for "debugging" in thumbnail's context menu. Or maybe on thumbnail hover showing some kind of tooltip or just message in the statusbar. Thoughts?

I'd suggest putting thet script name next to the number of selected images in the status bar. Probably also in the context menu, at the top, grayed out the script name.
That tooltip is fancy too :mrgreen:

ake79 wrote:6. Umm... How do you recognize these "different situations" if not via matcher and pattern. This has not been a problem for me as I usually write quite strict regexps.

The user recognizes "different situations" don't. The user can choose what Template to use in the context menu or before confirming the download.
In my opinion this is useful for a major RegExp that matches the Matcher/Pattern a lot of the pages constructed in the same way, but with different outputs that makes it impossible to use 1 Template.

Another question:
How would you setup ThumbsDown in order to grab these:

Code: Select all

http://www.xxxx.com/content/2009/04/02/1238695089-yP8w4d.jpg # thumb/pattern
http://www.xxxx.com/content/2009/04/02/1238695089-qRvKB6.jpg # large picture


And these:

Code: Select all

http://www.xxxx.com/gallery/thumbs/2585-13.jpg     # thumb/pattern
http://www.xxxx.com/gallery/thumbs/lrg-2585-13.jpg # large pic
ake79
Posts: 1344
Joined: February 17th, 2007, 6:05 am

Re: [Ext] ThumbsDown 0.12.1 - Bulk/mass image downloader

Post by ake79 »

If you're saying in all cases I only need 2 images

Yes, two at minimum. No need to select all the available thumbnails in the wizard.

Also make sure to let the user know somewhere that they atleast need to select 2 images, I've seen 'reviews' on the moz page that they can't click next because of that >_>;


Do you mean that that isn't crystal clear from the plural form in the description: "Select the thumbnails for which you want to create a script." :-"

And reviews are just people's opinions, so there's no point in arguing. If they actually have a problem, surely they'll post here :D

(Seriously though, one can't have a discussion in the reviews, so I don't even bother to reply to them. And did I mention that reviews are for reviews, not for bug reports or pleas for help.)

ake79 wrote:When you are creating a new script and the wizard fails to generate regexp, 1) regexp script is just not possible (-> go back and try Wrapped, or Custom) or 2) it's a bug (0.13 will fix a couple of these).

Ok I might suck at RegExp, what would you use for this:

Code: Select all

http://content2.xxxx.com/xxxx/1234/tn_01.jpg # thumbnail/pattern
http://content3.xxxx.com/xxxx/1234/01.jpg    # large picture


Regexp script is not possible because you can't get that '3' in 'content' from anywhere. So, try Wrapped. If that doesn't work, Custom is the only way.

(Yes, it would be nice if the wizard actually said that you can't use RegExp script for that. Hopefully in the future...)

I'd suggest putting thet script name next to the number of selected images in the status bar.

Putting the script's name next in statusbar doesn't work because you can have multiple scripts matching different thumbnails in a web page and thus you would have multiple names there. But I'll see what I can come up with.

ake79 wrote:6. Umm... How do you recognize these "different situations" if not via matcher and pattern. This has not been a problem for me as I usually write quite strict regexps.

The user recognizes "different situations" don't. The user can choose what Template to use in the context menu or before confirming the download.
In my opinion this is useful for a major RegExp that matches the Matcher/Pattern a lot of the pages constructed in the same way, but with different outputs that makes it impossible to use 1 Template.

Hmm... Not really convinced. Imho, it's better to improve other aspects related to this than require more user interaction. I would expect that to become really annoying quite soon, if ThumbsDown started to ask things constantly.

Code: Select all

http://www.xxxx.com/content/2009/04/02/1238695089-yP8w4d.jpg # thumb/pattern
http://www.xxxx.com/content/2009/04/02/1238695089-qRvKB6.jpg # large picture

Same as above, RegExp is not possible because you can't get that "qRvKB6" from anywhere. Try Wrapped.

Code: Select all

http://www.xxxx.com/gallery/thumbs/2585-13.jpg     # thumb/pattern
http://www.xxxx.com/gallery/thumbs/lrg-2585-13.jpg # large pic

Did you copy-paste correctly. Just wondering because that seems quite simple.

Code: Select all

http://www.xxxx.com/gallery/thumbs/([-\d]+).jpg
http://www.xxxx.com/gallery/thumbs/lrg-$1.jpg

That may be unnecessarily fancy. "(.+).jpg" would work most likely just as well.
Last edited by ake79 on April 10th, 2009, 2:13 am, edited 1 time in total.
My extensions: Save File to | ThumbsDown
n2k
Posts: 4
Joined: April 5th, 2009, 4:41 pm

Re: [Ext] ThumbsDown 0.12.1 - Bulk/mass image downloader

Post by n2k »

ake79 wrote:Yes, two at minimum. No need to select all the available thumbnails in the wizard.
Do you mean that that isn't crystal clear from the plural form in the description: "Select the thumbnails for which you want to create a script." :-"

Well for me it wasn't :p - I kinda mixed up the intention of my question too.
It reads like you have to select all the thumbs you want, to be able for the wizard to make a decision out of that. In which you now say, only 2 are needed.
This is just minor :p - no problem

Code: Select all

http://www.xxxx.com/content/2009/04/02/1238695089-yP8w4d.jpg # thumb/pattern
http://www.xxxx.com/content/2009/04/02/1238695089-qRvKB6.jpg # large picture

Same as above, RegExp is not possible because you can't get that "qRvKB6" from anywhere. Try Wrapped.

Wrapped doesn't work, though I'm not quite sure what its looking for with RegExp. if there's an id to look for, it works, but not with RegExp.
So right now me personally can't get it to work if there are no id's attached :)

Code: Select all

http://www.xxxx.com/gallery/thumbs/([-\d]+).jpg
http://www.xxxx.com/gallery/thumbs/lrg-$1.jpg

Did you copy-paste correctly. Just wondering because that seems quite simple.

Yup I did copy-paste correctly, I just didn't think of that (geez it was too simple ](*,) )

Another question:
How can I tell RegExp to not match a word. example:

Code: Select all

http://(?:.+)(?:\.com|\.net|\.org)/

matches almost all the web urls (as intended) but for website http://www.mozillazine.org/, I want an exception, so it needs to not find the word mozillazine :)
This way ThumbsDown should grab the other script I intend to use for that site. Probably this will get fixed if you get a priority list :>

Thanks for the answers and responding to my feedback.
Greets,
n2k
Last edited by n2k on April 10th, 2009, 10:44 am, edited 1 time in total.
ake79
Posts: 1344
Joined: February 17th, 2007, 6:05 am

Re: [Ext] ThumbsDown 0.12.1 - Bulk/mass image downloader

Post by ake79 »

Release 0.13 - ChangeLog

I was going to release 0.13 when ff 3.1 came out (you see, matching version numbers ;)). But as that's not happening (ff got re-numbered to 3.5) and it's taking longer than I expected, I might as well release now.

No major changes. I changed slightly how Wrapped script works. Various tweaks in Script Wizard. Added LOG() method for Custom scripts. Translations for es-CL and pt-PT.

Also, finally managed to update the User Guide a bit.

Next, various things that n2k mentioned.
Last edited by ake79 on April 10th, 2009, 9:39 am, edited 1 time in total.
My extensions: Save File to | ThumbsDown
ake79
Posts: 1344
Joined: February 17th, 2007, 6:05 am

Re: [Ext] ThumbsDown 0.12.1 - Bulk/mass image downloader

Post by ake79 »

Request from the past:
neojam wrote:do you plan on adding an option to run Thumbsdown on all open tabs?

I thought this over and decided, no. Mainly because I don't think that's a common use case, and I want to limit ThumbsDown to work in the visible tab.

But I changed the code so that it's possible.

So, I installed Custom Buttons² and created button with following piece of code. There's nothing Custom Buttons² specific so the code should work in any other similar extension.

Code: Select all

function downloadFromBrowser(browser)
{
  gThumbsDown.activate(browser);
  gThumbsDown.selectAll(browser);
  gThumbsDown.download(browser);
}

function downloadFromBrowsers(browsers)
{
   if (browsers.length > 0)
   {
     downloadFromBrowser(browsers[0]);
     // non-zero delay so that dta window has time to start opening if it's not yet opened
     setTimeout(downloadFromBrowsers, 1, browsers.slice(1));
   }
}

downloadFromBrowsers(gBrowser.browsers);

As you can read from the first function, it activates ThumbsDown, selects all the thumbnails and starts the download for each browser (tab). I had minor timing problems in the second function while looping through the tabs, but it should work. If it doesn't, let me know.
My extensions: Save File to | ThumbsDown
ake79
Posts: 1344
Joined: February 17th, 2007, 6:05 am

Re: [Ext] ThumbsDown 0.12.1 - Bulk/mass image downloader

Post by ake79 »

n2k wrote:How can I tell RegExp to not match a word. example:

Code: Select all

http://(?:.+)(?:\.com|\.net|\.org)/

matches almost all the web urls (as intended) but for website http://www.mozillazine.org/, I want an exception, so it needs to not find the word mozillazine :)


Sorry, I missed this earlier. Answer to your question: not-matching is not possible.
My extensions: Save File to | ThumbsDown
neojam
Posts: 35
Joined: April 6th, 2008, 10:43 am

Re: [Ext] ThumbsDown 0.13 - Bulk image downloader - 2009-04-10

Post by neojam »

Thanks a lot for the CustomButtons script (seems to be working with no probs so far) and sorry for so late reply!

Edit:
The only problem i've noticed, is that dta manager hangs itself often while loading downloads if dta window wasn't already open before i ran your CB² script... So as a workaround, i first open dta and then run your script, which seem to always work.


Btw i have 2 more questions:
1) Is it possible to download images if they don't have an actual matcher link, but an "onclick=" function?
Here is an example page (clickable thumbs located under the "Product images"):
http://www.yamatotoysusa.com/page.cfm/486

2)
What if a matcher link points you to a page with several images that you want to download...
Is there some custom script which will allow me to download them all?
Example page (matcher is the 2nd link under the bigger picture):
http://www.amiami.com/shop/ProductInfo/ ... _id/120898
(matcher, in case you couldn't find it :wink: )
http://www.amiami.com/shop?vgForm=Produ ... eview.html)

I've tried built-in custom script, but it only downloads the first matching image, ignoring all other images that also match my regex in the custom script.
Last edited by neojam on May 4th, 2009, 10:42 am, edited 3 times in total.
User avatar
KaaMoS
Posts: 41
Joined: November 3rd, 2008, 12:59 pm
Location: Hölle

Re: [Ext] ThumbsDown 0.13 - Bulk image downloader - 2009-04-10

Post by KaaMoS »

Hi to all..!

I'm not an expert, so I don't know how to make scripts correctly.
I'd like add scripts for ImageVenue, but I don't know how to make them well... I'm very confused.

By casualities, any of you already have them?

On the other hand, I'd like to know if you're thinking about the creation of a WebPage which contents could be managed as "userscripts.org" do for "Greasemonkey", but your own Webpage for "ThumbsDown".


Thank you so much. Seems to be that your add-on really works, plus its scripts could be customized, very good!
I was using "Bulk Image Downloader", but it required an external (paid) software to do this work.

I'm an enthusiast about freeware (and by communities supported) add-ons.


Greetings!!
-=[ VERONIKA ZEMANOVÁ LOVER ]=-
neojam
Posts: 35
Joined: April 6th, 2008, 10:43 am

Re: [Ext] ThumbsDown 0.13 - Bulk image downloader - 2009-04-10

Post by neojam »

Hi KaaMoS,
this should work:

Code: Select all

Name: ImageHost - imagevenue.com
Matcher: http://.*img\d+\.imagevenue.com/img\.php.+\.(jpg|png|gif)
Type: Wrapped
Attribute: id
Value: thepic

The above will work only for as long they keep using "thepic" as element id for their images...
so maybe using custom script instead would be a better idea:

Code: Select all

Name: ImageHost - imagevenue.com
Matcher: http://.*img\d+\.imagevenue.com/img\.php.+\.(jpg|png|gif)
Type: Custom
Code:
switch (state) {
  case 0:
    LOAD(linkUrl);
  case 1:
    var attrName = "src";
    var attrValuePattern = "^http://img\\d+\\.imagevenue\\.com/.+/loc\\d+/.+\\.(jpg|png|gif)$";
    var re = new RegExp(attrValuePattern);
    var images = document.images;
    for (var i = 0; i < images.length; i++)
      if (re.test(images[i][attrName]))
        RETURN(images[i].src);
    break;
}

p.s.
Also if youre looking for usercash script, ake79 posted it above.
Post Reply