Skip to main content

NetEase Music Api

Project description

NetEase Music Api that comes from musicbox project. Ui-related parts are elimated, so as to be used at other places.

Install

pip install MusicBoxApi

Example

from MusicBoxApi import api as NetEaseApi

def get_top_songlist():
    netease = NetEaseApi.NetEase()
    music_list = netease.top_songlist()
    datalist = netease.dig_info(music_list, 'songs')
    playlist = []
    for data in datalist:
        music_info = {}
        music_info.setdefault("song_name", data.get("song_name"))
        music_info.setdefault("artist", data.get("artist"))
        music_info.setdefault("album_name", data.get("album_name"))
        music_info.setdefault("mp3_url", data.get("mp3_url"))
        music_info.setdefault("playTime", data.get("playTime"))
        music_info.setdefault("quality", data.get("quality"))
        playlist.append(music_info)
return playlist

print(get_top_songlist())

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
MusicBoxApi-1.0.9.tar.gz (12.2 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page