26 lines
939 B
Python
26 lines
939 B
Python
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}
|