[radioplus] add simple extractor
This commit is contained in:
parent
a0d52ce5be
commit
8e71a69f02
|
@ -1035,6 +1035,7 @@ from .radiokapital import (
|
||||||
RadioKapitalIE,
|
RadioKapitalIE,
|
||||||
RadioKapitalShowIE,
|
RadioKapitalShowIE,
|
||||||
)
|
)
|
||||||
|
from .radioplus import RadioPlusIE
|
||||||
from .rai import (
|
from .rai import (
|
||||||
RaiPlayIE,
|
RaiPlayIE,
|
||||||
RaiPlayLiveIE,
|
RaiPlayLiveIE,
|
||||||
|
|
25
haruhi_dl/extractor/radioplus.py
Normal file
25
haruhi_dl/extractor/radioplus.py
Normal file
|
@ -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 a new issue