aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/extractor/tennistv.py
diff options
context:
space:
mode:
Diffstat (limited to 'yt_dlp/extractor/tennistv.py')
-rw-r--r--yt_dlp/extractor/tennistv.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/yt_dlp/extractor/tennistv.py b/yt_dlp/extractor/tennistv.py
index a39a2fc60..58fdecebe 100644
--- a/yt_dlp/extractor/tennistv.py
+++ b/yt_dlp/extractor/tennistv.py
@@ -30,11 +30,9 @@ class TennisTVIE(InfoExtractor):
'skip': 'Requires email and password of a subscribed account',
}
_NETRC_MACHINE = 'tennistv'
+ _session_token = None
- def _login(self):
- username, password = self._get_login_info()
- if not username or not password:
- raise ExtractorError('No login info available, needed for using %s.' % self.IE_NAME, expected=True)
+ def _perform_login(self, username, password):
login_form = {
'Email': username,
@@ -63,7 +61,8 @@ class TennisTVIE(InfoExtractor):
self._session_token = login_result['sessionToken']
def _real_initialize(self):
- self._login()
+ if not self._session_token:
+ raise self.raise_login_required('Login info is needed for this website', method='password')
def _real_extract(self, url):
video_id = self._match_id(url)