From: Sergey M․ Date: Sat, 30 Jan 2016 22:41:18 +0000 (+0600) Subject: [schooltv] Improve video id regex X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=673fb82e65e28935ad16d85771cefe15013a12bd;p=youtube-dl.git [schooltv] Improve video id regex --- diff --git a/youtube_dl/extractor/npo.py b/youtube_dl/extractor/npo.py index a4363c16e..87f5675c7 100644 --- a/youtube_dl/extractor/npo.py +++ b/youtube_dl/extractor/npo.py @@ -428,7 +428,8 @@ class SchoolTVIE(InfoExtractor): def _real_extract(self, url): display_id = self._match_id(url) webpage = self._download_webpage(url, display_id) - video_id = self._search_regex(r'data-mid="([^"]+)"', webpage, 'video_id') + video_id = self._search_regex( + r'data-mid=(["\'])(?P.+?)\1', webpage, 'video_id', group='id') return { '_type': 'url_transparent', 'ie_key': 'NPO',