Skip to content

Commit

Permalink
[Vimeo] Improve config extraction (ytdl-org#32742)
Browse files Browse the repository at this point in the history
* update for more robust json parsing
  • Loading branch information
gzz2000 authored Mar 12, 2024
1 parent 820fae3 commit a96a45b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions youtube_dl/extractor/vimeo.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,8 +673,8 @@ def _real_extract(self, url):
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)
Expand Down

0 comments on commit a96a45b

Please sign in to comment.