Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Vimeo] fix config parser regex #32742

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
update vimeo.py for more robust json parsing, according to
dirkf's suggestions
gzz2000 committed Mar 12, 2024
commit 7b8cb3ea12da8c2f0db5ea67855ed66d23b5f01c
4 changes: 2 additions & 2 deletions youtube_dl/extractor/vimeo.py
Original file line number Diff line number Diff line change
@@ -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)