diff options
author | Sergey M․ <dstftw@gmail.com> | 2016-07-28 22:16:05 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2016-07-28 22:16:05 +0700 |
commit | fbdf8d15d110c75c9029d86943a9222226b9b3f0 (patch) | |
tree | 840bf5a36a0e6540d10469a0fb5360efca43a57e /youtube_dl | |
parent | 94aae015485801ff1edc3689a11f8866b077ce47 (diff) |
[soundcloud] Add _extract_urls (#10179)
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/soundcloud.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/youtube_dl/extractor/soundcloud.py b/youtube_dl/extractor/soundcloud.py index 194dabc71..aeae931a2 100644 --- a/youtube_dl/extractor/soundcloud.py +++ b/youtube_dl/extractor/soundcloud.py @@ -119,6 +119,12 @@ class SoundcloudIE(InfoExtractor): _CLIENT_ID = '02gUJC0hH2ct1EGOcYXQIzRFU91c72Ea' _IPHONE_CLIENT_ID = '376f225bf427445fc4bfb6b99b72e0bf' + @staticmethod + def _extract_urls(webpage): + return [m.group('url') for m in re.finditer( + r'<iframe[^>]+src=(["\'])(?P<url>(?:https?://)?(?:w\.)?soundcloud\.com/player.+?)\1', + webpage)] + def report_resolve(self, video_id): """Report information extraction.""" self.to_screen('%s: Resolving id' % video_id) |