From dbb084c0015d80901b2f7e4e0848ef36bee19ff7 Mon Sep 17 00:00:00 2001 From: HobbyistDev Date: Mon, 26 Feb 2024 19:36:26 +0800 Subject: [PATCH] add comment about possible to bypass geo-blocking --- yt_dlp/extractor/viu.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yt_dlp/extractor/viu.py b/yt_dlp/extractor/viu.py index cfddfed5f6..9962e9f956 100644 --- a/yt_dlp/extractor/viu.py +++ b/yt_dlp/extractor/viu.py @@ -295,6 +295,9 @@ def _real_extract(self, url): next_js_data = self._search_nextjs_data(webpage, video_id)['props'] runtime_info = next_js_data['initialState']['app']['runtimeInfo'] + # Weird thing happen if i insert technilacally geo-blocked content like + # like https://www.viu.com/ott/sg/en/vod/108599/The-Beauty-Inside in ID region, + # it still download. Maybe API not affected by geo-block? product_detail_json = traverse_obj( next_js_data, ('pageProps', 'fallback', lambda k, v: v if re.match(r'@"PRODUCT_DETAIL"[^:]+', k) else None), get_all=False)