1 from __future__ import unicode_literals
3 from .common import InfoExtractor
4 from .ooyala import OoyalaIE
7 class TheSunIE(InfoExtractor):
8 _VALID_URL = r'https://(?:www\.)?thesun\.co\.uk/\w+/(?P<id>\d+)/[\w-]'
10 'url': 'https://www.thesun.co.uk/tvandshowbiz/2261604/orlando-bloom-and-katy-perry-post-adorable-instagram-video-together-celebrating-thanksgiving-after-split-rumours/',
11 'md5': '5667123b24f25f43f4c4f381ef34c5c2',
13 'id': 'h4OXN0NzE6rv6ObkEifKcNA-gYUw4xFf',
15 'title': 'Katy Perry and Orlando Bloom shut down split rumours with cute Thanksgiving video',
16 'description': 'Still going strong',
21 def _real_extract(self, url):
22 video_id = self._match_id(url)
24 webpage = self._download_webpage(url, video_id)
25 ooyala_id = self._search_regex(r'id\s*=\s*"thesun-ooyala-player-([^"]+)"', webpage, 'ooyala id')
27 return OoyalaIE._build_url_result(ooyala_id)