]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[adn] fix subtitle extraction(#12724)
authorRemita Amine <remitamine@gmail.com>
Sun, 28 Apr 2019 16:50:47 +0000 (17:50 +0100)
committerRemita Amine <remitamine@gmail.com>
Sun, 28 Apr 2019 16:50:47 +0000 (17:50 +0100)
youtube_dl/extractor/adn.py

index 923c351e4c5988d36001f6599268be49e0fcab46..c95ad2173522455d925b3248065ce914a35e3f0c 100644 (file)
@@ -65,14 +65,15 @@ class ADNIE(InfoExtractor):
         if subtitle_location:
             enc_subtitles = self._download_webpage(
                 urljoin(self._BASE_URL, subtitle_location),
-                video_id, 'Downloading subtitles data', fatal=False)
+                video_id, 'Downloading subtitles data', fatal=False,
+                headers={'Origin': 'https://animedigitalnetwork.fr'})
         if not enc_subtitles:
             return None
 
         # http://animedigitalnetwork.fr/components/com_vodvideo/videojs/adn-vjs.min.js
         dec_subtitles = intlist_to_bytes(aes_cbc_decrypt(
             bytes_to_intlist(compat_b64decode(enc_subtitles[24:])),
-            bytes_to_intlist(binascii.unhexlify(self._K + '4421de0a5f0814ba')),
+            bytes_to_intlist(binascii.unhexlify(self._K + '4b8ef13ec1872730')),
             bytes_to_intlist(compat_b64decode(enc_subtitles[:24]))
         ))
         subtitles_json = self._parse_json(