Skip to main content

Easy access to music information and song audio links

Project description

# AZMusicAPI模块使用指南

` getmusic(keyword) `

## 作用:获得指定关键词的歌曲

  • keyword:关键词

  • 关键词可为 歌手/歌曲名/专辑名

### 返回值说明:正常返回列表 “Error 0”:没有结果 “Error 1”:用户未输入

` geturl(rid,reqId) `

## 作用:获取音乐的音频地址

  • rid:你要解析的歌曲在getmusic返回的rid

  • reqId:你要解析的歌曲在getmusic返回的reqId

## #返回值:正常返回音频链接 “Error 3”:歌曲需要单曲付费或rid/reqId不正确

## 代码示例 #### 仅需7行代码即可完成一个音乐音频地址获取器

` import AZMusicAPI as MusicAPI u=input("请输入您需要的歌曲名称:") data=MusicAPI.getmusic(u) song=data[0]["songname"] singer=data[0]["singer"] print("歌曲名:{} 歌手:{}".format(song,singer)) print(MusicAPI.geturl(data[0]["rid"],data[0]["reqId"])) `

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

AZMusicAPI-0.9.2.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

AZMusicAPI-0.9.2-py3-none-any.whl (6.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page