aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/adn.py
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2019-04-28 17:50:47 +0100
committerRemita Amine <remitamine@gmail.com>2019-04-28 17:50:47 +0100
commitc464e1df2c3769969b447e80b126140880d00e67 (patch)
tree6ce98799d21ad2bb17ed97b0fe4dce9f6a052c3a /youtube_dl/extractor/adn.py
parent92bc97d398cb66e4968070f9d73f02a367193c2b (diff)
[adn] fix subtitle extraction(#12724)
Diffstat (limited to 'youtube_dl/extractor/adn.py')
-rw-r--r--youtube_dl/extractor/adn.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/extractor/adn.py b/youtube_dl/extractor/adn.py
index 923c351e4..c95ad2173 100644
--- a/youtube_dl/extractor/adn.py
+++ b/youtube_dl/extractor/adn.py
@@ -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(