1 from __future__ import unicode_literals
3 from .common import InfoExtractor
4 from .youtube import YoutubeIE
7 class UnityIE(InfoExtractor):
8 _VALID_URL = r'https?://(?:www\.)?unity3d\.com/learn/tutorials/(?:[^/]+/)*(?P<id>[^/?#&]+)'
10 'url': 'https://unity3d.com/learn/tutorials/topics/animation/animate-anything-mecanim',
14 'title': 'Live Training 22nd September 2014 - Animate Anything',
15 'description': 'md5:e54913114bd45a554c56cdde7669636e',
18 'uploader_id': 'Unity3D',
19 'upload_date': '20140926',
22 'url': 'https://unity3d.com/learn/tutorials/projects/2d-ufo-tutorial/following-player-camera?playlist=25844',
23 'only_matching': True,
26 def _real_extract(self, url):
27 video_id = self._match_id(url)
28 webpage = self._download_webpage(url, video_id)
29 youtube_id = self._search_regex(
30 r'data-video-id="([_0-9a-zA-Z-]+)"',
31 webpage, 'youtube ID')
32 return self.url_result(youtube_id, ie=YoutubeIE.ie_key(), video_id=video_id)