Coder Social home page Coder Social logo

layerssss / lixian-portal Goto Github PK

View Code? Open in Web Editor NEW
133.0 133.0 25.0 8.49 MB

一个简洁实用的 Web 版迅雷离线下载程序。

Home Page: https://github.com/layerssss/lixian-portal

License: MIT License

JavaScript 64.41% CoffeeScript 35.33% Shell 0.26%

lixian-portal's Introduction

lixian-portal

一个简洁实用的 Web 版迅雷离线下载程序。注:迅雷离线下载是仅为迅雷会员提供的服务,未开通会员的迅雷账户可能无法登录。

这是啥

我也不知道这是啥,见下一章说明吧

典型使用场景

  1. 家里有个 HTPC,运行着这个程序
  2. 我平常刷微博时发现先几个好看的电影,和想玩的游戏,然后再xxx上找到这些电影和游戏的ed2k链接,然后输入进去
  3. 周末我通过 samba 文件共享打开这个程序已经下好的电影和游戏,看之且玩之
  4. 室友也可以看(如果有室友的话)

界面预览

查看运行在 Michael Yin 家里的一个 lixian-portal 演示实例

2014-11-11 10 04 47 2014-11-11 10 06 34 2014-11-11 10 06 25 2014-11-11 10 06 43

环境

安装方法

  • 使用 NodeJS 自带的包管理器 npm 来安装该程序:npm install lixian-portal -g
  • 运行命令启动:lixian-portal
  • 下载的位置为启动这个程序的目录(Current Working Directory)
  • 如需下载到其他位置,可以设置环境变量LIXIAN_PORTAL_HOME,例如:可以这样启动程序LIXIAN_PORTAL_HOME=/mnt/sdb1 lixian-portal
  • 可以使用环境变量PORT设置程序监听的端口,默认为3000

Tricks

  • 如果想让它一直在后运行,可以使用这个命令启动nohup lixian-portal &

感谢

这个程序的核心逻辑主要参考了 @iambus 的作品 xunlei-lixian,没有他完成的分析迅雷API的工作,这个程序不可能这么容易地实现,在此向他表示感谢。

代码授权协议

The MIT License (MIT)

Copyright (c) 2013 Michael Yin

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

lixian-portal's People

Contributors

iambus avatar layerssss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lixian-portal's Issues

启动后报错

login
raise NotImplementedError('user is not logged in')

然后用浏览器打开,要输入用户名密码,是输入迅雷的吗?
我输入了,可是提示我要我输入EMAIL名称

帐号问题

在登录页面那里输入的是迅雷帐号的吧?如果是,那登录后提示“unhandled vcode”是什么意思呢?

throw er; // Unhandled 'error' event

connect deprecated multipart: use parser (multiparty, busboy, formidable) npm module instead ../../usr/lib/node_modules/lixian-portal/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js:56:20
connect deprecated limit: Restrict request size at location of read ../../usr/lib/node_modules/lixian-portal/node_modules/express/node_modules/connect/lib/middleware/multipart.js:86:15
connect deprecated methodOverride: use method-override npm module instead ../../usr/lib/node_modules/lixian-portal/app.iced:54:19
刷新任务列表 启动
未登录
刷新任务列表 失败

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: listen EADDRINUSE
  at errnoException (net.js:905:11)
  at Server._listen2 (net.js:1043:14)
  at listen (net.js:1065:10)
  at Server.listen (net.js:1139:5)
  at address (/usr/lib/node_modules/lixian-portal/app.iced:186:9)
  at /usr/lib/node_modules/lixian-portal/app.iced:187:3
  at Deferrals.runtime.Deferrals.Deferrals._call (/usr/lib/node_modules/lixian-portal/node_modules/iced-coffee-script/lib/coffee-script/iced.js:115:18)
  at /usr/lib/node_modules/lixian-portal/node_modules/iced-coffee-script/lib/coffee-script/iced.js:127:26
  at Object.runtime.trampoline (/usr/lib/node_modules/lixian-portal/node_modules/iced-coffee-script/lib/coffee-script/iced.js:94:16)
  at Deferrals.runtime.Deferrals.Deferrals._fulfill (/usr/lib/node_modules/lixian-portal/node_modules/iced-coffee-script/lib/coffee-script/iced.js:126:26)
  at ret (/usr/lib/node_modules/lixian-portal/node_modules/iced-coffee-script/lib/coffee-script/iced.js:65:20)
  at fs.js:272:14
  at Object.oncomplete (fs.js:108:15)

简化安装过程

对于非程序员用户,安装Nodejs 太麻烦了, 咱应该整个安装包出来,打包 python2, node

做到通过 ssh 安装,至少支持:

  • linux ARM6 (树莓派)
  • linux x86_64
  • linux i686
  • 某些路由器(arm6?)

某些时候重复地弹出输入验证码对话框

这应该是因为有很多错误情况没有处理,比如密码错误,或者网络错误、网络延时等。

在这个问题修复之前的临时解决办法:

第一次彈驗證碼輸入完以後還會彈的解決方法是,除了第一次輸入外,只要驗證碼不變其他的都直接點確定,然後就進去了。 由 @sicode 整理

不要再调用墙外资源,慢

  • 页面资源:调用 cdnjs 上的资源,还有 bootswatch 调用 googlefont 的 api
  • 更新图标: 调用 cloudfare 上的资源

运行出错

安装完毕后,运行回报错:
portal ready on http://0.0.0.0:3000/
Command failed: Traceback (most recent call last):
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian_cli.py", line 63, in
execute_command()
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian_cli.py", line 60, in execute_command
commandscommand
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian_cli_parser.py", line 165, in parse
return f(parser(args_list, _args, *_kwargs))
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian_commands/list.py", line 38, in list_task
client = create_client(args)
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian_commands/util.py", line 53, in create_client
return XunleiClient(args.username, args.password, args.cookies)
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian.py", line 58, in init
self.login()
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian.py", line 184, in login
raise NotImplementedError('user is not logged in')
NotImplementedError: user is not logged in
提示没有登录,我打开网页登录,一直没登上,终端有报错:
Command failed: Traceback (most recent call last):
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian_cli.py", line 63, in
execute_command()
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian_cli.py", line 60, in execute_command
commandscommand
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian_cli_parser.py", line 165, in parse
return f(parser(args_list, _args, *_kwargs))
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian_commands/login.py", line 40, in login
client = create_client(args)
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian_commands/util.py", line 53, in create_client
return XunleiClient(args.username, args.password, args.cookies)
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian.py", line 58, in init
self.login()
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian.py", line 191, in login
assert verifycode
AssertionError
手动调用xunlei_lixian登录后,再运行lixian-portal,网页能打开,但是一直显示正在刷新任务列表,终端报错:
portal ready on http://0.0.0.0:3000/
Command failed: Traceback (most recent call last):
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian_cli.py", line 63, in
execute_command()
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian_cli.py", line 60, in execute_command
commandscommand
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian_cli_parser.py", line 165, in parse
return f(parser(args_list, _args, *_kwargs))
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian_commands/list.py", line 47, in list_task
tasks = lixian_query.search_tasks(client, args)
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian_query.py", line 398, in search_tasks
base.query_search()
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian_query.py", line 153, in query_search
self.download_jobs += query.query_search()
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian_query.py", line 347, in query_search
return self.base.get_tasks()
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian_query.py", line 49, in get_tasks
self.tasks = self.fetch_tasks()
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian.py", line 266, in read_all_tasks
tasks, next_link = self.read_task_page(type_id)
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian.py", line 254, in read_task_page
return self.read_task_page_url(url)
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian.py", line 222, in read_task_page_url
data = parse_json_response(page)
File "/usr/lib/node_modules/lixian-portal/xunlei-lixian/lixian.py", line 646, in parse_json_response
raise RuntimeError('Invalid response')
RuntimeError: Invalid response
究竟咋回事?

运行没有效果

这是我在 Raspberry PI 上运行:
pi@raspberrypi ~/src/lixian-portal $ pwd
/home/pi/src/lixian-portal
pi@raspberrypi ~/src/lixian-portal $ node ./bin/lixian-portal
pi@raspberrypi ~/src/lixian-portal $

然后到浏览器
http://localhost:3000/login
找不到页面

No compatible version found: iced-coffee-script@'>=1.4.0c <1.5.0-'

npm ERR! message No compatible version found: iced-coffee-script@'>=1.4.0c <1.5.0-'
npm ERR! message Valid install targets:
npm ERR! message ["1.2.0-c","1.2.0-d","1.2.0-e","1.2.0-f","1.2.0-g","1.2.0-h","1.2.0-i","1.2.0-j","1.2.0-k","1.2.0-l","1.2.0-m","1.2.0-n","1.2.0-o","1.2.0-p","1.2.0-q","1.2.0-r","1.2.0-s","1.2.0-t","1.2.0-u","1.3.1-a","1.3.1-b","1.3.1-c","1.3.3-a","1.3.3-b","1.3.3-c","1.3.3-d","1.3.3-e","1.3.3-f","1.3.3-g","1.3.3-h","1.4.0-a","1.4.0-b","1.4.0-c"]

是在我的小树莓派上跑的 node 版本

这软件在raspberrypi上具体怎么用?

RT!
我家里有一个rpi,在rpi上我安装了iambus的离线迅雷脚本,为了实现用rpi挂硬盘下载然后用samba共享,我还需要做什么 ? 能不能具体讲一下。

0.3.10版本无法登录

image
现在是100%登录失败......

目前已知的情况:

  1. 需要登录输入验证码的帐号会出现这个问题

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.