Compare commits

...

2 Commits

Author SHA1 Message Date
Inias Peeters
b012549c58
Merge c2d325eafd into e1b3fa242c 2024-07-28 01:30:35 +09:00
Inias Peeters
c2d325eafd
[kuleuven_live] Add new extractor 2021-11-05 00:28:35 +01:00
2 changed files with 29 additions and 0 deletions

View File

@ -576,6 +576,7 @@ from .konserthusetplay import KonserthusetPlayIE
from .krasview import KrasViewIE from .krasview import KrasViewIE
from .kth import KTHIE from .kth import KTHIE
from .ku6 import Ku6IE from .ku6 import Ku6IE
from .kuleuven_live import KULLiveIE
from .kusi import KUSIIE from .kusi import KUSIIE
from .kuwo import ( from .kuwo import (
KuwoIE, KuwoIE,

View File

@ -0,0 +1,28 @@
# coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class KULLiveIE(InfoExtractor):
_VALID_URL = r'(?:(?:https?://(?:www\.)?livestream.kuleuven\.be/\?pin=)|kulive:)(?P<id>[0-9]+)'
def _real_extract(self, url):
pin = self._match_id(url)
json_res = self._download_json(
"https://icts-p-toledo-streaming-video-live-backend.cloud.icts.kuleuven.be/api/viewers/" + pin,
pin,
'Requesting stream URL',
errnote='The stream with pin %s does not exist or has not started yet' % pin,
fatal=True)
m3u8_url = json_res['streamUrl']
formats = self._extract_m3u8_formats(m3u8_url, pin, 'mp4')
return {
'id': pin,
'title': 'kul-stream',
'is_live': True,
'formats': formats,
}