Match HTML tags

This commit is contained in:
Bart Broere 2025-05-19 17:32:37 +02:00 committed by GitHub
parent 86118717af
commit 8fd477c797
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -357,7 +357,7 @@ class VPROIE(NPOIE):
def _real_extract(self, url):
video_id = url.rstrip('/').split('/')[-1]
page = self._download_webpage(url, video_id)
format = traverse_obj(re.search(r'data-media-id="([a-zA-Z0-9_]+)"\s', page), (
format = traverse_obj(re.search(r'<[\w.-]+\s[^>]*(?<!-)\bdata-media-id\s*=\s*[^>]+>', page), (
1, T(lambda x: self._extract_formats_by_product_id(x, video_id)),
Ellipsis))