aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorZizheng Guo <[email protected]>2024-03-12 19:44:13 +0800
committerGitHub <[email protected]>2024-03-12 11:44:13 +0000
commita96a45b2cdcfa5f20ae4264bed268cce93fbc521 (patch)
tree0ccb99124bd8f58a3a1acf1aabb6afbb052e216f
parent820fae3b3a8587a6f57afbe803b4f91de7d4e086 (diff)
downloadyoutube-dl-a96a45b2cdcfa5f20ae4264bed268cce93fbc521.tar.gz
youtube-dl-a96a45b2cdcfa5f20ae4264bed268cce93fbc521.zip
[Vimeo] Improve `config` extraction (#32742)
* update for more robust json parsing
-rw-r--r--youtube_dl/extractor/vimeo.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/extractor/vimeo.py b/youtube_dl/extractor/vimeo.py
index 8e1a805f6..47ec0a9b4 100644
--- a/youtube_dl/extractor/vimeo.py
+++ b/youtube_dl/extractor/vimeo.py
@@ -673,8 +673,8 @@ class VimeoIE(VimeoBaseInfoExtractor):
raise
if '//player.vimeo.com/video/' in url:
- config = self._parse_json(self._search_regex(
- r'(?s)\b(?:playerC|c)onfig\s*=\s*({.+?})\s*[;\n]', webpage, 'info section'), video_id)
+ config = self._search_json(
+ r'\b(?:playerC|c)onfig\s*=', webpage, 'info section', video_id)
if config.get('view') == 4:
config = self._verify_player_video_password(
redirect_url, video_id, headers)