[CTVNewsIE] Add fallback for video search (#2378)

Closes #2370
Authored by: Ashish0804
This commit is contained in:
Ashish Gupta 2022-01-19 19:18:57 +05:30 committed by GitHub
parent 42c5458a02
commit dfb7f2a25d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,4 +65,9 @@ def ninecninemedia_url_result(clip_id):
})
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)