mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-29 05:32:00 +00:00
Add livestream.kuleuven.be extractor
This commit is contained in:
parent
a803582717
commit
44a7c656a3
2 changed files with 25 additions and 0 deletions
|
@ -548,6 +548,7 @@ from .kinopoisk import KinoPoiskIE
|
||||||
from .konserthusetplay import KonserthusetPlayIE
|
from .konserthusetplay import KonserthusetPlayIE
|
||||||
from .krasview import KrasViewIE
|
from .krasview import KrasViewIE
|
||||||
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,
|
||||||
|
|
24
youtube_dl/extractor/kuleuven_live.py
Normal file
24
youtube_dl/extractor/kuleuven_live.py
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# 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]+)'
|
||||||
|
BACKEND_BASE_URL = "https://icts-p-toledo-streaming-video-live-backend.cloud.icts.kuleuven.be/api/viewers/"
|
||||||
|
|
||||||
|
def _real_extract(self, url):
|
||||||
|
pin = self._match_id(url)
|
||||||
|
|
||||||
|
json_res = self._download_json(self.BACKEND_BASE_URL + pin, pin, 'Requesting stream URL')
|
||||||
|
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,
|
||||||
|
}
|
Loading…
Reference in a new issue