[mixcloud] Fix play info decryption (closes #13885)
authorSergey M․ <dstftw@gmail.com>
Sat, 12 Aug 2017 09:30:50 +0000 (16:30 +0700)
committerSergey M․ <dstftw@gmail.com>
Sat, 12 Aug 2017 09:30:50 +0000 (16:30 +0700)
youtube_dl/extractor/mixcloud.py

index 40cd2e389eb545a1ee21439d66eccd12e6440967..52f7428e0155ad413316b7b7b1bf4bdd0c9d04b6 100644 (file)
@@ -57,7 +57,8 @@ class MixcloudIE(InfoExtractor):
     def _decrypt_play_info(self, play_info, video_id):
         KEYS = (
             'pleasedontdownloadourmusictheartistswontgetpaid',
-            '(function() { return new Date().toLocaleDateString(); })()'
+            'window.addEventListener = window.addEventListener || function() {};',
+            '(function() { return new Date().toLocaleDateString(); })()',
         )
         play_info = base64.b64decode(play_info.encode('ascii'))
         for num, key in enumerate(KEYS, start=1):