[radioplus] add simple extractor
parent
a0d52ce5be
commit
8e71a69f02
|
@ -1035,6 +1035,7 @@ from .radiokapital import (
|
|||
RadioKapitalIE,
|
||||
RadioKapitalShowIE,
|
||||
)
|
||||
from .radioplus import RadioPlusIE
|
||||
from .rai import (
|
||||
RaiPlayIE,
|
||||
RaiPlayLiveIE,
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from .common import InfoExtractor
|
||||
|
||||
|
||||
class RadioPlusIE(InfoExtractor):
|
||||
_VALID_URL = r"https?://(?:www\.)?radioplus\.pl.(?P<id>.*)"
|
||||
_TESTS = [
|
||||
{
|
||||
"url": "http://www.radioplus.pl/program-czytaj/1217/150114/szczecinski_szlak_azjatycki",
|
||||
"md5": "f0eaf994a3bedb2f223e575bb02da396",
|
||||
"info_dict": {
|
||||
"id": "program-czytaj/1217/150114/szczecinski_szlak_azjatycki",
|
||||
"ext": "mp3",
|
||||
"title": "Szczeciński szlak azjatycki",
|
||||
},
|
||||
}
|
||||
]
|
||||
|
||||
def _real_extract(self, url):
|
||||
video_id = self._match_id(url)
|
||||
webpage = self._download_webpage(url, video_id)
|
||||
title = self._html_search_regex(r"<h1[^>]+>(.*)</h1>", webpage, "title")
|
||||
src = self._html_search_regex(r'playerConfig\.mp4\s=\s"(.+)"', webpage, "src")
|
||||
return {"id": video_id, "title": title, "url": src}
|
Loading…
Reference in New Issue