From a006a37dd36f8dfb59076fe145958d607cbd3c00 Mon Sep 17 00:00:00 2001 From: HobbyistDev Date: Sun, 7 Aug 2022 08:20:05 +0900 Subject: [PATCH] [TVIplayer] change `self.wms_auth_sign_token` to `TVIPlayer._TOKEN` --- yt_dlp/extractor/tviplayer.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/yt_dlp/extractor/tviplayer.py b/yt_dlp/extractor/tviplayer.py index f60cfb050e..8221d90e0e 100644 --- a/yt_dlp/extractor/tviplayer.py +++ b/yt_dlp/extractor/tviplayer.py @@ -51,11 +51,13 @@ class TVIPlayerIE(InfoExtractor): 'season_number': 1, } }] + _TOKEN = None def _real_initialize(self): - self.wms_auth_sign_token = self._download_webpage( - 'https://services.iol.pt/matrix?userId=', 'wmsAuthSign', - note='Trying to get wmsAuthSign token') + if TVIPlayerIE._TOKEN is None: + TVIPlayerIE._TOKEN = self._download_webpage( + 'https://services.iol.pt/matrix?userId=', 'wmsAuthSign', + note='Trying to get wmsAuthSign token') def _real_extract(self, url): video_id = self._match_id(url) @@ -65,7 +67,7 @@ def _real_extract(self, url): r'