From 1e804244d062c7620bcc9498cba1c7d3d8bd8095 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sergey=20M=E2=80=A4?= Date: Wed, 2 Sep 2015 21:38:56 +0600 Subject: [PATCH] [ok] Improve player regex --- youtube_dl/extractor/odnoklassniki.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/odnoklassniki.py b/youtube_dl/extractor/odnoklassniki.py index 97900a4c3..4564fd0be 100644 --- a/youtube_dl/extractor/odnoklassniki.py +++ b/youtube_dl/extractor/odnoklassniki.py @@ -59,7 +59,8 @@ class OdnoklassnikiIE(InfoExtractor): player = self._parse_json( unescapeHTML(self._search_regex( - r'data-options="([^"]+%s[^"]+)"' % video_id, webpage, 'player')), + r'data-options=(?P["\'])(?P{.+?%s.+?})(?P=quote)' % video_id, + webpage, 'player', group='player')), video_id) flashvars = player['flashvars'] -- 2.22.2