Skip to content

Commit

Permalink
update vimeo.py for more robust json parsing, according to
Browse files Browse the repository at this point in the history
dirkf's suggestions
  • Loading branch information
gzz2000 committed Mar 12, 2024
1 parent 3adfe21 commit 7b8cb3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions youtube_dl/extractor/vimeo.py
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|\<\/script\>)', 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 7b8cb3e

Please sign in to comment.