1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-12-14 12:15:23 +00:00

[ie] Add _download_firefox_webpage helper

Authored by: bashonly
This commit is contained in:
bashonly
2025-06-25 12:50:20 -05:00
parent 73bf102116
commit 63590cd928
4 changed files with 55 additions and 26 deletions

View File

@@ -79,7 +79,8 @@ class MiTeleIE(TelecincoBaseIE):
def _real_extract(self, url):
display_id = self._match_id(url)
webpage = self._download_akamai_webpage(url, display_id)
# yt-dlp's default Chrome user-agents are too old and blocked by akamai
webpage = self._download_firefox_webpage(url, display_id, impersonate=True)
pre_player = self._search_json(
r'window\.\$REACTBASE_STATE\.prePlayer_mtweb\s*=',
webpage, 'Pre Player', display_id)['prePlayer']