MozillaZine

leech extension

Talk about add-ons and extension development.
peter
 
Posts: 6
Joined: November 5th, 2002, 4:59 pm

Post Posted November 10th, 2002, 5:34 pm

has anyone gotten the leech extension http://leech.mozdev.org to work with phoenix? i'm using the 11/08 nightly. selecting "Basic" causes a few modem lights to flash, but nothing gets downloaded. selecting "Separately" opens all the tabs as requested. phoenix crashes after a few minutes with all those tabs open, however.

drathos

User avatar
 
Posts: 87
Joined: November 5th, 2002, 5:55 am
Location: Ashburn, VA

Post Posted November 11th, 2002, 7:30 am

I've gotten it to work, but I think it needs a bit of work before it really becomes usefull. Whenever it's downloading anything, phoenix is completely useless as the entire session is hung until the download finishes. It should do the downloads in the background and not interfere with normal browsing.

One thing you may want to check is that all the paths in the leech preferences are correct (especially the path to wget). I'm not sure if the leech extension will create the default directories if they aren't already present.

peter
 
Posts: 6
Joined: November 5th, 2002, 4:59 pm

Post Posted November 11th, 2002, 10:35 am

well i'd like to use it without wget. does it work in phoenix without wget?

drathos

User avatar
 
Posts: 87
Joined: November 5th, 2002, 5:55 am
Location: Ashburn, VA

Post Posted November 11th, 2002, 10:52 am

peter wrote:well i'd like to use it without wget. does it work in phoenix without wget?


i know that i can, but i haven't used it that way since wget is a great download tool.

ther is an option in the leech prefs to set wether or not to use wget for 'Leech With Prefix'. i've never gotten basic to actually download anything and separately opens everything in a tab to download it.. not exactly what i'd consider optimal..

peter
 
Posts: 6
Joined: November 5th, 2002, 4:59 pm

Post Posted November 11th, 2002, 11:36 am

you know... wget isn't so bad. i think i'll use that for now. however, do you know how to setup leech so that it will accept spaces in the path to the download directory? i've tried using quotes around the path, %20 for spaces, and a combination of the two, but nothing works.

drathos

User avatar
 
Posts: 87
Joined: November 5th, 2002, 5:55 am
Location: Ashburn, VA

Post Posted November 11th, 2002, 11:46 am

peter wrote:however, do you know how to setup leech so that it will accept spaces in the path to the download directory? i've tried using quotes around the path, %20 for spaces, and a combination of the two, but nothing works.


dunno as i generally don't use spaces for file/directory names.. i just tried a couple things and got one odd result (in linux): using '/home/drathos/test\ dl' for a directory (as my shell tends to treat spaces in filenames) it ignored the directory i already had created and made a directory called '/home/drathos/test%20dl' and started downloading into that one.. odd..

SiW
 
Posts: 2
Joined: November 12th, 2002, 8:50 am
Location: Algona, IA

Post Posted November 12th, 2002, 9:42 am

I've not been on top of leech development for a while, too busy with real work. But I'm in that awkward position where leech does precisely what *I* want it to do, so the desire to spend my time on it is fading away. Perhaps I could look for someone to take over as maintainer?

I know some people are having trouble with leech working at all, and it usually boils down to one of these things:

a) leech is not picking out the links from the page properly - this is especially likely with certain configurations of frames

b) the files are protected from being downloaded, usually referer protection. If you're using leech to download porn - and I know a lot of people are - then "basic" is hardly likely to work anymore. "leech with wget" has never failed. "separately" usually works for images, but is a horrible workaround for the fact that Mozilla doesn't allow you to specify a referer when calling the saveURI function

c) user error in entering the download directory properly with the trailing slash

d) user error in setting wget up properly

e) files get downloaded but they get placed somewhere the user isn't expecting, often this happens with wget and "leech entire site from here". There's a bug either in leech or certain versions of wget that is dumping things in a (for example) @5Ctemp@5Cimages@5C directory in the last place you download a file to, instead of correctly placing things under c:\temp\images\

f) it's entirely possible that recent versions of Mozilla and/or Phoenix have changed something regarding the download manager and broken the "basic" download mode of leech. A quick test in Phoenix 0.4 seems to show this. I believe the download manager to be incomplete anyway, and the API definitely is. It was quite a miracle that leech worked at all. This is why I decided to change leech to be an interface to wget.

drathos, I find it interesting that you say Phoenix freezes while downloading with leech. Presumably you are using wget, as that's apparently all that's working now. I don't see this in Windows at all - perhaps this is a problem with Mozilla's execute function under Linux?

drathos

User avatar
 
Posts: 87
Joined: November 5th, 2002, 5:55 am
Location: Ashburn, VA

Post Posted November 13th, 2002, 7:45 am

SiW wrote:drathos, I find it interesting that you say Phoenix freezes while downloading with leech. Presumably you are using wget, as that's apparently all that's working now. I don't see this in Windows at all - perhaps this is a problem with Mozilla's execute function under Linux?


that's a possibility.. i haven't booted into windows in almost a year..

what happens is that leech launches the wget process and phoenix just sits and waits for it to finish. i would love to help find a solution, but i know nothing of mozilla/phoenix extension programming. i think i see where wget is being launched (in phoenix/chrome/leech/content/leechOverlay.js) but i don't know how to make phoenix launch apps in the background. i tried adding a '&' to the end of the command line you build, but phoenix didn't seem to like that..

SiW
 
Posts: 2
Joined: November 12th, 2002, 8:50 am
Location: Algona, IA

Post Posted November 13th, 2002, 2:35 pm

oh.. oh.. wait.. isn't there a switch for wget to send things to the background? I don't have time to look now (yet I have time to post this.. odd) but I'll look later.

drathos

User avatar
 
Posts: 87
Joined: November 5th, 2002, 5:55 am
Location: Ashburn, VA

Post Posted November 14th, 2002, 7:37 am

SiW wrote:oh.. oh.. wait.. isn't there a switch for wget to send things to the background? I don't have time to look now (yet I have time to post this.. odd) but I'll look later.


yeah.. -b or --background

i just tried adding that and it works great..

drathos

User avatar
 
Posts: 87
Joined: November 5th, 2002, 5:55 am
Location: Ashburn, VA

Post Posted November 14th, 2002, 12:49 pm

just thought of a possible problem when using wget in the background. when you launch it with the leech extension, a file is created that has all the files that are to be downloaded. if you start another leech while the first one is still downloading, that file gets overwritten and you will have two competing wget processes.

one way around it is to use some form of random filename generation for creating that file. (something similar to the ???.slt directory that's created for new profiles)

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 3 guests