diff options
author | Ashish Gupta <39122144+Ashish0804@users.noreply.github.com> | 2022-01-19 19:18:57 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-19 19:18:57 +0530 |
commit | dfb7f2a25ddaca8d89805497d4505c669908677f (patch) | |
tree | 2b76d25d813661c9c2d757db6913861332f64d07 | |
parent | 42c5458a02e5b5c364cc52afe5f895428e4deb35 (diff) | |
download | hypervideo-pre-dfb7f2a25ddaca8d89805497d4505c669908677f.tar.lz hypervideo-pre-dfb7f2a25ddaca8d89805497d4505c669908677f.tar.xz hypervideo-pre-dfb7f2a25ddaca8d89805497d4505c669908677f.zip |
[CTVNewsIE] Add fallback for video search (#2378)
Closes #2370
Authored by: Ashish0804
-rw-r--r-- | yt_dlp/extractor/ctvnews.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/yt_dlp/extractor/ctvnews.py b/yt_dlp/extractor/ctvnews.py index 03f8cefb7..952f4c747 100644 --- a/yt_dlp/extractor/ctvnews.py +++ b/yt_dlp/extractor/ctvnews.py @@ -65,4 +65,9 @@ class CTVNewsIE(InfoExtractor): }) entries = [ninecninemedia_url_result(clip_id) for clip_id in orderedSet( re.findall(r'clip\.id\s*=\s*(\d+);', webpage))] + if not entries: + webpage = self._download_webpage(url, page_id) + if 'getAuthStates("' in webpage: + entries = [ninecninemedia_url_result(clip_id) for clip_id in + self._search_regex(r'getAuthStates\("([\d+,]+)"', webpage, 'clip ids').split(',')] return self.playlist_result(entries, page_id) |