From 2c646fe42cc3a9eba21ec5b96bb2949b9bd0a7ee Mon Sep 17 00:00:00 2001 From: winterbird-code Date: Tue, 26 Jul 2022 15:22:18 +0200 Subject: [PATCH] [extractor/hidive] Fix cookie login when netrc is also given (#4447) Closes #3336 Authored by: winterbird-code --- yt_dlp/extractor/hidive.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yt_dlp/extractor/hidive.py b/yt_dlp/extractor/hidive.py index a6a71d630..50d49adf0 100644 --- a/yt_dlp/extractor/hidive.py +++ b/yt_dlp/extractor/hidive.py @@ -38,7 +38,9 @@ def _perform_login(self, username, password): webpage = self._download_webpage(self._LOGIN_URL, None) form = self._search_regex( r'(?s)]+action="/account/login"[^>]*>(.+?)', - webpage, 'login form') + webpage, 'login form', default=None) + if not form: # logged in + return data = self._hidden_inputs(form) data.update({ 'Email': username,