Explorar o código

[rtve.es:alacarta] Fix for python 3.2

Sergey M․ %!s(int64=10) %!d(string=hai) anos
pai
achega
afe8b594be
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      youtube_dl/extractor/rtve.py

+ 1 - 1
youtube_dl/extractor/rtve.py

@@ -17,7 +17,7 @@ from ..utils import (
 
 
 def _decrypt_url(png):
-    encrypted_data = base64.b64decode(png)
+    encrypted_data = base64.b64decode(png.encode('utf-8'))
     text_index = encrypted_data.find(b'tEXt')
     text_chunk = encrypted_data[text_index - 4:]
     length = struct_unpack('!I', text_chunk[:4])[0]