2 from __future__ import unicode_literals
4 from .common import InfoExtractor
5 from .streamable import StreamableIE
8 class FootyRoomIE(InfoExtractor):
9 _VALID_URL = r'https?://footyroom\.com/matches/(?P<id>\d+)'
11 'url': 'http://footyroom.com/matches/79922154/hull-city-vs-chelsea/review',
14 'title': 'VIDEO Hull City 0 - 2 Chelsea',
17 'add_ie': [StreamableIE.ie_key()],
19 'url': 'http://footyroom.com/matches/75817984/georgia-vs-germany/review',
22 'title': 'VIDEO Georgia 0 - 2 Germany',
25 'add_ie': ['Playwire']
28 def _real_extract(self, url):
29 playlist_id = self._match_id(url)
31 webpage = self._download_webpage(url, playlist_id)
33 playlist = self._parse_json(self._search_regex(
34 r'DataStore\.media\s*=\s*([^;]+)', webpage, 'media data'),
37 playlist_title = self._og_search_title(webpage)
40 for video in playlist:
41 payload = video.get('payload')
44 playwire_url = self._html_search_regex(
45 r'data-config="([^"]+)"', payload,
46 'playwire url', default=None)
48 entries.append(self.url_result(self._proto_relative_url(
49 playwire_url, 'http:'), 'Playwire'))
51 streamable_url = StreamableIE._extract_url(payload)
53 entries.append(self.url_result(
54 streamable_url, StreamableIE.ie_key()))
56 return self.playlist_result(entries, playlist_id, playlist_title)