aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-09-26 19:46:42 +0600
committerSergey M․ <dstftw@gmail.com>2015-09-26 19:46:42 +0600
commitfe1d858e35dde4c3068b9bec8a1bac7bd2cafadb (patch)
tree3c514404e5ce67243136092af560a9f1a6101a43 /youtube_dl/extractor
parentfc42bc6ec9ab4858ec6bf1c8fe348ec47126375a (diff)
[mtvservices:embedded] Add _extract_url
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/mtv.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/youtube_dl/extractor/mtv.py b/youtube_dl/extractor/mtv.py
index 4020cc2a9..302c9bf35 100644
--- a/youtube_dl/extractor/mtv.py
+++ b/youtube_dl/extractor/mtv.py
@@ -228,6 +228,13 @@ class MTVServicesEmbeddedIE(MTVServicesInfoExtractor):
},
}
+ @staticmethod
+ def _extract_url(webpage):
+ mobj = re.search(
+ r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//media.mtvnservices.com/embed/.+?)\1', webpage)
+ if mobj:
+ return mobj.group('url')
+
def _get_feed_url(self, uri):
video_id = self._id_from_uri(uri)
site_id = uri.replace(video_id, '')