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 @@ class TVIPlayerIE(InfoExtractor): r'