From 0755d56546e58d2021f23605635c4e35978a4bd2 Mon Sep 17 00:00:00 2001 From: Nuno Costa Date: Thu, 9 Oct 2025 02:23:39 +0100 Subject: [PATCH] more fix --- yt_dlp/extractor/tviplayer.py | 62 +++++++++++++++++------------------ 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/yt_dlp/extractor/tviplayer.py b/yt_dlp/extractor/tviplayer.py index 1eb3dba4cd..2c66b84139 100644 --- a/yt_dlp/extractor/tviplayer.py +++ b/yt_dlp/extractor/tviplayer.py @@ -14,28 +14,28 @@ from ..utils.traversal import ( class TVIPlayerIE(InfoExtractor): _VALID_URL = ( - r"https?://tviplayer\.iol\.pt(?:/programa/[\w-]+/[a-f0-9]+)?/\w+/(?P\w+)" + r'https?://tviplayer\.iol\.pt(?:/programa/[\w-]+/[a-f0-9]+)?/\w+/(?P\w+)' ) _TESTS = [ { - "url": "https://tviplayer.iol.pt/programa/a-protegida/67a63479d34ef72ee441fa79/episodio/t1e120", + 'url': 'https://tviplayer.iol.pt/programa/a-protegida/67a63479d34ef72ee441fa79/episodio/t1e120', "info_dict": { - "id": "689683000cf20ac1d5f35341", - "ext": "mp4", - "duration": 1593, - "title": "A Protegida - Clarice descobre o que une Óscar a Gonçalo e Mónica", - "thumbnail": "https://img.iol.pt/image/id/68971037d34ef72ee44941a6/", - "season_number": 1, + 'id': '689683000cf20ac1d5f35341', + 'ext': 'mp4', + 'duration': 1593, + 'title': 'A Protegida - Clarice descobre o que une Óscar a Gonçalo e Mónica', + 'thumbnail': 'https://img.iol.pt/image/id/68971037d34ef72ee44941a6/', + 'season_number': 1, }, - } + }, ] def _real_initialize(self): # Obtain the wmsAuthSign token (non-fatal) self.wms_auth_sign_token = self._download_webpage( - "https://services.iol.pt/matrix?userId=", - "wmsAuthSign", - note="Downloading wmsAuthSign token", + 'https://services.iol.pt/matrix?userId=', + 'wmsAuthSign', + note='Downloading wmsAuthSign token', fatal=False, ) @@ -45,9 +45,9 @@ class TVIPlayerIE(InfoExtractor): # Try to locate a JS "video: [ {...} ]" block json_data = self._search_json( - r"(?