npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-lixian

v2.0.16

Published

非官方迅雷离线下载服务 api for nodejs

Downloads

19

Readme

node-lixian

非官方迅雷离线下载服务 API for nodejs,全部使用 JavaScript 编写,移植自 使用 python 编写的 xunlei-lixian 脚本

安装和使用

npm install node-lixian --save
var Lixian = require('node-lixian');
var lixian = new Lixian();

lixian.init({}, function(e){
  if(e) return;

  lixian.login({
    username: '[email protected]',
    password: 'pAS5w0rD'
  }, function(e){
    if(e) return;

    lixian.list({}, function(e, list){
      if(e) return;

      console.log(list);      
    });
  })
});

通过命令行调用

  Usage: lixian [选项] [命令] [更多命令..]

  命令按顺序执行,所有的命令有:

  * login: 登录, 选项: username, password / hashed_password
  * list: 列出所有任务
  * delete_task: 删除单个任务, options: id
  * add_url: 增加一个下载任务, options: url
  * add_torrent: 通过种子文件增加一个下载任务, options: torrent

  Options:

    -h, --help                              output usage information
    -V, --version                           output the version number
    -u --username <username>                用户名
    -p --password <password>                密码
    -P --hashed-password <hashed-password>  md5(md5(密码))
    -c --cookie-path <path>                 用于储存和读取 Cookie 的 JSON 文件
    -d --delete <id>                        要删除的任务的 id
    -U --url <url>                          要增加的任务的 URL
    -t --torrent <path>                     要增加的 BT 种子
    -D --debug                              输出大量的调试信息
    -V --novcode                            不要让我在命令行输入验证码

比如:添加一个任务,然后列出列表

lixian --username "[email protected]" --password "pAS5w0rD" --url "http://xxx.com/xx.tar.gz" login add_url list

API

  • lixian.init({ cookie: JSON.parse(fs.readFileSync('cookies.json')) }, function(e){ });
  • lixian.logon; /* true or false */
  • lixian.dumpCookie(); /* Object */
  • lixian.login({username: '[email protected]', password: 'pAS5w0rD'}, function(e){ });
  • lixian.list({}, function(e, list){ });
  • lixian.delete_task({delete: '1234567'}, function(e){ });
  • lixian.add_url({url: 'http://xxx.com/xx.tar.gz'}, function(e){ });
  • lixian.add_torrent({torrent: 'http://xxx.com/xx.tar.gz'}, function(e){ });
  • lixian.vcodeHandler = function(verification_code_image_data_url, cb){ cb(null/* error */, 'aFe4'/* 4-chars verification code */); };

代码授权

The MIT License (MIT)