Help with axel

Ask for help about FlashGot, no registration needed to post
batman
Posts: 1
Joined: Mon Oct 26, 2015 2:30 pm

Help with axel

Post by batman » Mon Oct 26, 2015 3:04 pm

Hi there, I'm linux user and so far I'm fan of using Axel as my downloader on firefox.
Axel can give you the option of putting all the threads you want (You can put even a 1000, even if the server only support 8) Problem is that when I use Flashgot's own option for Axel it always uses 4. I try my own option but it's not as good as the original. So could you please give the script you use for Flashgot's inbuilt option please?
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0

eexpss

Re: Help with axel

Post by eexpss » Thu Oct 19, 2017 8:59 am

Same here, only 4 threads. Flashgot has no inputbox to add parameter for axel now. and axel ignore ~/.axelrc and /etc/axelrc. So strange.
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0

userr

Re: Help with axel

Post by userr » Fri Oct 20, 2017 6:21 pm

From DMS.js:

Code: Select all

  dm = new FlashGotDMX("Axel", "axel", '-n 4 [-o FNAME] [URL]');
  dm.terminal = true;
  dm.createJob = function(links, opType) {
    this.argsTemplate = this.argsTemplate.replace(/\b-n \d+/, "-n " + this.getPref("connections", 4));
    this._checkAxelFeatures();
    return this.__proto__.createJob.call(this, links , opType);
  };
  dm._checkAxelFeatures = function() {
    const outFile = fg.tmpDir.clone();
    outFile.append("axelHelp.txt");
    this.performJob(this.unixCmd + " -h >'" + outFile.path + "' 2>&1", true);
    if(IO.readFile(outFile).indexOf("--header") < 0) {
      this.cookieSupport = false;
    } else {
      this.cookieSupport = true;
      this.argsTemplate = '[-H Cookie:COOKIE] [-H Referer:REFERER] ' + this.argsTemplate;
    }
    this.checkCookieSupport();
    this._checkAxelFeatures = function() {};
  }
Which means:
1) You can override the number of connections with flashgot.dmsopts.Axel.connections pref (use about:config to change/create it).
2) The command line template FlashGot uses is one of these two, depending on whether your version supports the "--header" switch. The "4" in the commad line gets replaced with your pref if it exists.
Supports:

Code: Select all

[-H Cookie:COOKIE] [-H Referer:REFERER] -n 4 [-o FNAME] [URL]
Doesn't:

Code: Select all

-n 4 [-o FNAME] [URL] 
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 SeaMonkey/2.25

Post Reply