【免費註冊】 【會員登入】 【個人資料】 【會員列表】 【論壇幫助】 【論壇搜尋】 【登出論壇】

∮Ω奧米加空間∮
∮Ω奧米加空間∮»技術文件區»【原創】Qobuz flac 下載

訂覽該主題更新消息 | 將該主題推薦給朋友 發表新主題 發起投票  回覆
作者 主題    
dc
管理員



性別:男
來自:瓦肯星
發表總數:9936
註冊時間:2002-05-07 16:32
(第 1 篇) 【原創】Qobuz flac 下載

Qobuz 也是無損串流服務

網路上可以找到下載離線檔案的程式
https://pypi.org/project/qobuz-dl/

Centos 7 安裝方式
首先先安裝 pip3
>>yum install python36
>>pip3 install --upgrade qobuz-dl

>>qobuz-dl
Creating config file: /root/.config/qobuz-dl/config.ini

Enter your email:
- 輸入你的註冊帳號

Enter your password
- 輸入你的密碼

Folder for downloads (leave empy for default 'Qobuz Downloads')
- 這邊留空值的話會下載到預設的 Qobuz Downloads 資料夾,也可以後續再來改 vi /root/.config/qobuz-dl/config.ini

Download quality (5, 6, 7, 27) [320, LOSSLESS, 24B <96KHZ, 24B >96KHZ]
(leave empy for default '6')
- 27
Getting tokens. Please wait...
Config file updated.
usage: qobuz-dl [-h] [-r] {fun,dl,lucky} ...

The ultimate Qobuz music downloader.
See usage examples on https://github.com/vitiko98/qobuz-dl

optional arguments:
  -h, --help      show this help message and exit
  -r, --reset     create/reset config file

commands:
  run qobuz-dl <command> --help for more info
  (e.g. qobuz-dl fun --help)

  {fun,dl,lucky}
    fun           interactive mode
    dl            input mode
    lucky         lucky mode

我們先隨便選一張專輯來測試 -> Share


複製連結


最高的音質是 27 我們只要加參數 dl 專輯連結 -q 27 就可以下載囉~如下
>>qobuz-dl dl https://open.qobuz.com/album/xj8oh8rmu4kma -q 27
Logging...
Logged: OK
Membership: Studio

Quality set: 24B <196KHZ

Downloading: McLemore Avenue

119k/119k /// Downloading cover
611M/611M /// Golden Slumbers / Carry That Weight / The End / Here Comes The Sun / Come Together [24/192]
163M/163M /// Something [24/192]
291M/291M /// Because / You Never Give Me Your Money [24/192]
417M/417M /// Sun King / Mean Mr. Mustard / Polythene Pam / She Came In Through The Bathroom Window / I Want You (She's So Heavy) [24/192]

Completed


Booker T. & The M.G.'s - McLemore Avenue [1970] [Hi-Res] 這張專輯的容量為 1.5GB
total 1.5G
-rw-r--r--. 1 nfsnobody nfsnobody 612M Dec 11 10:18 01. Golden Slumbers  Carry That Weight  The End  Here Comes The Sun  Come Together.flac
-rw-r--r--. 1 nfsnobody nfsnobody 163M Dec 11 10:18 02. Something.flac
-rw-r--r--. 1 nfsnobody nfsnobody 292M Dec 11 10:19 03. Because  You Never Give Me Your Money.flac
-rw-r--r--. 1 nfsnobody nfsnobody 418M Dec 11 10:20 04. Sun King  Mean Mr. Mustard  Polythene Pam  She Came In Through The Bathroom Window  I Want You (She's So Heavy).flac
-rw-r--r--. 1 nfsnobody nfsnobody 119K Dec 11 10:16 cover.jpg

實際播放音質是 192 沒錯



如果我們要一次下載大量的音樂可以寫在 txt 檔裡
例如
>>vi 20201211-01-qobuz.txt
https://open.qobuz.com/album/ixlpf1mg26c2a
https://open.qobuz.com/album/zgw7z7mtifpwa
https://open.qobuz.com/album/iwjfsxgb4490a
https://open.qobuz.com/album/ec2tsorwym58b
https://open.qobuz.com/album/qi8twxfrurfdc
https://open.qobuz.com/album/x3jgkjhqsdsya
https://open.qobuz.com/album/xjcltswclo49b
https://open.qobuz.com/album/q22nql6gcppxc
https://open.qobuz.com/album/etlwoi5k23mlc
https://open.qobuz.com/album/selygthgdcqlb

>>qobuz-dl dl 20201211-01-qobuz.txt
Logging...
Logged: OK
Membership: Studio

Quality set: 24B <196KHZ
qobuz-dl will download 10 urls from file: "20201211-01-qobuz.txt"


Downloading: Everything Will Change (Live)

32.1k/32.1k /// Downloading cover
58.4M/58.4M /// The District Sleeps Alone Tonight  [24/48]
73.7M/73.7M /// We Will Become Silhouettes  [24/48]
60.0M/60.0M /// Sleeping In  [24/48]
48.2M/48.2M /// Turn Around  [24/48]

就會依清單裡的檔案下載喔~
音質與下載路徑的部分吃 /root/.config/qobuz-dl/config.ini 裡面設定的
default_folder = Qobuz Downloads
default_quality = 27






Your mind to my mind,

your thought to my thought
發表時間:2020-12-11 11:28
dc的個人資料 傳送郵件給dc dc的個人首頁 dc發表的所有文章 送出悄悄話給dc IP:118.*.*.* 編輯  引言回覆 
dc
管理員



性別:男
來自:瓦肯星
發表總數:9936
註冊時間:2002-05-07 16:32
(第 2 篇)

如果我們重複下載了同一張專輯會出現

This release ID (xxxxx) was already downloaded according to the local database.

但我就是想重下怎麼辦?

下載過的專輯會寫入 /root/.config/qobuz-dl/qobuz_dl.db

最快方式是更名重新下載

# mv /root/.config/qobuz-dl/qobuz_dl.db /root/.config/qobuz-dl/qobuz_dl_bak.db

比較正統的方式是修改 DB 內容,我們可以知道 qobuz_dl.db 是 SQLite format 3

我們要安裝相依套件
# apt install sqlite3

開啟資料庫
# sqlite3 /root/.config/qobuz-dl/qobuz_dl.db

查詢有哪些資料表
sqlite> .tables
downloads

查詢 downloads 資料表,會列出下載過的專輯 release ID
sqlite> select * from downloads;
tuzhxxxxxxxx
xj8oxxxxxxxx

查詢資料表欄位名稱
sqlite> .schema downloads
CREATE TABLE downloads (id TEXT UNIQUE NOT NULL);

我們如果要重新下載 tuzhxxxxxxxx 那就下指令刪除該 id
sqlite> delete from downloads where id='tuzhxxxxxxxx';

查詢一下是否刪除成功
sqlite> select * from downloads;
xj8oxxxxxxxx

離開 sqlite
sqlite> .quit

就可以再重新下載囉~
# qobuz-dl dl https://open.qobuz.com/album/tuzhxxxxxxxx






Your mind to my mind,

your thought to my thought
發表時間:2021-11-23 10:17
dc的個人資料 傳送郵件給dc dc的個人首頁 dc發表的所有文章 送出悄悄話給dc IP:118.*.*.* 編輯  引言回覆 
所有時間均為GMT+8, 現在是2021-12-09 22:53    
訂覽該主題更新消息 | 將該主題推薦給朋友 發表新主題 發起投票  回覆

快速回覆
主題 ( 回覆文章可以不輸入標題 )
URLs自動分析
有回覆時郵件通知
禁用表情符號
使用簽名

<聯絡我們 - OMEGA - 控制面板>

Powered by Centaur & Joksky & DC, ver 2003.08.14
Copyright ©2002-2008 PHPY.COM


頁面生成時間:0.011631011962891