Skip to content

Commit

Permalink
change hmac key
Browse files Browse the repository at this point in the history
  • Loading branch information
tyusha0 committed May 23, 2024
1 parent ceff7cd commit 3fd5d4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yt_dlp_plugins/extractor/yandex_translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


_workerHost = "api.browser.yandex.ru"
_yandexHmacKey = b"xtGCyGdTY2Jy6OMEKdTuXev3Twhkamgm"
_yandexHmacKey = b"bt8xH3VOlb4mqf0nqAibnDOoiPlXsisf"
_yandexUserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 YaBrowser/23.7.1.1140 Yowser/2.5 Safari/537.36"
_getSignature = lambda body: hmac.new(_yandexHmacKey, msg=body, digestmod=hashlib.sha256).hexdigest()

Expand Down Expand Up @@ -127,4 +127,4 @@ def _real_extract(self, url):
info["subtitles"][sub_lang.translatedLanguage].append({"ext": "YTjson", "url": sub_lang.translatedUrl, "name": f'{sub_lang.language}->{sub_lang.translatedLanguage}',
"http_headers":sub_tr["headers"]})
self._downloader.add_post_processor(YandexTranslateSubtitleFixPP(self._downloader), when='before_dl')
return info
return info

0 comments on commit 3fd5d4c

Please sign in to comment.