From 7708df8da05c94270b43e0630e4e20f6d2d62c55 Mon Sep 17 00:00:00 2001 From: Alex Berg Date: Sat, 11 Feb 2023 21:47:52 -0600 Subject: [PATCH] [extractor/Hidive] Fix subtitles and age-restriction (#5828) Authored by: chexxor Closes #408 --- yt_dlp/extractor/hidive.py | 50 +++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/yt_dlp/extractor/hidive.py b/yt_dlp/extractor/hidive.py index 3a53f2c45..8a8749859 100644 --- a/yt_dlp/extractor/hidive.py +++ b/yt_dlp/extractor/hidive.py @@ -1,5 +1,3 @@ -import re - from .common import InfoExtractor from ..utils import ( ExtractorError, @@ -39,15 +37,27 @@ class HiDiveIE(InfoExtractor): form = self._search_regex( r'(?s)]+action="/account/login"[^>]*>(.+?)', webpage, 'login form', default=None) - if not form: # logged in + if not form: return data = self._hidden_inputs(form) data.update({ 'Email': username, 'Password': password, }) - self._download_webpage( + login_webpage = self._download_webpage( self._LOGIN_URL, None, 'Logging in', data=urlencode_postdata(data)) + # If the user has multiple profiles on their account, select one. For now pick the first profile. + profile_id = self._search_regex(r'