diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:06:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:06:10 +0000 |
commit | 137f07c27a88b07df57df5b2cdebebe3c7722bac (patch) | |
tree | 4ebdcbea6b540f69c40ba0be6ac766008030d149 /yt_dlp/extractor/wppilot.py | |
parent | Adding debian version 2024.05.27-1. (diff) | |
download | yt-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/wppilot.py')
-rw-r--r-- | yt_dlp/extractor/wppilot.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yt_dlp/extractor/wppilot.py b/yt_dlp/extractor/wppilot.py index 0ef4e8e..b4cc1ab 100644 --- a/yt_dlp/extractor/wppilot.py +++ b/yt_dlp/extractor/wppilot.py @@ -103,7 +103,7 @@ class WPPilotIE(WPPilotBaseIE): is_authorized = next((c for c in self.cookiejar if c.name == 'netviapisessid'), None) # cookies starting with "g:" are assigned to guests - is_authorized = True if is_authorized is not None and not is_authorized.value.startswith('g:') else False + is_authorized = is_authorized is not None and not is_authorized.value.startswith('g:') video = self._download_json( (self._VIDEO_URL if is_authorized else self._VIDEO_GUEST_URL) % video_id, @@ -120,7 +120,7 @@ class WPPilotIE(WPPilotBaseIE): data=json.dumps({ 'channelId': video_id, 't': stream_token, - }).encode('utf-8')) + }).encode()) if try_get(close, lambda x: x['data']['status']) == 'ok': return self.url_result(url, ie=WPPilotIE.ie_key()) |