Skip to main content

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())

Download files

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

Source Distribution

MusicBoxApi-1.0.9.tar.gz (12.2 kB view details)

Uploaded Source

File details

Details for the file MusicBoxApi-1.0.9.tar.gz.

File metadata

  • Download URL: MusicBoxApi-1.0.9.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for MusicBoxApi-1.0.9.tar.gz
Algorithm Hash digest
SHA256 6a8ac6f0687a1bf56437c20ab9709e76c09895e0bd8a422776fdcd60834cd03d
MD5 c85b6c514e858b9c2fd0eb809f721a15
BLAKE2b-256 e26499bcf6933cf912b603f6de0ba36854d55e5f8898a29e7fe87cf4d997b30b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.9 This release

1 file

1.0.8

1 file

1.0.7

1 file

1.0.6

1 file

1.0.5

1 file

1.0.4

1 file

1.0.3

1 file

1.0.2

1 file

1.0.1

1 file

1.0.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page