NeteaseCloudMusicFlac
根据网易云音乐的歌单, 下载flac无损音乐到本地. Download the FLAC music from Internet according to your NeteaseCloudMusic playlist.
Top Related Projects
根据网易云音乐的歌单, 下载flac无损音乐到本地. Download the FLAC music from Internet according to your NeteaseCloudMusic playlist.
网易云音乐 Node.js API service
网易云音乐命令行版本
one for all free music in china (chrome extension, also works for firefox)
高颜值的第三方网易云播放器,支持 Windows / macOS / Linux :electron:
Salt Player for Android Release, Feedback
Quick Overview
NeteaseCloudMusicFlac is a Python script that allows users to download high-quality FLAC music files from NetEase Cloud Music. It searches for and retrieves FLAC versions of songs in a user's playlist, providing a convenient way to obtain lossless audio files from the popular Chinese music streaming service.
Pros
- Enables users to download high-quality FLAC files from NetEase Cloud Music
- Supports batch downloading of entire playlists
- Provides a simple command-line interface for easy use
- Automatically creates organized folders for downloaded music
Cons
- May potentially violate NetEase Cloud Music's terms of service
- Limited to NetEase Cloud Music platform only
- Requires users to have their own NetEase Cloud Music account
- Depends on the availability of FLAC versions for requested songs
Code Examples
- Importing required modules and setting up the script:
import requests
import json
import os
import sys
import urllib.request
import urllib.error
import time
- Fetching song details from NetEase Cloud Music API:
def get_song_info(music_id):
url = "http://music.163.com/api/song/detail/?id={}&ids=[{}]".format(music_id, music_id)
response = requests.get(url)
song_js = response.json()
return song_js['songs'][0]
- Downloading FLAC files:
def download_file(song_info, download_url):
file_name = "{} - {}.flac".format(song_info['name'], song_info['artists'][0]['name'])
print("Downloading: {}".format(file_name))
try:
urllib.request.urlretrieve(download_url, file_name)
print("Downloaded successfully!")
except urllib.error.URLError as e:
print("Download failed!")
Getting Started
-
Clone the repository:
git clone https://github.com/atlas-comstock/NeteaseCloudMusicFlac.git
-
Install required dependencies:
pip install requests
-
Run the script with your NetEase Cloud Music playlist ID:
python main.py <playlist_id>
Replace <playlist_id>
with the actual ID of your NetEase Cloud Music playlist. The script will then download available FLAC files from the specified playlist.
Competitor Comparisons
根据网易云音乐的歌单, 下载flac无损音乐到本地. Download the FLAC music from Internet according to your NeteaseCloudMusic playlist.
Pros of NeteaseCloudMusicFlac
- Identical functionality and features as both repositories are the same project
- Consistent codebase and implementation across both repositories
Cons of NeteaseCloudMusicFlac
- No unique advantages or improvements over the other repository
- Potential confusion for users due to duplicate repositories with the same name
Code Comparison
Both repositories contain identical code, so there are no differences to highlight. Here's a sample of the main functionality from both:
def main():
username = input("请输入用户名:")
password = input("请输入密码:")
user = User(username, password)
user.download_songs()
This code snippet demonstrates the core functionality of logging in and downloading songs, which is consistent across both repositories.
网易云音乐 Node.js API service
Pros of NeteaseCloudMusicApi
- More comprehensive API coverage for Netease Cloud Music features
- Better documentation and examples for developers
- Actively maintained with frequent updates
Cons of NeteaseCloudMusicApi
- Focuses on API functionality rather than direct music downloading
- May require more setup and configuration for specific use cases
Code Comparison
NeteaseCloudMusicApi:
const { login_cellphone, user_playlist } = require('NeteaseCloudMusicApi')
login_cellphone({
phone: '手机号',
password: '密码'
}).then(result => {
console.log(result)
user_playlist({
uid: result.body.account.id
}).then(data => {
console.log(data)
})
})
NeteaseCloudMusicFlac:
import requests
import json
url = 'http://music.163.com/api/playlist/detail?id=' + playlist_id
response = requests.get(url)
data = json.loads(response.text)
NeteaseCloudMusicApi provides a more structured approach with dedicated functions for different API endpoints, while NeteaseCloudMusicFlac uses simpler HTTP requests to fetch data. The former offers a more comprehensive set of features, while the latter focuses on downloading high-quality audio files.
网易云音乐命令行版本
Pros of musicbox
- More comprehensive features for interacting with NetEase Cloud Music, including playlist management and lyric display
- Better maintained with more recent updates and active community support
- Supports both command-line and curses interfaces for improved user experience
Cons of musicbox
- Focuses solely on NetEase Cloud Music, while NeteaseCloudMusicFlac supports downloading from multiple sources
- May have a steeper learning curve due to more complex functionality
- Doesn't specifically target high-quality FLAC downloads like NeteaseCloudMusicFlac
Code Comparison
musicbox:
def play_song(song):
if 'mp3Url' in song:
song_url = song['mp3Url']
elif 'url' in song:
song_url = song['url']
else:
return
self.popen_handler = subprocess.Popen(self.mpg123_parameters + [song_url])
NeteaseCloudMusicFlac:
def get_song_info(music_id):
url = "http://music.163.com/api/song/detail/?id={}&ids=[{}]".format(music_id, music_id)
r = requests.get(url)
json_data = r.json()
return json_data['songs'][0]
Both projects interact with the NetEase Cloud Music API, but musicbox focuses on playback functionality, while NeteaseCloudMusicFlac emphasizes retrieving song information for downloading.
one for all free music in china (chrome extension, also works for firefox)
Pros of listen1_chrome_extension
- Cross-platform support as a Chrome extension
- Integrates multiple music streaming services in one interface
- Actively maintained with regular updates
Cons of listen1_chrome_extension
- Limited to browser usage, not a standalone application
- Depends on third-party APIs, which may change or become unavailable
- May have lower audio quality compared to FLAC files
Code Comparison
NeteaseCloudMusicFlac:
def get_music_info(music_id):
url = "http://music.163.com/api/song/detail/?id={}&ids=[{}]".format(music_id, music_id)
r = requests.get(url)
return r.json()["songs"][0]
listen1_chrome_extension:
function getPlaylist(url, hm, se) {
const list_id = getParameterByName('list_id', url);
return {
success: (fn) => {
hm.get(`${se.url}/playlist?list_id=${list_id}`).then((response) => {
fn(response.data);
});
},
};
}
The code snippets show different approaches to fetching music information. NeteaseCloudMusicFlac uses Python to directly access the Netease API, while listen1_chrome_extension employs JavaScript to retrieve playlist data from multiple sources through a custom API.
高颜值的第三方网易云播放器,支持 Windows / macOS / Linux :electron:
Pros of YesPlayMusic
- More active development with frequent updates and bug fixes
- Sleek, modern user interface with better visual design
- Cross-platform support (Windows, macOS, Linux) via Electron
Cons of YesPlayMusic
- Lacks direct FLAC download functionality
- May have higher resource usage due to Electron framework
- Requires user login for full functionality
Code Comparison
YesPlayMusic (Vue.js component):
<template>
<div class="player">
<div class="cover-artwork">
<img :src="currentTrack.artwork" :alt="currentTrack.name" />
</div>
<div class="track-info">
<h3>{{ currentTrack.name }}</h3>
<p>{{ currentTrack.artist }}</p>
</div>
</div>
</template>
NeteaseCloudMusicFlac (Python script):
def get_music_info(music_id):
url = "http://music.163.com/api/song/detail/?id={}&ids=[{}]".format(music_id, music_id)
r = requests.get(url)
json_obj = r.json()
return json_obj['songs'][0]
def download_flac(music_id):
music_info = get_music_info(music_id)
download_url = get_flac_url(music_id)
filename = "{} - {}.flac".format(music_info['name'], music_info['artists'][0]['name'])
urllib.request.urlretrieve(download_url, filename)
Salt Player for Android Release, Feedback
Pros of SaltPlayerSource
- More active development with recent commits and releases
- Broader feature set for a full-fledged music player application
- Better documentation and project structure
Cons of SaltPlayerSource
- Larger codebase, potentially more complex to understand and contribute to
- Focused on a complete music player, less specialized for FLAC downloads
Code Comparison
SaltPlayerSource (Kotlin):
class PlaylistViewModel : ViewModel() {
private val _playlists = MutableLiveData<List<Playlist>>()
val playlists: LiveData<List<Playlist>> = _playlists
fun loadPlaylists() {
viewModelScope.launch {
_playlists.value = PlaylistRepository.getPlaylists()
}
}
}
NeteaseCloudMusicFlac (Python):
def get_song_info(music_id):
url = "http://music.163.com/api/song/detail/?id={}&ids=[{}]".format(music_id, music_id)
r = requests.get(url)
json_obj = r.json()
return json_obj['songs'][0]
The code snippets showcase different languages and focuses. SaltPlayerSource uses Kotlin for Android development with a ViewModel for playlist management, while NeteaseCloudMusicFlac uses Python for API interactions to fetch song details.
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
NeteaseCloudMusicFlac
NeteaseCloudMusicFlac is being sponsored by the following tool; please help to support us by taking a look and signing up to a free tria.
æ¬ç¨åºä» ä¾å¦ä¹ ä¹ç¨
æ谢为 NeteaseCloudMusicFlac çå¼åä»åºè¿åªå以åæåºå»ºè®®çæ¯ä¸ä¸ªäººï¼
æ ¹æ®ç½æäºé³ä¹æå, ä¸è½½å¯¹åºæ æFLACææ²å°æ¬å°.
BackGround
ç°å¨æ æèµæºåºæ¬é½æ¯ä¸è¾, å¾é¾æ¾å°åæ²æ¥ä¸è½½. èä¸ä¸è½½éè¦æ¯ä¸ªä¸è¾æç´¢ä¸é, éè¦ç¨äºçå¤å¶ç²è´´å¯ç åä¸è½½. è¿å¯¹äºå¬Hi-Fiç人们æ¥è¯´æ¯é常ä¸ä¾¿å©çäºæ , æ¾ææ²å¯ä»¥æ¾ä¸æ´å¤©. èç°å¨ç½æäºé³ä¹æ¯ç»å¤§å¤æ°äººå¬å¨çº¿ææ²çå¹³å°, æåä¼å¤. äºæ¯ææ³åå¦æ¤ä¸ä¸ªé¡¹ç®, æ ¹æ®ç½æäºé³ä¹ä¸é¢çæå, èªå¨ä¸è½½FLACæ æé³ä¹å°æ¬å°.
注æ
æµ·å¤ç±äºçæé®é¢æ æ³ä¸è½½ææ², æ以ä¼å¯¼è´æ¤issue, æ æ³æ£å¸¸ä½¿ç¨, éè¦ä¿®æ¹DNSé ç½®, éé¢æ解å³æ¹æ³.
å®è£
å®è£ Python
æ ¹æ®æ¤ç½ç«æç¨å®è£ Python 注æå®è£ ççæ¬æ¯ python3
强å¶ä½¿ç¨ python3, ä»æåèµ·
ä¸è½½main.py
å¯ä»¥ä½¿ç¨æ¤é¾æ¥ https://codeload.github.com/YongHaoWu/NeteaseCloudMusicFlac/zip/master
è·åæå
å°ç½æäºé³ä¹ç½é¡µçæ¾åºæ³è¦ä¸è½½æ æçæå, å¦ä¸å¾
åè¿å ¥æå, å°åæ å°å便æ¯æåå°å.
使ç¨
$ python main.py æåå°å(å¦ä¸å¾ä¾¿æ¯: http://music.163.com/#/playlist?id=145258012)
python3示ä¾å½ä»¤(注æ windows å¯è½è¦æä¸é¢çåå¼å·å»æ)
$ python3 main.py 'http://music.163.com/#/playlist?id=145258012'
ä¸è½½ææææ², å æ¬ MP3 å¨å
$ python3 main.py 'http://music.163.com/#/playlist?id=145258012' --mp3
å¦æåç¥ç¼ºä¹module
ä¸è½½å¯¹åºç模å(module), ç½ä¸æç´¢å¦ä½å®è£ python模å.
python3
pip3 install requests
å¦è¿è¡ä¸éå°é误, å¯ä»¥è¿è¡ pip3 install --upgrade requests
(å
¶ä¸ä¸å·²ç¥é误æ¯request æ§çæ¬å¨å¤çº¿ç¨ä¸è½½æ¶åºç°é误)
TODO list
- ç®ååªæ¯å¹é ææ²åå, æ好å ä¸å¹é ææå
- ææ²å¹é çä¸é«, å¯ä»¥èèåå°å ¶ä»ç½ç«æ
Enjoy it !
çæé®é¢
å¦ææ¶åçæé®é¢ï¼é¡¹ç®å°ç«å»å ³éã èªå·±ä¸ºç¾åº¦é³ä¹ä¼å, 该项ç®ä¸ºæ¹ä¾¿èªå·±èå
The MIT License (MIT)
CopyRight (c) 2016 YongHaoHu <christopherwuy@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Top Related Projects
根据网易云音乐的歌单, 下载flac无损音乐到本地. Download the FLAC music from Internet according to your NeteaseCloudMusic playlist.
网易云音乐 Node.js API service
网易云音乐命令行版本
one for all free music in china (chrome extension, also works for firefox)
高颜值的第三方网易云播放器,支持 Windows / macOS / Linux :electron:
Salt Player for Android Release, Feedback
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