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