mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-16 22:37:35 +00:00
Improve regex
Co-authored-by: Roy <git@rvsit.nl>
This commit is contained in:
parent
d4250c8703
commit
ad64f3751e
@ -307,7 +307,7 @@ class VPROIE(NPOIE):
|
|||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
video_id = url.rstrip('/').split('/')[-1]
|
video_id = url.rstrip('/').split('/')[-1]
|
||||||
page, _ = self._download_webpage_handle(url, video_id)
|
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 = []
|
formats = []
|
||||||
for result in results:
|
for result in results:
|
||||||
formats.extend(self._extract_formats_by_product_id(result, video_id))
|
formats.extend(self._extract_formats_by_product_id(result, video_id))
|
||||||
|
Loading…
Reference in New Issue
Block a user