summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/douyutv.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:48 +0000
commitdeb9c3cdb096ee4aa1cd29cdd249cd40bdff73e8 (patch)
tree28cdb51427d366c5e840a4a364c6fc078da925af /yt_dlp/extractor/douyutv.py
parentReleasing progress-linux version 2024.07.02-1~progress7.99u1. (diff)
downloadyt-dlp-deb9c3cdb096ee4aa1cd29cdd249cd40bdff73e8.tar.xz
yt-dlp-deb9c3cdb096ee4aa1cd29cdd249cd40bdff73e8.zip
Merging upstream version 2024.07.07.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/extractor/douyutv.py')
-rw-r--r--yt_dlp/extractor/douyutv.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/yt_dlp/extractor/douyutv.py b/yt_dlp/extractor/douyutv.py
index fdf19c2..e36eac9 100644
--- a/yt_dlp/extractor/douyutv.py
+++ b/yt_dlp/extractor/douyutv.py
@@ -24,8 +24,9 @@ from ..utils import (
class DouyuBaseIE(InfoExtractor):
def _download_cryptojs_md5(self, video_id):
for url in [
+ # XXX: Do NOT use cdn.bootcdn.net; ref: https://sansec.io/research/polyfill-supply-chain-attack
'https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/md5.js',
- 'https://cdn.bootcdn.net/ajax/libs/crypto-js/3.1.2/rollups/md5.js',
+ 'https://unpkg.com/cryptojslib@3.1.2/rollups/md5.js',
]:
js_code = self._download_webpage(
url, video_id, note='Downloading signing dependency', fatal=False)
@@ -35,7 +36,8 @@ class DouyuBaseIE(InfoExtractor):
raise ExtractorError('Unable to download JS dependency (crypto-js/md5)')
def _get_cryptojs_md5(self, video_id):
- return self.cache.load('douyu', 'crypto-js-md5') or self._download_cryptojs_md5(video_id)
+ return self.cache.load(
+ 'douyu', 'crypto-js-md5', min_ver='2024.07.04') or self._download_cryptojs_md5(video_id)
def _calc_sign(self, sign_func, video_id, a):
b = uuid.uuid4().hex