1 from __future__ import unicode_literals
3 from .common import InfoExtractor
9 class MovieClipsIE(InfoExtractor):
10 _VALID_URL = r'https?://(?:www.)?movieclips\.com/videos/(?P<id>[^/?#]+)'
12 'url': 'http://www.movieclips.com/videos/warcraft-trailer-1-561180739597?autoPlay=true&playlistId=5',
15 'display_id': 'warcraft-trailer-1-561180739597',
17 'title': 'Warcraft Trailer 1',
18 'description': 'Watch Trailer 1 from Warcraft (2016). Legendary’s WARCRAFT is a 3D epic adventure of world-colliding conflict based.',
19 'thumbnail': 're:^https?://.*\.jpg$',
21 'add_ie': ['ThePlatform'],
24 def _real_extract(self, url):
25 display_id = self._match_id(url)
27 req = compat_urllib_request.Request(url)
28 # it doesn't work if it thinks the browser it's too old
29 req.add_header('User-Agent', 'Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/43.0 (Chrome)')
30 webpage = self._download_webpage(req, display_id)
31 theplatform_link = self._html_search_regex(r'src="(http://player.theplatform.com/p/.*?)"', webpage, 'theplatform link')
32 title = self._html_search_regex(r'<title[^>]*>([^>]+)-\s*\d+\s*|\s*Movieclips.com</title>', webpage, 'title')
33 description = self._html_search_meta('description', webpage)
36 '_type': 'url_transparent',
37 'url': theplatform_link,
39 'display_id': display_id,
40 'description': description,