1 from __future__ import unicode_literals
3 from .common import InfoExtractor
4 from ..compat import compat_urlparse
5 from .internetvideoarchive import InternetVideoArchiveIE
8 class RottenTomatoesIE(InfoExtractor):
9 _VALID_URL = r'https?://www\.rottentomatoes\.com/m/[^/]+/trailers/(?P<id>\d+)'
12 'url': 'http://www.rottentomatoes.com/m/toy_story_3/trailers/11028566/',
16 'title': 'Toy Story 3',
20 def _real_extract(self, url):
21 video_id = self._match_id(url)
22 webpage = self._download_webpage(url, video_id)
23 og_video = self._og_search_video_url(webpage)
24 query = compat_urlparse.urlparse(og_video).query
27 '_type': 'url_transparent',
28 'url': InternetVideoArchiveIE._build_xml_url(query),
29 'ie_key': InternetVideoArchiveIE.ie_key(),
30 'title': self._og_search_title(webpage),