Top Related Projects
🌈谷粒-Chrome插件英雄榜, 为优秀的Chrome插件写一本中文说明书, 让Chrome插件英雄们造福人类~ ChromePluginHeroes, Write a Chinese manual for the excellent Chrome plugin, let the Chrome plugin heroes benefit the human~ 公众号「0加1」同步更新
yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.
Command-line program to download videos from YouTube.com and other video sites
A feature-rich command-line audio/video downloader
Download your Spotify playlists and songs along with album art and metadata (from YouTube if a match is found).
网易云音乐 Node.js API service
Quick Overview
Music-dl is a command-line tool for searching and downloading music from various online platforms. It supports multiple sources, including NetEase, QQ Music, Kugou, Kuwo, and Migu. The project aims to provide a simple and efficient way to download high-quality music files from these popular Chinese music streaming services.
Pros
- Supports multiple popular Chinese music streaming platforms
- Command-line interface for easy integration into scripts and workflows
- Allows searching and downloading of individual songs or entire playlists
- Provides options for selecting audio quality and file format
Cons
- Limited to Chinese music streaming platforms, may not be useful for international users
- Potential legal concerns regarding downloading copyrighted material
- Requires Python environment and dependencies to be set up
- May break if the supported platforms change their APIs or implement stricter protection measures
Code Examples
- Searching for a song:
from music_dl import config
from music_dl.source import MusicSource
config.init()
ms = MusicSource()
result = ms.search("周杰伦 - 稻香")
for song in result:
print(f"{song.title} - {song.singer}")
- Downloading a song:
from music_dl import config
from music_dl.source import MusicSource
config.init()
ms = MusicSource()
result = ms.search("周杰伦 - 稻香", limit=1)
if result:
song = result[0]
song.download()
- Configuring download options:
from music_dl import config
config.init()
config.set("outdir", "/path/to/download/directory")
config.set("quality", "lossless")
config.set("format", "flac")
Getting Started
-
Install music-dl using pip:
pip install music-dl
-
Run music-dl from the command line:
music-dl "周杰伦 - 稻香"
-
For more options, use the help command:
music-dl --help
Competitor Comparisons
🌈谷粒-Chrome插件英雄榜, 为优秀的Chrome插件写一本中文说明书, 让Chrome插件英雄们造福人类~ ChromePluginHeroes, Write a Chinese manual for the excellent Chrome plugin, let the Chrome plugin heroes benefit the human~ 公众号「0加1」同步更新
Pros of ChromeAppHeroes
- Comprehensive guide for Chrome extensions, offering valuable insights for users
- Regular updates with new extensions and features
- Well-organized content with detailed explanations and use cases
Cons of ChromeAppHeroes
- Focused solely on Chrome extensions, limiting its scope compared to music-dl
- May require more time to find specific information due to its extensive content
- Not a functional tool like music-dl, but rather an informational resource
Code Comparison
While a direct code comparison is not relevant due to the different nature of these projects, we can highlight their main purposes:
music-dl:
def download_music(url, output_dir):
# Code to download music from various sources
ChromeAppHeroes:
## Extension Name
- Description
- Usage instructions
- Benefits
music-dl is a functional tool for downloading music, while ChromeAppHeroes is a documentation project for Chrome extensions. The code structures reflect their distinct purposes, with music-dl focusing on Python-based downloading functionality and ChromeAppHeroes utilizing Markdown for organizing and presenting information about Chrome extensions.
yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.
Pros of yewtube
- Offers a terminal-based interface for streaming and downloading YouTube content
- Supports playlist management and local playlists
- Provides a more comprehensive YouTube experience with search, playback, and download features
Cons of yewtube
- Limited to YouTube as the sole source for music and videos
- May require more system resources due to its broader feature set
- Less focused on multi-platform music downloading compared to music-dl
Code Comparison
music-dl:
def download(url, song):
filename = '{}.mp3'.format(song.name)
logger.info('Downloading: %s', filename)
r = requests.get(url, stream=True)
with open(filename, 'wb') as f:
for chunk in r.iter_content(chunk_size=1024):
if chunk:
f.write(chunk)
yewtube:
def download(song, filename=None, path=None):
filename = _get_filename(song, filename=filename, path=path)
stream = pafy.new(song.ytid).getbestaudio()
stream.download(filepath=filename, quiet=False)
return filename
Both projects offer downloading functionality, but yewtube integrates with the pafy library for YouTube interactions, while music-dl uses a more generic approach with requests. yewtube's implementation is more concise and tailored for YouTube, whereas music-dl's code suggests broader platform support.
Command-line program to download videos from YouTube.com and other video sites
Pros of youtube-dl
- Supports a vast number of websites and platforms for video/audio extraction
- Highly customizable with numerous options for format selection and output
- Active development with frequent updates and bug fixes
Cons of youtube-dl
- Primarily focused on video downloading, requiring additional steps for audio extraction
- Can be complex for users seeking a simple music download solution
- Larger codebase and broader scope, potentially impacting performance for music-only tasks
Code Comparison
music-dl:
def download(url, song_name, artist, album, cover_url, lyrics, **kwargs):
# Simplified download function focused on music
# ...
youtube-dl:
def extract_info(url, download=True, ie_key=None, extra_info=None, process=True, force_generic_extractor=False):
# More complex extraction function for various media types
# ...
Summary
youtube-dl is a versatile tool for downloading media from numerous sources, while music-dl is specifically designed for music downloads. youtube-dl offers broader platform support and more customization options, but may be overkill for users solely interested in music. music-dl provides a more streamlined experience for music downloads, with features like lyrics and cover art integration, but lacks the extensive platform support of youtube-dl.
A feature-rich command-line audio/video downloader
Pros of yt-dlp
- Supports a wider range of platforms and websites, including YouTube and many others
- More actively maintained with frequent updates and bug fixes
- Offers advanced features like format selection, playlist handling, and post-processing options
Cons of yt-dlp
- More complex to use, especially for beginners
- Primarily focused on video downloading, requiring additional steps for audio extraction
- Larger codebase and dependencies, potentially leading to longer installation times
Code comparison
music-dl:
def download(self, url, song_name, artist, album, cover_url, lyric):
filename = f'{artist} - {song_name}.mp3'
self.logger.info(f'Downloading {filename}')
# Download logic here
yt-dlp:
ydl_opts = {
'format': 'bestaudio/best',
'postprocessors': [{
'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',
'preferredquality': '192',
}],
}
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
ydl.download([url])
music-dl is specifically designed for music downloads, with a simpler interface and built-in metadata handling. yt-dlp offers more flexibility and options but requires more configuration for audio-only downloads.
Download your Spotify playlists and songs along with album art and metadata (from YouTube if a match is found).
Pros of spotify-downloader
- More focused on Spotify, offering better integration and support for Spotify-specific features
- Actively maintained with regular updates and a larger community
- Supports downloading entire playlists and albums efficiently
Cons of spotify-downloader
- Limited to Spotify as the primary source, less versatile for other platforms
- May require additional setup and dependencies specific to Spotify API
Code Comparison
music-dl:
def download(url, outdir='.', quality='best', merge=True, lyrics=False):
song = Song(url, outdir)
song.download(quality=quality, merge=merge, lyrics=lyrics)
return song
spotify-downloader:
def download_track(track_url, output_format="mp3", quality="best", lyrics=True):
track = spotify.track(track_url)
audio = youtube.search(track)
download_file(audio.url, f"{track.name}.{output_format}")
if lyrics:
add_lyrics(track, f"{track.name}.{output_format}")
Summary
While music-dl offers a more versatile approach for downloading music from various sources, spotify-downloader excels in Spotify-specific functionality. The latter provides better integration with Spotify's features and is more actively maintained. However, music-dl may be preferable for users seeking a broader range of music sources beyond Spotify. The code comparison highlights the different approaches, with spotify-downloader focusing on Spotify track information and YouTube as the audio source.
网易云音乐 Node.js API service
Pros of NeteaseCloudMusicApi
- Provides a comprehensive API for accessing NetEase Cloud Music services
- Supports a wide range of functionalities, including user authentication, playlist management, and song details
- Regularly updated with new features and bug fixes
Cons of NeteaseCloudMusicApi
- Focused solely on NetEase Cloud Music, limiting its use for other music platforms
- Requires more setup and configuration compared to music-dl
- May have a steeper learning curve for users unfamiliar with API integration
Code Comparison
music-dl:
from music_dl import config
from music_dl.source import MusicSource
config.init()
ms = MusicSource()
result = ms.search("song name")
NeteaseCloudMusicApi:
const { login_cellphone, user_playlist } = require('NeteaseCloudMusicApi')
login_cellphone({
phone: 'xxx',
password: 'yyy'
}).then(result => {
console.log(result)
user_playlist({
uid: result.body.account.id
}).then(data => {
console.log(data)
})
})
The code snippets demonstrate that music-dl offers a simpler interface for searching and downloading music, while NeteaseCloudMusicApi provides more detailed control over various NetEase Cloud Music functionalities, but requires more complex setup and usage.
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
Music-dl: Listen to what you want
Music-dl is a command line tool which helps you search and download music from multiple sources.
Support for QQ music, Netease music, Xiami music, Kugou music and Baidu music. See supported sources.
Python3 Only. Python 3.5+ Recommended.
English | ä¸æææ¡£
**Music-dl **æ¯ä¸ä¸ªåºäºPython3çå½ä»¤è¡å·¥å ·ï¼å¯ä»¥ä»å¤ä¸ªç½ç«æç´¢åä¸è½½é³ä¹ï¼æ¹ä¾¿å¯»æ¾é³ä¹ï¼è§£å³ä¸ç¥éåªä¸ªç½ç«æçæçé®é¢ãå·¥å ·çæ¬ææ¯èåæç´¢ï¼API æ¯ä»å ¬å¼çç½ç»ä¸è·å¾ï¼ä¸æ¯ç ´è§£çï¼ä¹å¬ä¸äºä»è´¹ææ²ã
ç¦æ¢å°æ¬å·¥å ·ç¨äºåä¸ç¨éï¼å¦äº§çæ³å¾çº 纷ä¸æ¬äººæ å ³ï¼å¦æä¾µæï¼è¯·èç³»æå é¤ã
å¾®åï¼å¯ä¹è¬è¾¾çèå
QQ群ï¼785798493
æè¿APIå°ææç¹å¤ï¼ä¸ªäººæç¹ç»´æ¤ä¸è¿æ¥ï¼éè¦å¤§å®¶å¸®å¿æ´æ°ãæ¥ç æ¯æçé³ä¹æºå表
注æ: é¨åé³ä¹æºå¨ä¸äºå½å®¶åå°åºä¸å¯ç¨ï¼å¯ä»¥èè使ç¨ä¸å½å¤§é代çãè·åå ¬å ±ä»£ççæ¹å¼å¯ä»¥åèæçå¦ä¸ä¸ªé¡¹ç®https://github.com/0xHJK/Proxiesï¼ä¸¤åéè·å¾æ°å个ææ代çã
åè½
- é¨åææ²æ¯ææ æé³ä¹
- ä¼å æç´¢é«åè´¨é³ä¹ï¼æ æ -> 320K -> 128Kï¼
- æ¯æ HTTP å SOCKS 代ç
- æ¯æå¤çº¿ç¨æç´¢
- æ¯ææç´¢ç»æå»éåæåº
- æ¯ææç´¢å ³é®åé«äº®
- æ¯æä¸è½½æè¯åå°é¢ï¼é¨åï¼
注æï¼ä» æ¯æPython3ï¼å»ºè®®ä½¿ç¨ Python3.5 以ä¸çæ¬
å®è£
使ç¨pipå®è£
ï¼æ¨èï¼æ³¨æåé¢æä¸ä¸ªpy
ï¼ï¼
$ pip3 install pymusic-dl
æå¨å®è£ ï¼ææ°ï¼ï¼
$ git clone https://github.com/0xHJK/music-dl.git
$ cd music-dl
$ python3 setup.py install
ä¸å®è£ ç´æ¥è¿è¡ï¼
$ git clone https://github.com/0xHJK/music-dl.git
$ cd music-dl
$ pip3 install -r requirements.txt
$ ./music-dl
# æ python3 music-dl
å¨ä»¥ä¸ç¯å¢æµè¯éè¿ï¼
ç³»ç»å称 | ç³»ç»çæ¬ | Pythonçæ¬ |
---|---|---|
macOS | 10.14 | 3.7.0 |
macOS | 10.13 | 3.7.0 |
Windows | Windows 7 x64 | 3.7.2 |
Windows | Windows 10 x64 | 3.7.2 |
Ubuntu | 16.04 x64 | 3.5.2 |
使ç¨æ¹å¼
v3.0é¢è§çå½ä»¤æè¾å¤§çæ¹åï¼å»ºè®®å æ¥ç帮å©
$ music-dl --help
Usage: music-dl [OPTIONS]
Search and download music from netease, qq, kugou, baidu and xiami.
Example: music-dl -k "å¨æ°ä¼¦"
Options:
--version Show the version and exit.
-k, --keyword TEXT æç´¢å
³é®åï¼æååææåæ¶è¾å
¥å¯ä»¥æé«å¹é
ï¼å¦ 空å¸è¹ æ´æ ï¼
-u, --url TEXT éè¿æå®çææ²URLä¸è½½é³ä¹
-p, --playlist TEXT éè¿æå®çæåURLä¸è½½é³ä¹
-s, --source TEXT Supported music source: qq netease kugou baidu
-n, --number INTEGER Number of search results
-o, --outdir TEXT Output directory
-x, --proxy TEXT Proxy (e.g. http://127.0.0.1:1087)
-v, --verbose Verbose mode
--lyrics åæ¶ä¸è½½æè¯
--cover åæ¶ä¸è½½å°é¢
--nomerge ä¸å¯¹æç´¢ç»æå表æåºåå»é
--help Show this message and exit.
- é»è®¤æç´¢
qq netease kugou baidu
ï¼æ¯ä¸ªæ°ééå¶ä¸º5ï¼ä¿åç®å½ä¸ºå½åç®å½ã - æå®åºå·æ¶å¯ä»¥ä½¿ç¨
1-5 7 10
çå½¢å¼ã - é»è®¤å¯¹æç´¢ç»ææåºåå»éï¼æåºé¡ºåºæç §ææåæåæåºï¼å½ä¸¤è é½ç¸åæ¶ä¿çæ大çæ件ã
- æ æé³ä¹ææ²æ°éè¾å°ï¼å¦æ没ææ æä¼æ¾ç¤º320Kæ128Kã
- æ¯æhttp代çåsocks代çï¼æ ¼å¼å½¢å¦
-x http://127.0.0.1:1087
æ-x socks5://127.0.0.1:1086
示ä¾ï¼
æ¯æçé³ä¹æºå表
é³ä¹æº | 缩å | ç½å | ææ | æ æ | 320K | å°é¢ | æè¯ | æå | åæ² |
---|---|---|---|---|---|---|---|---|---|
QQé³ä¹ | https://y.qq.com/ | â | - | - | â | â | â | â | |
é ·çé³ä¹ | kugou | http://www.kugou.com/ | â | - | - | - | â | - | â |
ç½æäºé³ä¹ | netease | https://music.163.com/ | â | - | â | â | â | â | â |
åªåé³ä¹ | migu | http://www.migu.cn/ | â | â | â | â | â | â | â |
ç¾åº¦é³ä¹ | baidu | http://music.baidu.com/ | â | - | â | â | â | â | â |
è¾ç±³é³ä¹ | xiami | https://www.xiami.com/ | â | - | - | - | - | â | â |
-
表示ä¸ä¸å®æ¯æï¼â
表示é¨åæå®å ¨æ¯æï¼â
表示å°æªæ¯æ
欢è¿æ交æ件æ¯ææ´å¤é³ä¹æºï¼æ件åæ³åèaddons
ä¸çæ件
æ´æ°è®°å½
- 2019-08-25 ä¿®å¤äºQQé³ä¹ãç½æäºé³ä¹ãé ·çé³ä¹ï¼æ°å¢åªåé³ä¹
- 2019-08-03 ä¿®å¤äºä¸äºbugï¼å±è½äºä¸æ¯æçæºï¼ç®åä» ç¾åº¦é³ä¹å¯ç¨
- 2019-06-13 éæ°å¢å è¾ç±³é³ä¹é«åè´¨é³ä¹æ¯æï¼æ谢群å0.0æä¾çAPI
- 2019-06-11 v3.0é¢è§çï¼ä»£ç éæï¼æ¯æç½æäºé³ä¹æåååæ²ä¸è½½ï¼æ¯æç¾åº¦é«åè´¨é³ä¹
- 2019-04-08 åå¸v2.2.1çæ¬
- 2019-04-04 å 为è¾ç±³é³ä¹APIåæ´ï¼ææ¶å±è½è¾ç±³æç´¢ç»æ#22
- 2019-04-02 ä¿®å¤#18å#21çBUGï¼ä¼åæ¾ç¤ºææï¼æ¯æé¨åé³ä¹æºæè¯åå°é¢ä¸è½½
- 2019-03-11 å¼å¯é»è®¤æ¯æææé³ä¹æºï¼é»è®¤å¯¹æç´¢ç»ææåºå»éï¼ä¼åæ¾ç¤ºææï¼é«äº®æç´¢å ³é®ååé«åè´¨é³ä¹
- 2019-02 å®æé¨åç¿»è¯ï¼è±è¯ãå¾·è¯ãæ¥è¯ãå ç½å°äºè¯ï¼æè°¢@anomie31 @DarkLinkXXXX @terorieç帮å©ï¼ç®åç¿»è¯å°æªå®åï¼æ¬¢è¿æ交PRæ¹è¿ç¿»è¯
- 2019-01-31 æ°å¢åå æµè¯ï¼éæåå¸ï¼æ°å¢LOGOï¼æ°å¢å°å¾½ç« ï¼åå¸v2.1.0çæ¬
- 2019-01-28 éåä¸å以ä¸ä»£ç ï¼å ¨é¢ä¼åï¼åå¸å°pipåºï¼åå¸v2.0.0çæ¬
- 2019-01-26 æ¯æhttpåsocks代çï¼å é¤wgetåºï¼æ°å¢clickåºï¼åå¸v1.1ç
- 2019-01-25 æ¯æç¾åº¦æ æé³ä¹
- 2019-01-24 ä¼å交äºãä¿®å¤bug
- 2019-01-22 解å³Windowså ¼å®¹é®é¢ï¼æ¯æå¤çº¿ç¨ï¼åå¸v1.0ç
- 2019-01-21 æ¯æè¾ç±³é³ä¹ï¼æ¯æå»é
- 2019-01-20 æ¯æç¾åº¦é³ä¹
- 2019-01-17 æ¯ææå®ç®å½ãæ°éãé³ä¹æº
- 2019-01-12 QQé³ä¹320K失æ
- 2019-01-11 æ¯æç½æäºé³ä¹
- 2019-01-09 å®æv0.1çï¼æ¯æé ·çåQQ
æIssues说æ
- **æ£æ¥æ¯å¦æ¯ææ°ç代ç ï¼æ£æ¥æ¯å¦æ¯Python3.5+ï¼æ£æ¥ä¾èµæ没æå®è£ å®æ´**ã
- 说æ使ç¨çæä½ç³»ç»ï¼ä¾å¦Windows 10 x64
- 说æPythonçæ¬ï¼ä»¥åæ¯å¦ä½¿ç¨äºpyenvçèæç¯å¢
- 说æ使ç¨çå½ä»¤åæ°ãæç´¢å ³é®åååºéçé³ä¹æº
- 使ç¨
-v
åæ°éè¯ï¼è¯´æ详ç»çé误信æ¯ï¼æ好ææªå¾ - å¦æææ°çæè·¯å建议ä¹æ¬¢è¿æ交
Credits è´è°¢
æ¬é¡¹ç®å以ä¸é¡¹ç®å¯åï¼åèäºå ¶ä¸ä¸é¨åæè·¯ï¼åè¿äºå¼åè 表示æè°¢ã
- https://github.com/requests/requests
- https://github.com/soimort/you-get
- https://github.com/maicong/music
- https://github.com/YongHaoWu/NeteaseCloudMusicFlac
- https://github.com/darknessomi/musicbox
ç¨ç±åçµ
ç»´æ¤ä¸æï¼æ¬¢è¿æ«ææ°é¥äºç»´ç
LICENSE
Top Related Projects
🌈谷粒-Chrome插件英雄榜, 为优秀的Chrome插件写一本中文说明书, 让Chrome插件英雄们造福人类~ ChromePluginHeroes, Write a Chinese manual for the excellent Chrome plugin, let the Chrome plugin heroes benefit the human~ 公众号「0加1」同步更新
yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.
Command-line program to download videos from YouTube.com and other video sites
A feature-rich command-line audio/video downloader
Download your Spotify playlists and songs along with album art and metadata (from YouTube if a match is found).
网易云音乐 Node.js API service
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