summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/tennistv.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:10 +0000
commit137f07c27a88b07df57df5b2cdebebe3c7722bac (patch)
tree4ebdcbea6b540f69c40ba0be6ac766008030d149 /yt_dlp/extractor/tennistv.py
parentAdding debian version 2024.05.27-1. (diff)
downloadyt-dlp-137f07c27a88b07df57df5b2cdebebe3c7722bac.tar.xz
yt-dlp-137f07c27a88b07df57df5b2cdebebe3c7722bac.zip
Merging upstream version 2024.07.01.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/extractor/tennistv.py')
-rw-r--r--yt_dlp/extractor/tennistv.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/yt_dlp/extractor/tennistv.py b/yt_dlp/extractor/tennistv.py
index c1b4a33..197d789 100644
--- a/yt_dlp/extractor/tennistv.py
+++ b/yt_dlp/extractor/tennistv.py
@@ -47,7 +47,7 @@ class TennisTVIE(InfoExtractor):
_HEADERS = {
'origin': 'https://www.tennistv.com',
'referer': 'https://www.tennistv.com/',
- 'content-Type': 'application/x-www-form-urlencoded'
+ 'content-Type': 'application/x-www-form-urlencoded',
}
def _perform_login(self, username, password):
@@ -58,7 +58,7 @@ class TennisTVIE(InfoExtractor):
'redirect_uri': 'https://tennistv.com',
'response_mode': 'fragment',
'response_type': 'code',
- 'scope': 'openid'
+ 'scope': 'openid',
})
post_url = self._html_search_regex(r'action=["\']([^"\']+?)["\']\s+method=["\']post["\']', login_page, 'login POST url')
@@ -67,7 +67,7 @@ class TennisTVIE(InfoExtractor):
headers=self._HEADERS, data=urlencode_postdata({
'username': username,
'password': password,
- 'submitAction': 'Log In'
+ 'submitAction': 'Log In',
}))
if 'Your username or password was incorrect' in temp_page:
raise ExtractorError('Your username or password was incorrect', expected=True)
@@ -82,14 +82,14 @@ class TennisTVIE(InfoExtractor):
'response_type': 'code',
'scope': 'openid',
'nonce': random_uuidv4(),
- 'prompt': 'none'
+ 'prompt': 'none',
})
self.get_token(None, {
'code': urllib.parse.parse_qs(handle.url)['code'][-1],
'grant_type': 'authorization_code',
'client_id': 'tennis-tv-web',
- 'redirect_uri': 'https://www.tennistv.com/resources/v1.1.10/html/silent-check-sso.html'
+ 'redirect_uri': 'https://www.tennistv.com/resources/v1.1.10/html/silent-check-sso.html',
})
def get_token(self, video_id, payload):
@@ -109,7 +109,7 @@ class TennisTVIE(InfoExtractor):
self.raise_login_required()
self.access_token, self.refresh_token = cookies['access_token'].value, cookies['refresh_token'].value
- def _download_session_json(self, video_id, entryid,):
+ def _download_session_json(self, video_id, entryid):
return self._download_json(
f'https://atppayments.streamamg.com/api/v1/session/ksession/?lang=en&apijwttoken={self.access_token}&entryId={entryid}',
video_id, 'Downloading ksession token', 'Failed to download ksession token', headers=self._HEADERS)
@@ -126,7 +126,7 @@ class TennisTVIE(InfoExtractor):
self.get_token(video_id, {
'grant_type': 'refresh_token',
'refresh_token': self.refresh_token,
- 'client_id': 'tennis-tv-web'
+ 'client_id': 'tennis-tv-web',
})
k_session = self._download_session_json(video_id, entryid).get('KSession')
if k_session is None: