xvfeng
V2EX  ›  Node.js

使用Nodejs写的一个在命令行下调用Jing.fm接口智能搜索播放歌曲小玩意

  •  
  •   xvfeng · Jul 4, 2013 · 4338 views
    This topic created in 4698 days ago, the information mentioned may be changed or developed.
    Github地址: https://github.com/fraserxu/jingfm-cli

    依赖模块:
    * commander.js (命令行工具)
    * Q (nodejs promise处理多个异步请求)
    * request (后端发送多次异步请求)

    ![jingfm-cli](https://f.cloud.github.com/assets/1183541/749676/cdf5cc76-e4b2-11e2-839c-84a24d8c99f7.png)

    主要调用[Jing.fm](http://jing.fm) API,非官方,貌似他们没有开放平台。之后通过后台多次请求获取歌曲地址,最后使用nodejs child_process 模块调用浏览器。

    这里主要使用`Q`完成多次异步请求处理。

    欢迎提交[pull request](https://github.com/fraserxu/jingfm-cli),各种[star](https://github.com/fraserxu/jingfm-cli).
    2 replies    1970-01-01 08:00:00 +08:00
    chemzqm
        1
    chemzqm  
       Jul 5, 2013
    提了
    xvfeng
        2
    xvfeng  
    OP
       Jul 5, 2013
    @chemzqm 多谢。已回复。改下代码缩进就好啦亲!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   929 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 82ms · UTC 19:40 · PVG 03:40 · LAX 12:40 · JFK 15:40
    ♥ Do have faith in what you're doing.