aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMinePlayersPE <mineplayerspealt@gmail.com>2021-07-29 11:41:05 +0700
committerGitHub <noreply@github.com>2021-07-29 10:11:05 +0530
commit11cc45718c472b2eeb9984456c1dcbf968d7aad1 (patch)
treea65439164264e03cdd26538ae6f709141b94596d
parentfe07e2c69fde0c8585b37b19a626f98c8c5510c9 (diff)
downloadhypervideo-pre-11cc45718c472b2eeb9984456c1dcbf968d7aad1.tar.lz
hypervideo-pre-11cc45718c472b2eeb9984456c1dcbf968d7aad1.tar.xz
hypervideo-pre-11cc45718c472b2eeb9984456c1dcbf968d7aad1.zip
[vidio] Fix login error detection (#582)
Authored by: MinePlayersPE
-rw-r--r--yt_dlp/extractor/vidio.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/yt_dlp/extractor/vidio.py b/yt_dlp/extractor/vidio.py
index 74b92cebc..b9ee67d20 100644
--- a/yt_dlp/extractor/vidio.py
+++ b/yt_dlp/extractor/vidio.py
@@ -5,6 +5,7 @@ import re
from .common import InfoExtractor
from ..utils import (
+ clean_html,
ExtractorError,
get_element_by_class,
int_or_none,
@@ -47,10 +48,19 @@ class VidioBaseIE(InfoExtractor):
self._LOGIN_URL, None, 'Logging in', data=urlencode_postdata(login_form), expected_status=[302, 401])
if login_post_urlh.status == 401:
- reason = get_element_by_class('onboarding-form__general-error', login_post)
- if reason:
+ if get_element_by_class('onboarding-content-register-popup__title', login_post):
raise ExtractorError(
- 'Unable to log in: %s' % reason, expected=True)
+ 'Unable to log in: The provided email has not registered yet.', expected=True)
+
+ reason = get_element_by_class('onboarding-form__general-error', login_post) or get_element_by_class('onboarding-modal__title', login_post)
+ if 'Akun terhubung ke' in reason:
+ raise ExtractorError(
+ 'Unable to log in: Your account is linked to a social media account. '
+ 'Use --cookies to provide account credentials instead', expected=True)
+ elif reason:
+ subreason = get_element_by_class('onboarding-modal__description-text', login_post) or ''
+ raise ExtractorError(
+ 'Unable to log in: %s. %s' % (reason, clean_html(subreason)), expected=True)
raise ExtractorError('Unable to log in')
def _real_initialize(self):