• 请不要在回答技术问题时复制粘贴 AI 生成的内容
godbmw
V2EX  ›  程序员

music-api-next:一款支持网易、虾米和 QQ 音乐的 JS 爬虫库

  •  
  •   godbmw ·
    dongyuanxin · Oct 5, 2018 · 2925 views
    This topic created in 2956 days ago, the information mentioned may be changed or developed.

    音乐,无界

    让音乐无界

    如果你苦于挑选一个全方位、多平台、简便易用的音乐爬虫库,music-api-next是不二选择。

    特性:

    • 支持网易、虾米和 QQ 三大主流音乐平台
    • 支持音乐关键词搜索
    • 支持音乐链接下载
    • 支持音乐评论爬取
    • 支持回调和async/await写法
    • 支持webpack打包部署
    • 支持pm2服务器部署
    • 可用、高效、稳定

    项目地址

    快速开始

    const musicAPI = require("music-api-next");
    
    // 搜索接口: 返回指定关键词的搜索信息
    musicAPI
      .searchSong({
        key: "周杰伦",
        page: 1,
        limit: 10,
        vendor: "qq"
      })
      .then(songs => console.log(songs))
      .catch(error => console.log(error.message));
    
    // 歌曲信息接口: 返回指定歌曲的信息
    musicAPI
      .getSong({
        id: "003OUlho2HcRHC",
        vendor: "qq"
      })
      .then(meta => console.log(meta))
      .catch(error => console.log(error.message));
    
    // 评论接口: 返回指定歌曲的评论
    musicAPI
      .getComment({
        id: "003OUlho2HcRHC",
        page: 1,
        limit: 20,
        vendor: "qq"
      })
      .then(comments => console.log(comments))
      .catch(error => console.log(error.message));
    
    4 replies  •  2018-10-07 20:36:16 +08:00
    ddzzhen
    ddzzhen
    Oct 6, 2018 via Android
    1
    支持一下
    imxieke
    imxieke
    Oct 6, 2018
    2
    资瓷下 最近在抓 酷狗的折腾下
    chungzhao
    chungzhao
    Oct 7, 2018
    3
    网络真小,godbmw 大佬又遇到你了。。。。。。
    godbmw
    godbmw
    OP
    Oct 7, 2018
    4
    @chungzhao 瑟瑟发抖,俺不是大佬
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   752 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 17:34 · PVG 01:34 · LAX 09:34 · JFK 12:34
    ♥ Do have faith in what you're doing.