|
|
|
@ -1,3 +1,5 @@
|
|
|
|
|
import re
|
|
|
|
|
|
|
|
|
|
from .common import InfoExtractor
|
|
|
|
|
from ..utils import (
|
|
|
|
|
ExtractorError,
|
|
|
|
@ -6,6 +8,7 @@ from ..utils import (
|
|
|
|
|
traverse_obj,
|
|
|
|
|
unified_timestamp,
|
|
|
|
|
url_or_none,
|
|
|
|
|
urljoin,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -21,8 +24,7 @@ class RTVSLOIE(InfoExtractor):
|
|
|
|
|
_API_BASE = 'https://api.rtvslo.si/ava/{}/{}?client_id=82013fb3a531d5414f478747c1aca622'
|
|
|
|
|
SUB_LANGS_MAP = {'Slovenski': 'sl'}
|
|
|
|
|
|
|
|
|
|
_TESTS = [
|
|
|
|
|
{
|
|
|
|
|
_TESTS = [{
|
|
|
|
|
'url': 'https://www.rtvslo.si/rtv365/arhiv/174842550?s=tv',
|
|
|
|
|
'info_dict': {
|
|
|
|
|
'id': '174842550',
|
|
|
|
@ -88,8 +90,7 @@ class RTVSLOIE(InfoExtractor):
|
|
|
|
|
}, {
|
|
|
|
|
'url': 'https://4d.rtvslo.si/arhiv/dnevnik/174842550',
|
|
|
|
|
'only_matching': True,
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
}]
|
|
|
|
|
|
|
|
|
|
def _real_extract(self, url):
|
|
|
|
|
v_id = self._match_id(url)
|
|
|
|
@ -164,3 +165,26 @@ class RTVSLOIE(InfoExtractor):
|
|
|
|
|
'series': meta.get('showName'),
|
|
|
|
|
'series_id': meta.get('showId'),
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class RTVSLOShowIE(InfoExtractor):
|
|
|
|
|
IE_NAME = 'rtvslo.si:show'
|
|
|
|
|
_VALID_URL = r'https?://(?:365|4d)\.rtvslo.si/oddaja/[^/?#&]+/(?P<id>\d+)'
|
|
|
|
|
|
|
|
|
|
_TESTS = [{
|
|
|
|
|
'url': 'https://365.rtvslo.si/oddaja/ekipa-bled/173250997',
|
|
|
|
|
'info_dict': {
|
|
|
|
|
'id': '173250997',
|
|
|
|
|
'title': 'Ekipa Bled',
|
|
|
|
|
},
|
|
|
|
|
'playlist_count': 18,
|
|
|
|
|
}]
|
|
|
|
|
|
|
|
|
|
def _real_extract(self, url):
|
|
|
|
|
playlist_id = self._match_id(url)
|
|
|
|
|
webpage = self._download_webpage(url, playlist_id)
|
|
|
|
|
|
|
|
|
|
return self.playlist_from_matches(
|
|
|
|
|
re.findall(r'<a [^>]*\bhref="(/arhiv/[^"]+)"', webpage),
|
|
|
|
|
playlist_id, self._html_extract_title(webpage),
|
|
|
|
|
getter=lambda x: urljoin('https://365.rtvslo.si', x), ie=RTVSLOIE)
|
|
|
|
|