From ad64f3751e74c5ee2bbe45a6d5110813dbdd77f3 Mon Sep 17 00:00:00 2001 From: Bart Broere Date: Thu, 14 Mar 2024 13:34:33 +0100 Subject: [PATCH] Improve regex Co-authored-by: Roy --- youtube_dl/extractor/npo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/npo.py b/youtube_dl/extractor/npo.py index ea1e0fd2b..27582ae9f 100644 --- a/youtube_dl/extractor/npo.py +++ b/youtube_dl/extractor/npo.py @@ -307,7 +307,7 @@ class VPROIE(NPOIE): def _real_extract(self, url): video_id = url.rstrip('/').split('/')[-1] page, _ = self._download_webpage_handle(url, video_id) - results = re.findall(r'data-media-id="(.+_.+)"\s', page) + results = re.findall(r'data-media-id="([a-zA-Z0-9_]+)"\s', page) formats = [] for result in results: formats.extend(self._extract_formats_by_product_id(result, video_id))