]>
jfr.im git - yt-dlp.git/blob - youtube_dl/extractor/footyroom.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
7 class FootyRoomIE(InfoExtractor
):
8 _VALID_URL
= r
'http://footyroom\.com/(?P<id>[^/]+)'
10 'url': 'http://footyroom.com/schalke-04-0-2-real-madrid-2015-02/',
11 'md5': 'f38d400d32f19724570040d5ce3a505f',
13 'id': 'schalke-04-0-2-real-madrid-2015-02',
14 'title': 'Schalke 04 0 – 2 Real Madrid',
19 'url': 'http://footyroom.com/georgia-0-2-germany-2015-03/',
21 'id': 'georgia-0-2-germany-2015-03',
22 'title': 'Georgia 0 – 2 Germany',
29 def _real_extract(self
, url
):
30 playlist_id
= self
._match
_id
(url
)
32 webpage
= self
._download
_webpage
(url
, playlist_id
)
34 playlist
= self
._parse
_json
(
36 r
'VideoSelector\.load\((\[.+?\])\);', webpage
, 'video selector'),
39 playlist_title
= self
._og
_search
_title
(webpage
)
42 for video
in playlist
:
43 payload
= video
.get('payload')
46 playwire_url
= self
._search
_regex
(
47 r
'data-config="([^"]+)"', payload
,
48 'playwire url', default
=None)
49 if not playwire_url
.startswith("http:"):
50 playwire_url
= "http:" + playwire_url
52 entries
.append(self
.url_result(playwire_url
, 'Playwire'))
54 return self
.playlist_result(entries
, playlist_id
, playlist_title
)