From 09518e11e08de142fd2e1d9659fd2f94860197a2 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Mon, 3 Aug 2026 07:49:11 +0800 Subject: upd consider yt-dlp soundcloud 403 if query 70+ json --- sh/upd | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sh/upd b/sh/upd index befc1d0..be0524b 100755 --- a/sh/upd +++ b/sh/upd @@ -328,7 +328,17 @@ music () { # old opus files may have lower bitrate comparing to converting m4a with # aac to opus, those old opus files are kept due to the cli. The trade-off # is that converting lossy to lossy is bad. - yt-dlp -f 'bestaudio[ext=opus]/bestaudio' -x --audio-format opus --match-filter 'license=cc-by' --match-filter 'title~=(?i)cc-by' -P "$XDG_MUSIC_DIR/cc-by/scott_buckley" https://soundcloud.com/scottbuckley/tracks + # + # At around July 2026, soundcloud will 403 Forbidden me if I query about + # 70+ JSON metadata. So I now use --download-archive and + # --break-on-existing to stop query json metadata and break the download + # after first met already downloaded music. But it is not perfect. This is + # assuming the first several music is new music. This does not consider if + # Scott recently uploaded too many, e.g., 80+ not cc licensed music. Other + # ways may include sth. like `--break-match-filters 'timestamp >= + # 1780524521'`. But note `--dateafter today-2months` will still query all + # json metadata. All ways are not perfect. I prefer my current way. + yt-dlp -f 'bestaudio[ext=opus]/bestaudio' -x --audio-format opus --match-filter 'license=cc-by' --match-filter 'title~=(?i)cc-by' --download-archive "$XDG_DATA_HOME/mydata/yt-dlp_download_archive" --break-on-existing -P "$XDG_MUSIC_DIR/cc-by/scott_buckley" https://soundcloud.com/scottbuckley/tracks rsync -avP --delete "$XDG_MUSIC_DIR/cc-by/scott_buckley" pp:music/cc-by rsync -avP --delete "$XDG_MUSIC_DIR/gpl-3.0-only" pp:music rsync -avP --delete "$XDG_MUSIC_DIR/favorite" pp:music -- cgit v1.3.1