Skip to content

Commit 559a09c

Browse files
committed
better handling of 403 on SoundCloud profiles
1 parent 8341293 commit 559a09c

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

plugins/domains/soundcloud.com/soundcloud.com.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,13 @@ export default {
118118
/* Skip the placeholder thumbnail in oEmbed - use user picture in og image instead. */
119119
!oembed.thumbnail_url || /\/images\/fb_placeholder\.png/.test(oembed.thumbnail_url)
120120

121-
/* Also, check meta and try to exclude user profiles with 0 tracks. */
122-
|| /api\.soundcloud\.com(%2F|\/)users(%2F|\/)/i.test(oembed.html)
123-
) || !oembed.description)
121+
// Previously: Also, check meta and try to exclude user profiles with 0 tracks.
122+
// 2026-02-06: SoundCloud now returns 403 on user profiles, there is no way to detect 0 tracks.
123+
// || /api\.soundcloud\.com(%2F|\/)users(%2F|\/)/i.test(oembed.html)
124+
125+
) || !oembed.description
126+
&& !/^https:\/\/soundcloud\.com\/[^\/]+\/?(?:\?.+)?$/i.test(url) // Exclude user accounts with no description. All user accounts now return 403
127+
)
124128
) {
125129
return {
126130
__allow_soundcloud_meta: true
@@ -142,11 +146,11 @@ export default {
142146
},
143147

144148
tests: [{skipMethods: ["getData"]}, {skipMixins: ["oembed-description"]},
145-
"https://m.soundcloud.com/user-847444",
149+
"https://soundcloud.com/user-847444",
146150
"https://m.soundcloud.com/erik-satie",
147151

148152
"https://m.soundcloud.com/claude-debussy/clair-de-lune",
149-
// user profile with no tracks: https://soundcloud.com/mata-klol
153+
"https://soundcloud.com/mata-klol", // user profile with no tracks
150154

151155
// The following URLs redirect to this plugin and should also work.
152156
"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/282055227%3Fsecret_token%3Ds-Ct4TV&color=00cc11&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false",

0 commit comments

Comments
 (0)