Skip to main content

轻松访问音乐信息和歌曲音频链接 | Easy access to music information and song audio links

Project description

AZMusicAPI

轻松访问音乐信息和歌曲音频链接 | Easy access to music information and song audio links

AZ Studio版权所有

该项目仅供娱乐 请勿用于违法事业 违者与AZ Studio无关

AZMusicAPI模块使用指南

安装

pip install AZMusicAPI

导入

import AZMusicAPI

函数使用

AZMusicAPI.getmusic(keyword,number)

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

  • keyword:关键词 number:返回歌曲数量,可选,默认20

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

返回值类型:列表

AZMusicAPI.geturl(rid,reqId)

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

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

返回值类型:字符串

AZMusicAPI.searchkey(value)

作用:通过关键字得到音乐/歌手/专辑名

  • value:关键字

返回值类型:列表

错误返回

  • "Error 0":没有结果
  • "Error 1":用户未输入
  • "NetError":网络错误 / 服务器宕机 / IP被封禁
  • "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-1.2.8.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

AZMusicAPI-1.2.8-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file AZMusicAPI-1.2.8.tar.gz.

File metadata

  • Download URL: AZMusicAPI-1.2.8.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for AZMusicAPI-1.2.8.tar.gz
Algorithm Hash digest
SHA256 68229301df1e8a5e364eaab42480d1b9d2ddd8e6dedb65420b9d60130c2bbfed
MD5 709f419de7f8999bc66f1d517168002a
BLAKE2b-256 d78cecb0dafc1ee846c2a4c9137da25f37491fad02ad8d06c061e05b1088cc3c

See more details on using hashes here.

Provenance

File details

Details for the file AZMusicAPI-1.2.8-py3-none-any.whl.

File metadata

  • Download URL: AZMusicAPI-1.2.8-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for AZMusicAPI-1.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 b9cd49db3e37affa70581977be07ec0d0caa9d4dff1eedee7c87e20aa34f240a
MD5 c4cab4ca1c0a6bf1d664c2f082f6e03e
BLAKE2b-256 a0b412c7e7715a6b4f104ac1ce712830bd822cac5465944f2f85c25c6fa83c1b

See more details on using hashes here.

Provenance

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