1 from .common
import InfoExtractor
2 from .streamable
import StreamableIE
5 class FootyRoomIE(InfoExtractor
):
6 _VALID_URL
= r
'https?://footyroom\.com/matches/(?P<id>\d+)'
8 'url': 'http://footyroom.com/matches/79922154/hull-city-vs-chelsea/review',
11 'title': 'VIDEO Hull City 0 - 2 Chelsea',
14 'add_ie': [StreamableIE
.ie_key()],
16 'url': 'http://footyroom.com/matches/75817984/georgia-vs-germany/review',
19 'title': 'VIDEO Georgia 0 - 2 Germany',
22 'add_ie': ['Playwire'],
25 def _real_extract(self
, url
):
26 playlist_id
= self
._match
_id
(url
)
28 webpage
= self
._download
_webpage
(url
, playlist_id
)
30 playlist
= self
._parse
_json
(self
._search
_regex
(
31 r
'DataStore\.media\s*=\s*([^;]+)', webpage
, 'media data'),
34 playlist_title
= self
._og
_search
_title
(webpage
)
37 for video
in playlist
:
38 payload
= video
.get('payload')
41 playwire_url
= self
._html
_search
_regex
(
42 r
'data-config="([^"]+)"', payload
,
43 'playwire url', default
=None)
45 entries
.append(self
.url_result(self
._proto
_relative
_url
(
46 playwire_url
, 'http:'), 'Playwire'))
48 streamable_url
= StreamableIE
._extract
_url
(payload
)
50 entries
.append(self
.url_result(
51 streamable_url
, StreamableIE
.ie_key()))
53 return self
.playlist_result(entries
, playlist_id
, playlist_title
)