]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/footyroom.py
4c7dbca4023944fddaf5ff65748e338108774ec8
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/',
12 'id': 'schalke-04-0-2-real-madrid-2015-02',
13 'title': 'Schalke 04 0 – 2 Real Madrid',
17 'url': 'http://footyroom.com/georgia-0-2-germany-2015-03/',
19 'id': 'georgia-0-2-germany-2015-03',
20 'title': 'Georgia 0 – 2 Germany',
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
(
32 r
'VideoSelector\.load\((\[.+?\])\);', webpage
, 'video selector'),
35 playlist_title
= self
._og
_search
_title
(webpage
)
38 for video
in playlist
:
39 payload
= video
.get('payload')
42 playwire_url
= self
._search
_regex
(
43 r
'data-config="([^"]+)"', payload
,
44 'playwire url', default
=None)
46 entries
.append(self
.url_result(self
._proto
_relative
_url
(
47 playwire_url
, 'http:'), 'Playwire'))
49 return self
.playlist_result(entries
, playlist_id
, playlist_title
)