about summary refs log tree commit diff
diff options
context:
space:
mode:
authorkikuyan <kikuyan@users.noreply.github.com>2021-12-23 11:40:45 +0900
committerdirkf <fieldhouse@gmx.net>2022-02-11 12:43:26 +0000
commit8ff961d10faed848009f9e2ec03fa390b486694d (patch)
tree183113529cda42740b85fa8f5e504bbdd43fcb2e
parent266b6ef18520f8de60fa143e154e4b12be12afb7 (diff)
downloadyoutube-dl-8ff961d10faed848009f9e2ec03fa390b486694d.tar.gz
youtube-dl-8ff961d10faed848009f9e2ec03fa390b486694d.tar.xz
youtube-dl-8ff961d10faed848009f9e2ec03fa390b486694d.zip
[extractor/videa] fix extraction in Py2
Fixes #30416
-rw-r--r--youtube_dl/extractor/videa.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/extractor/videa.py b/youtube_dl/extractor/videa.py
index ab2c15cde..bdb95891d 100644
--- a/youtube_dl/extractor/videa.py
+++ b/youtube_dl/extractor/videa.py
@@ -91,7 +91,7 @@ class VideaIE(InfoExtractor):
             k = S[(S[i] + S[j]) % 256]
             res += compat_struct_pack('B', k ^ compat_ord(cipher_text[m]))
 
-        return res.decode()
+        return res.decode('utf-8')
 
     def _real_extract(self, url):
         video_id = self._match_id(url)
@@ -121,7 +121,7 @@ class VideaIE(InfoExtractor):
                 compat_b64decode(b64_info), key), video_id)
 
         video = xpath_element(info, './video', 'video')
-        if not video:
+        if video is None:
             raise ExtractorError(xpath_element(
                 info, './error', fatal=True), expected=True)
         sources = xpath_element(