projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
94aae01
)
[soundcloud] Add _extract_urls (#10179)
author
Sergey M․
<dstftw@gmail.com>
Thu, 28 Jul 2016 15:16:05 +0000
(22:16 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Thu, 28 Jul 2016 15:16:05 +0000
(22:16 +0700)
youtube_dl/extractor/soundcloud.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/soundcloud.py
b/youtube_dl/extractor/soundcloud.py
index 194dabc71d84072fc64afd50baa3b80467c0808f..aeae931a20774ff9bc5c3988273a0d008e293954 100644
(file)
--- 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)