about summary refs log tree commit diff
path: root/youtube_dl/extractor/soundcloud.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-08-01 03:50:03 +0600
committerSergey M․ <dstftw@gmail.com>2015-08-01 03:50:03 +0600
commit16a089780e87d57b5295c4dfb8da1217ef6eda70 (patch)
treed3137c57ca47032043622a142d1c854c231601c0 /youtube_dl/extractor/soundcloud.py
parent80fb6d4aa47154a1e963b28a17a065dc40a436b8 (diff)
downloadyoutube-dl-16a089780e87d57b5295c4dfb8da1217ef6eda70.tar.gz
youtube-dl-16a089780e87d57b5295c4dfb8da1217ef6eda70.tar.xz
youtube-dl-16a089780e87d57b5295c4dfb8da1217ef6eda70.zip
[soundcloud] Clean up _VALID_URLs
Diffstat (limited to 'youtube_dl/extractor/soundcloud.py')
-rw-r--r--youtube_dl/extractor/soundcloud.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/youtube_dl/extractor/soundcloud.py b/youtube_dl/extractor/soundcloud.py
index f1307dc83..6ce86cbcd 100644
--- a/youtube_dl/extractor/soundcloud.py
+++ b/youtube_dl/extractor/soundcloud.py
@@ -29,7 +29,7 @@ class SoundcloudIE(InfoExtractor):
     _VALID_URL = r'''(?x)^(?:https?://)?
                     (?:(?:(?:www\.|m\.)?soundcloud\.com/
                             (?P<uploader>[\w\d-]+)/
-                            (?!(?:tracks|sets|reposts|likes|spotlight)/?(?:$|[?#]))
+                            (?!(?:tracks|sets(?:/[^/?#]+)?|reposts|likes|spotlight)/?(?:$|[?#]))
                             (?P<title>[\w\d-]+)/?
                             (?P<token>[^?]+?)?(?:[?].*)?$)
                        |(?:api\.soundcloud\.com/tracks/(?P<track_id>\d+)
@@ -293,7 +293,15 @@ class SoundcloudSetIE(SoundcloudIE):
 
 
 class SoundcloudUserIE(SoundcloudIE):
-    _VALID_URL = r'https?://(?:(?:www|m)\.)?soundcloud\.com/(?P<user>[^/]+)/?((?P<rsrc>tracks|sets|reposts|likes|spotlight)/?)?(\?.*)?$'
+    _VALID_URL = r'''(?x)
+                        https?://
+                            (?:(?:www|m)\.)?soundcloud\.com/
+                            (?P<user>[^/]+)
+                            (?:/
+                                (?P<rsrc>tracks|sets|reposts|likes|spotlight)
+                            )?
+                            /?(?:[?#].*)?$
+                    '''
     IE_NAME = 'soundcloud:user'
     _TESTS = [{
         'url': 'https://soundcloud.com/the-akashic-chronicler',