aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-11-23 13:15:49 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-11-23 13:30:40 +0530
commitd52cd2f5cd54bd100a51fca8e4044b4f2a89fade (patch)
tree83f3428d6f05b7bc8728a1563cc5274b9430934c
parentbc8ab44ea08995bd4345c9ca149ba82591b600bb (diff)
downloadhypervideo-pre-d52cd2f5cd54bd100a51fca8e4044b4f2a89fade.tar.lz
hypervideo-pre-d52cd2f5cd54bd100a51fca8e4044b4f2a89fade.tar.xz
hypervideo-pre-d52cd2f5cd54bd100a51fca8e4044b4f2a89fade.zip
[sbs] Fix for movies and livestreams
Closes #1640
-rw-r--r--yt_dlp/extractor/sbs.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/yt_dlp/extractor/sbs.py b/yt_dlp/extractor/sbs.py
index 0a806ee4e..4090f6385 100644
--- a/yt_dlp/extractor/sbs.py
+++ b/yt_dlp/extractor/sbs.py
@@ -10,7 +10,14 @@ from ..utils import (
class SBSIE(InfoExtractor):
IE_DESC = 'sbs.com.au'
- _VALID_URL = r'https?://(?:www\.)?sbs\.com\.au/(?:ondemand(?:/video/(?:single/)?|.*?\bplay=|/watch/)|news/(?:embeds/)?video/)(?P<id>[0-9]+)'
+ _VALID_URL = r'''(?x)
+ https?://(?:www\.)?sbs\.com\.au/(?:
+ ondemand(?:
+ /video/(?:single/)?|
+ /movie/[^/]+/|
+ .*?\bplay=|/watch/
+ )|news/(?:embeds/)?video/
+ )(?P<id>[0-9]+)'''
_TESTS = [{
# Original URL is handled by the generic IE which finds the iframe:
@@ -46,6 +53,13 @@ class SBSIE(InfoExtractor):
}, {
'url': 'https://www.sbs.com.au/ondemand/watch/1698704451971',
'only_matching': True,
+ }, {
+ 'url': 'https://www.sbs.com.au/ondemand/movie/coherence/1469404227931',
+ 'only_matching': True,
+ }, {
+ 'note': 'Live stream',
+ 'url': 'https://www.sbs.com.au/ondemand/video/1726824003663/sbs-24x7-live-stream-nsw',
+ 'only_matching': True,
}]
def _real_extract(self, url):
@@ -75,4 +89,5 @@ class SBSIE(InfoExtractor):
'ie_key': 'ThePlatform',
'id': video_id,
'url': smuggle_url(self._proto_relative_url(theplatform_url), {'force_smil_url': True}),
+ 'is_live': player_params.get('streamType') == 'live',
}