1
0
Fork 0
mirror of https://gitlab.com/dstftw/youtube-dl.git synced 2020-11-16 09:42:26 +00:00

[tvp] improve video id extraction(closes #10585)

This commit is contained in:
Remita Amine 2016-10-26 16:46:28 +01:00
parent 88839f4380
commit 3d8d44c7b1

View file

@ -69,7 +69,8 @@ class TVPIE(InfoExtractor):
webpage = self._download_webpage(url, page_id) webpage = self._download_webpage(url, page_id)
video_id = self._search_regex([ video_id = self._search_regex([
r'<iframe[^>]+src="[^"]*?object_id=(\d+)', r'<iframe[^>]+src="[^"]*?object_id=(\d+)',
"object_id\s*:\s*'(\d+)'"], webpage, 'video id') r"object_id\s*:\s*'(\d+)'",
r'data-video-id="(\d+)"'], webpage, 'video id', default=page_id)
return { return {
'_type': 'url_transparent', '_type': 'url_transparent',
'url': 'tvp:' + video_id, 'url': 'tvp:' + video_id,