From 1a16c62638033db24d0446a9e2f88293192c9563 Mon Sep 17 00:00:00 2001 From: ChocoLZS Date: Thu, 22 Aug 2024 19:51:05 +0800 Subject: [PATCH] chore: rename regex and add referer --- yt_dlp/extractor/pialive.py | 13 ++++--------- yt_dlp/extractor/piaulizaportal.py | 4 ++-- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/yt_dlp/extractor/pialive.py b/yt_dlp/extractor/pialive.py index 9ea1b22432..a6fc8ffffc 100644 --- a/yt_dlp/extractor/pialive.py +++ b/yt_dlp/extractor/pialive.py @@ -36,10 +36,10 @@ class PiaLiveIE(InfoExtractor): ] def handle_embed_player(self, player_tag, video_id, info_dict={}): - player_data_url = self._search_regex([PIAULIZAPortalAPIIE.TAG_REGEX_PATTERN], + player_data_url = self._search_regex([PIAULIZAPortalAPIIE.TAG_REGEX], player_tag, 'player data url', fatal=False) - if PIAULIZAPortalAPIIE.BASE_URL in player_data_url: + if player_data_url.startswith(PIAULIZAPortalAPIIE.BASE_URL): return self.url_result( smuggle_url( player_data_url, @@ -57,8 +57,7 @@ class PiaLiveIE(InfoExtractor): prod_configure = self._download_webpage( self.PLAYER_ROOT_URL + self._search_regex(r'