Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

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.

Files for MusicBoxApi, version 1.0.9
Filename, size File type Python version Upload date Hashes
Filename, size MusicBoxApi-1.0.9.tar.gz (12.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page