mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 03:03:01 +00:00
MTVIE: add support for Vevo videos (related #913)
This commit is contained in:
parent
70d1924f8b
commit
1c251cd948
2 changed files with 13 additions and 1 deletions
|
@ -27,6 +27,14 @@ def _real_extract(self, url):
|
|||
|
||||
webpage = self._download_webpage(url, video_id)
|
||||
|
||||
# Some videos come from Vevo.com
|
||||
m_vevo = re.search(r'isVevoVideo = true;.*?vevoVideoId = "(.*?)";',
|
||||
webpage, re.DOTALL)
|
||||
if m_vevo:
|
||||
vevo_id = m_vevo.group(1);
|
||||
self.to_screen(u'Vevo video detected: %s' % vevo_id)
|
||||
return self.url_result('vevo:%s' % vevo_id, ie='Vevo')
|
||||
|
||||
#song_name = self._html_search_regex(r'<meta name="mtv_vt" content="([^"]+)"/>',
|
||||
# webpage, u'song name', fatal=False)
|
||||
|
||||
|
|
|
@ -8,7 +8,11 @@
|
|||
)
|
||||
|
||||
class VevoIE(InfoExtractor):
|
||||
_VALID_URL = r'http://www.vevo.com/watch/.*?/.*?/(?P<id>.*)$'
|
||||
"""
|
||||
Accecps urls from vevo.com or in the format 'vevo:{id}'
|
||||
(currently used by MTVIE)
|
||||
"""
|
||||
_VALID_URL = r'((http://www.vevo.com/watch/.*?/.*?/)|(vevo:))(?P<id>.*)$'
|
||||
|
||||
def _real_extract(self, url):
|
||||
mobj = re.match(self._VALID_URL, url)
|
||||
|
|
Loading…
Reference in a new issue