Top Related Projects
根据网易云音乐的歌单, 下载flac无损音乐到本地. Download the FLAC music from Internet according to your NeteaseCloudMusic playlist.
search and download music 从网易云音乐、QQ音乐、酷狗音乐、百度音乐、虾米音乐、咪咕音乐等搜索和下载歌曲
音乐搜索器 - 多站合一音乐搜索解决方案
one for all free music in china (chrome extension, also works for firefox)
高颜值的第三方网易云播放器,支持 Windows / macOS / Linux :electron:
Quick Overview
MusicBox is a command-line interface (CLI) for NetEase Cloud Music, a popular music streaming service in China. It allows users to search, play, and manage their music library directly from the terminal, offering a lightweight and efficient alternative to the web or desktop applications.
Pros
- Lightweight and fast, consuming minimal system resources
- Offers a wide range of features, including playlist management, lyrics display, and music downloading
- Provides a distraction-free, keyboard-driven interface for music enthusiasts
- Supports both Windows and Unix-like systems
Cons
- Limited to NetEase Cloud Music service, not compatible with other streaming platforms
- Requires command-line proficiency, which may be challenging for non-technical users
- Lacks some advanced features available in the official web or desktop applications
- May encounter issues with frequent updates to the NetEase Cloud Music API
Code Examples
- Logging in to NetEase Cloud Music:
from NEMbox import logger
from NEMbox.api import NetEase
netease = NetEase()
username = input("Enter your username: ")
password = input("Enter your password: ")
login_info = netease.login(username, password)
logger.info(login_info)
- Searching for a song:
from NEMbox.api import NetEase
netease = NetEase()
keyword = input("Enter a song name to search: ")
search_results = netease.search(keyword)
for result in search_results['result']['songs'][:5]:
print(f"{result['name']} - {result['artists'][0]['name']}")
- Playing a song:
from NEMbox.player import Player
from NEMbox.api import NetEase
netease = NetEase()
player = Player()
song_id = input("Enter the song ID: ")
song_url = netease.songs_detail([song_id])[0]['url']
player.play(song_url)
Getting Started
To get started with MusicBox, follow these steps:
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the MusicBox CLI:
python3 start.py
-
Use the following commands in the CLI:
l
: Login to your NetEase Cloud Music accounts
: Search for songsp
: Play the selected songq
: Quit the application
For more detailed instructions and additional features, refer to the project's README file on GitHub.
Competitor Comparisons
根据网易云音乐的歌单, 下载flac无损音乐到本地. Download the FLAC music from Internet according to your NeteaseCloudMusic playlist.
Pros of NeteaseCloudMusicFlac
- Focuses specifically on downloading high-quality FLAC files
- Simpler and more straightforward for users who only want FLAC downloads
- Potentially faster for bulk FLAC downloads due to specialized functionality
Cons of NeteaseCloudMusicFlac
- Limited functionality compared to musicbox's broader feature set
- Less actively maintained, with fewer recent updates
- Lacks the command-line interface and playback features of musicbox
Code Comparison
NeteaseCloudMusicFlac:
def get_songurls(song_ids):
return (
'http://music.163.com/api/song/enhance/player/url?id={0}&ids=[{0}]&br=320000'.format(i)
for i in song_ids
)
musicbox:
def get_song_url(song_id, quality):
url = 'http://music.163.com/api/song/enhance/player/url?ids=[{0}]&br={1}'.format(
song_id, quality
)
return url
Both projects use similar API endpoints for retrieving song URLs, but musicbox's implementation is more flexible with a quality parameter. NeteaseCloudMusicFlac focuses on high-quality downloads, while musicbox offers more versatility in its functionality.
search and download music 从网易云音乐、QQ音乐、酷狗音乐、百度音乐、虾米音乐、咪咕音乐等搜索和下载歌曲
Pros of music-dl
- Supports multiple music platforms (NetEase, QQ Music, Kugou, Kuwo, etc.)
- Command-line interface for easy batch downloading
- Actively maintained with recent updates
Cons of music-dl
- Lacks a graphical user interface
- Does not offer streaming functionality
- Limited to downloading functionality only
Code Comparison
music-dl:
def download_song(self, song):
url = self.get_song_url(song)
filename = self.get_filename(song)
self.download_file(url, filename)
musicbox:
def play_song(self, song):
url = self.get_song_url(song)
player = Player()
player.play(url)
Key Differences
musicbox is a more comprehensive NetEase Cloud Music client with features like playlist management, streaming, and a text-based user interface. It focuses on providing a complete music listening experience within the terminal.
music-dl, on the other hand, is primarily a downloader that supports multiple platforms. It's designed for users who want to quickly download music from various sources using a simple command-line interface.
While musicbox offers a richer feature set for NetEase Cloud Music users, music-dl provides broader platform support and is more suitable for those who prefer to download and manage their music files locally.
音乐搜索器 - 多站合一音乐搜索解决方案
Pros of music
- Web-based interface, making it more accessible across devices
- Supports multiple music platforms (QQ Music, Netease, Xiami, etc.)
- More recent updates and active development
Cons of music
- Less comprehensive command-line functionality
- May require more setup for server deployment
- Potentially higher resource usage due to web interface
Code Comparison
musicbox (Python):
def play(self, song, volume=5):
self.playing_flag = True
self.process = subprocess.Popen(['mpg123', '-R', '-f', str(volume * 1000), song.get('mp3url')], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
self.process.stdin.write(b'V ' + str(volume).encode() + b'\n')
self.process.stdin.flush()
music (PHP):
public function search($query, $page = 1)
{
$result = [];
foreach ($this->site as $key => $site) {
$result[$key] = $site->search($query, $page);
}
return $result;
}
Summary
musicbox is a command-line based music player with a focus on simplicity and efficiency, while music offers a web-based interface supporting multiple music platforms. musicbox may be preferred for users who prioritize command-line functionality, while music provides a more user-friendly experience for those comfortable with web interfaces. The choice between the two depends on individual preferences and use cases.
one for all free music in china (chrome extension, also works for firefox)
Pros of Listen1 Chrome Extension
- Cross-platform compatibility as a browser extension
- User-friendly interface with a modern design
- Supports multiple music streaming services in one place
Cons of Listen1 Chrome Extension
- Limited to browser usage, not a standalone application
- Potentially affected by changes in browser extension policies
- May have performance limitations compared to native applications
Code Comparison
MusicBox (Python):
def login(self, username, password):
pattern = re.compile(r'^0\d{2,3}\d{7,8}$|^1[34578]\d{9}$')
if pattern.match(username):
return self.phone_login(username, password)
action = 'https://music.163.com/weapi/login/'
text = {
'username': username,
'password': password,
'rememberLogin': 'true'
}
data = encrypted_request(text)
try:
return self.httpRequest('POST', action, data)
except requests.exceptions.RequestException as e:
log.error(e)
return {'code': 501}
Listen1 Chrome Extension (JavaScript):
function getParameterByName(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, '\\$&');
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, ' '));
}
The code snippets show different approaches: MusicBox focuses on login functionality, while Listen1 Chrome Extension demonstrates URL parameter parsing. This reflects their distinct architectures and purposes.
高颜值的第三方网易云播放器,支持 Windows / macOS / Linux :electron:
Pros of YesPlayMusic
- Modern and visually appealing user interface
- Cross-platform support (Windows, macOS, Linux)
- Built with Vue.js, offering a responsive and interactive experience
Cons of YesPlayMusic
- Larger application size due to Electron framework
- May have higher resource usage compared to command-line interface
- Potentially slower startup time
Code Comparison
MusicBox (Python):
def login(username, password):
pattern = re.compile(r'^0\d{2,3}\d{7,8}$|^1[34578]\d{9}$')
if pattern.match(username):
return login_phone(username, password)
action = 'login'
return auth.login(action, username, password)
YesPlayMusic (JavaScript):
async login(params) {
const res = await loginAccount(params);
if (res.code === 200) {
this.handleLoginSuccess(res);
}
return res;
}
Summary
MusicBox is a command-line interface music player for NetEase Cloud Music, written in Python. It offers a lightweight solution for playing music from the terminal.
YesPlayMusic is a modern, cross-platform desktop music player for NetEase Cloud Music, built with Vue.js and Electron. It provides a graphical user interface with a sleek design and enhanced user experience.
While MusicBox is more resource-efficient and faster to start up, YesPlayMusic offers a more visually appealing and user-friendly experience across multiple platforms. The choice between the two depends on user preferences for CLI vs GUI and system resources availability.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
NetEase-MusicBox
æ谢为 MusicBox çå¼åä»åºè¿åªåçæ¯ä¸ä¸ªäººï¼
é«åè´¨ç½æäºé³ä¹å½ä»¤è¡çæ¬ï¼ç®æ´ä¼é ï¼ä¸è¬é¡ºæ»ï¼åºäº Python ç¼åã
Demo
åè½ç¹æ§
- 320kbps çé«åè´¨é³ä¹
- ææ²ï¼èºæ¯å®¶ï¼ä¸è¾æ£ç´¢
- ç½æ 22 个ææ²æè¡æ¦
- ç½ææ°ç¢æ¨è
- ç½æç²¾éæå
- ç½æ主æçµå°
- ç§äººæåï¼æ¯æ¥æ¨è
- éå¿æç¢
- æ¬å°æ¶èï¼éæ¶å â¤
- ææ¾è¿åº¦åææ¾æ¨¡å¼æ¾ç¤º
- ç°å¨ææ¾åæ¡é¢æè¯æ¾ç¤º
- ææ²è¯è®ºæ¾ç¤º
- ä¸é®è¿å ¥ææ²ä¸è¾
- å®æ¶éåº
- Vimer å¼å¿«æ·é®è®©æä½ä¸è¬é¡ºæ»
- å¯ä½¿ç¨æ°åå¿«æ·é®
- å¯ä½¿ç¨èªå®ä¹å ¨å±å¿«æ·é®
- 对å½åæåå表è¿è¡æ¬å°æ¨¡ç³æç´¢
é®çå¿«æ·é®
æ num + åæ ·çå¿«æ·é®å¯ä»¥ç¨æ°å修饰ï¼æé®é¡ºåºä¸ºå è¾å ¥æ°ååé®å ¥è¢«ä¿®é¥°çé®ï¼å³ num + åçå¿«æ·é®ã
Key | Effect | |
---|---|---|
j | Down | ä¸ç§» |
k | Up | ä¸ç§» |
num + j | Quick Jump | å¿«éåå跳转 n é¦ |
num + k | Quick Up | å¿«éåå跳转 n é¦ |
h | Back | åé |
l | Forword | åè¿ |
u | Prev Page | ä¸ä¸é¡µ |
d | Next Page | ä¸ä¸é¡µ |
f | Search | å½åå表模ç³æç´¢ |
[ | Prev Song | ä¸ä¸æ² |
] | Next Song | ä¸ä¸æ² |
num + [ | Quick Prev Song | å¿«éå n é¦ |
num + ] | Quick Next Song | å¿«éå n é¦ |
num + Shift + g | Index for Song | è·³å°ç¬¬ n é¦ |
= | Volume + | é³éå¢å |
- | Volume - | é³éåå° |
Space | Play/Pause | ææ¾/æå |
? | Shuffle | ææ°ä¸é |
m | Menu | 主èå |
p | Present/History | å½å/åå²ææ¾å表 |
i | Music Info | å½åé³ä¹ä¿¡æ¯ |
Shift + p | Playing Mode | ææ¾æ¨¡å¼åæ¢ |
a | Add | æ·»å æ²ç®å°æç¢ |
Shift + a | Enter Album | è¿å ¥ä¸è¾ |
g | To the First | è·³è³é¦é¡¹ |
Shift + g | To the End | è·³è³å°¾é¡¹ |
z | DJ List | æç¢å表 |
s | Star | æ·»å å°æ¶è |
c | Collection | æ¶èå表 |
r | Remove | å é¤å½åæ¡ç® |
Shift + j | Move Down | åä¸ç§»å¨å½åé¡¹ç® |
Shift + k | Move Up | åä¸ç§»å¨å½åé¡¹ç® |
Shift + c | Cache | ç¼åææ²å°æ¬å° |
, | Like | åç± |
. | Trash FM | å é¤ FM |
/ | Next FM | ä¸ä¸ FM |
q | Quit | éåº |
t | Timing Exit | å®æ¶éåº |
w | Quit & Clear | éåºå¹¶æ¸ é¤ç¨æ·ä¿¡æ¯ |
å®è£
å¿ éä¾èµ
mpg123
ç¨äºææ¾ææ²ï¼å®è£ æ¹æ³åè§ä¸é¢ç说æpython-fuzzywuzzy
ç¨äºæ¨¡ç³æç´¢
å¯éä¾èµ
aria2
ç¨äºç¼åææ²libnotify-bin
ç¨äºæ¯ææ¶æ¯æ示ï¼Linux å¹³å°ï¼qtpy python-dbus dbus qt
ç¨äºæ¯ææ¡é¢æè¯ (æ ¹æ®ç³»ç» qt ççæ¬è¿éè¦å®è£ pyqt4 pyqt4 pyside pyside2 ä¸çä»»æä¸ä¸ª)python-levenshtein
ç¨äºæ¨¡ç³æç´¢
PyPi å®è£ ï¼*nix ç³»ç»ï¼
pip3 install NetEase-MusicBox
Git clone å®è£ master åæ¯ï¼*nix ç³»ç»ï¼
git clone https://github.com/darknessomi/musicbox.git && cd musicbox
poetry build && poetry install
macOS å®è£
pip3 install NetEase-MusicBox
brew install mpg123
Linux å®è£
注æï¼éè¿ä»¥ä¸æ¹æ³å®è£
å¯è½ä»ç¶éè¦pip3 install -U NetEase-MusicBox
æ´æ°å°ææ°çã
Fedora
é¦å
æ·»å FZUGæºï¼ç¶åsudo dnf install musicbox
ã
Ubuntu/Debian
pip3 install NetEase-MusicBox
sudo apt-get install mpg123
Arch Linux
pacaur -S netease-musicbox-git # or $ yaourt musicbox
Centos/Red Hat
sudo yum install -y python3-devel
pip3 install NetEase-MusicBox
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/mpg123-1.25.6-1.el7.x86_64.rpm
sudo yum install -y mpg123-1.25.6-1.el7.x86_64.rpm
é ç½®åé误å¤ç
é
ç½®æ件å°å: ~/.config/netease-musicbox/config.json
å¯é
ç½®ç¼åï¼å¿«æ·é®ï¼æ¶æ¯ï¼æ¡é¢æè¯ã
ç±äºææ² API åªæ¥åä¸å½å¤§éå°åºè®¿é®ï¼éä¸å½å¤§éå°åºç¨æ·è¯·èªè¡è®¾ç½®ä»£çï¼å¯ç¨ polipo å° socks5 代ç转æ¢æ http 代çï¼ï¼
export http_proxy=http://IP:PORT
export https_proxy=http://IP:PORT
curl -L ip.cn
æ¾ç¤º IP å±äºä¸å½å¤§éå°åºå³å¯ã
å·²æµè¯çç³»ç»å ¼å®¹å表
OS | Version |
---|---|
Arch | Rolling |
macOS | 10.15.7 |
é误å¤ç
å½æäºææ²ä¸è½ææ¾æ¶ï¼æ»æ¶é¿ä¸º 00:01 æ¶ï¼è¯·æ£æ¥æ¯å¦ä¸ºçæé®é¢å¯¼è´ã
å¦éå°å¨ç¹å®ç»ç«¯ä¸ä¸è½ææ¾é®é¢ï¼é¦å æ£æ¥**æ¤ç»ç«¯**ä¸ mpg123 è½å¦æ£å¸¸ä½¿ç¨ï¼å ¶æ¬¡æ£æ¥**å ¶ä»ç»ç«¯**ä¸ musicbox è½å¦æ£å¸¸ä½¿ç¨ï¼æ¥å issue çæ¶å请åç¥ä»¥ä¸ä½¿ç¨æ åµä»¥ååºé®é¢ç»ç«¯çæ¥éä¿¡æ¯ã
åæ¶ï¼æ¨å¯ä»¥éè¿tail -f ~/.local/share/netease-musicbox/musicbox.log
èªè¡æ¥çæ¥å¿ã
mpg123 ææ°ççæ¬å¯è½ä¼æ¥æ¾ä¸å°å£°é³ç¡¬ä»¶çé误ï¼æµè¯äº 1.25.6 çæ¬å¯ä»¥æ£å¸¸ä½¿ç¨ã
å·²ç¥é®é¢å解å³æ¹æ¡
- #374 i3wm ä¸ææ¾æé³æå¿«è¿é®é¢ï¼æ¤é®é¢å¸¸è§äº Arch Linuxãå°è¯æ´æ¹ mpg123 é ç½®ã
- #405 32 ä½ Python ä¸ cookie æ¶é´æ³è¶ åºäº 32 ä½æ´æ°æ大å¼ãå°è¯ä½¿ç¨ 64 ä½çæ¬ç Python æè æ·è´ cookie æ件å°å¯¹åºä½ç½®ã
- #347 æåæ¶é´è¶ è¿ä¸å®é¿åº¦ï¼æ°åéï¼ä¹å mpg123 åæ¢è¾åºï¼å¯¼è´åæ¢å°ä¸ä¸é¦æãæ¤é®é¢æ¯ mpg123 ç bugï¼ææ¶æ 解å³æ¹æ¡ã
- #791 çæé®é¢ï¼master åæ¯å·²ç»ä¿®å¤
使ç¨
musicbox
Enjoy it !
æ´æ°æ¥å¿
2021-01-18 çæ¬ 0.3.1 é误修å¤
2020-10-23 çæ¬ 0.3.0 æ¥å£æ´æ°ï¼é误修å¤
2018-11-28 çæ¬ 0.2.5.4 ä¿®å¤å¤å¤é误
2018-06-21 çæ¬ 0.2.5.3 ä¿®å¤å¤å¤ææ¾é误
2018-06-07 çæ¬ 0.2.5.1 ä¿®å¤é ç½®æ件é误
2018-06-05 çæ¬ 0.2.5.0 å ¨é¨è¿ç§»å°æ°ç apiï¼å¤§éé误修å¤
LICENSE
Top Related Projects
根据网易云音乐的歌单, 下载flac无损音乐到本地. Download the FLAC music from Internet according to your NeteaseCloudMusic playlist.
search and download music 从网易云音乐、QQ音乐、酷狗音乐、百度音乐、虾米音乐、咪咕音乐等搜索和下载歌曲
音乐搜索器 - 多站合一音乐搜索解决方案
one for all free music in china (chrome extension, also works for firefox)
高颜值的第三方网易云播放器,支持 Windows / macOS / Linux :electron:
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot