projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc42bc6
)
[mtvservices:embedded] Add _extract_url
author
Sergey M․
<dstftw@gmail.com>
Sat, 26 Sep 2015 13:46:42 +0000
(19:46 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 26 Sep 2015 13:46:42 +0000
(19:46 +0600)
youtube_dl/extractor/mtv.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/mtv.py
b/youtube_dl/extractor/mtv.py
index 4020cc2a9d0096f2ca39f67fe4c1489f7cabc711..302c9bf35bc6bb533c10f35ea11cd500012bba0a 100644
(file)
--- 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, '')