[soundcloud] Do not match sets (Fixes #1930)
authorPhilipp Hagemeister <phihag@phihag.de>
Mon, 9 Dec 2013 18:57:00 +0000 (19:57 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Mon, 9 Dec 2013 18:57:00 +0000 (19:57 +0100)
test/test_all_urls.py
youtube_dl/extractor/soundcloud.py

index 6b9764c67e98ba47a63b227d824bb97b82757b53..e9458b2e331526de1c986c697c4a8d0ddd682f14 100644 (file)
@@ -110,6 +110,9 @@ class TestAllURLsMatching(unittest.TestCase):
         self.assertMatch('http://vimeo.com/channels/tributes', ['vimeo:channel'])
         self.assertMatch('http://vimeo.com/user7108434', ['vimeo:user'])
 
+    # https://github.com/rg3/youtube-dl/issues/1930
+    def test_soundcloud_not_matching_sets(self):
+        self.assertMatch('http://soundcloud.com/floex/sets/gone-ep', ['soundcloud:set'])
 
 if __name__ == '__main__':
     unittest.main()
index 0571b36ac22204298e0692383be2dba145e91074..5c026c0b8f914ed014b9dceb0816d741a7cfddb0 100644 (file)
@@ -25,7 +25,8 @@ class SoundcloudIE(InfoExtractor):
 
     _VALID_URL = r'''^(?:https?://)?
                     (?:(?:(?:www\.)?soundcloud\.com/
-                            (?P<uploader>[\w\d-]+)/(?P<title>[\w\d-]+)/?
+                            (?P<uploader>[\w\d-]+)/
+                            (?!sets/)(?P<title>[\w\d-]+)/?
                             (?P<token>[^?]+?)?(?:[?].*)?$)
                        |(?:api\.soundcloud\.com/tracks/(?P<track_id>\d+))
                        |(?P<widget>w\.soundcloud\.com/player/?.*?url=.*)