leech extension

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

leech extension

Post by peter »

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.
User avatar
drathos
Posts: 87
Joined: November 5th, 2002, 5:55 am
Location: Ashburn, VA

Re: leech extension

Post by drathos »

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 by peter »

well i'd like to use it without wget. does it work in phoenix without wget?
User avatar
drathos
Posts: 87
Joined: November 5th, 2002, 5:55 am
Location: Ashburn, VA

Post by drathos »

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 by peter »

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.
User avatar
drathos
Posts: 87
Joined: November 5th, 2002, 5:55 am
Location: Ashburn, VA

Post by drathos »

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
Contact:

Post by SiW »

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?
User avatar
drathos
Posts: 87
Joined: November 5th, 2002, 5:55 am
Location: Ashburn, VA

Post by drathos »

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
Contact:

Post by SiW »

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.
User avatar
drathos
Posts: 87
Joined: November 5th, 2002, 5:55 am
Location: Ashburn, VA

Post by drathos »

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..
User avatar
drathos
Posts: 87
Joined: November 5th, 2002, 5:55 am
Location: Ashburn, VA

Post by drathos »

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)
Post Reply