mirror of
https://github.com/l1ving/youtube-dl
synced 2025-01-24 00:45:38 +08:00
[BrightcoveNew] Fix: find videos embedded in xilinx.com site
In xilinx.com sites there are no video tags, the video_id can be found in a div tag. (the brightcove script is before the div (video-id) tag.)
This commit is contained in:
parent
640788f6f4
commit
587d53ea81
@ -484,6 +484,19 @@ class BrightcoveNewIE(AdobePassIE):
|
||||
# m3u8 download
|
||||
'skip_download': True,
|
||||
}
|
||||
}, {
|
||||
# xilinx.com url embed
|
||||
'url': 'https://www.xilinx.com/video/soc/how-to-use-the-zynq-7000-verification-ip-verify-debug-simulation.html',
|
||||
'info_dict': {
|
||||
'id': '5607699465001',
|
||||
'ext': 'mp4',
|
||||
'title': 'How to use the Zynq 7000 Verification IP to verify and debug using simulation',
|
||||
'description': 'Learn how to efficiently verify designs that use Zynq 7000 Processing System using the Zynq 7000 VIP. This video introduces you to how to configure and how to simulate with the example project.',
|
||||
'duration': 456.66,
|
||||
'timestamp': 1507851806,
|
||||
'upload_date': '20171012',
|
||||
'uploader_id': '17209957001',
|
||||
},
|
||||
}, {
|
||||
# ref: prefixed video id
|
||||
'url': 'http://players.brightcove.net/3910869709001/21519b5c-4b3b-4363-accb-bdc8f358f823_default/index.html?videoId=ref:7069442',
|
||||
@ -562,6 +575,29 @@ class BrightcoveNewIE(AdobePassIE):
|
||||
|
||||
entries.append(bc_url)
|
||||
|
||||
for account_id, player_id, embed in re.findall(
|
||||
r'''<script[^>]+src=["\'](?:https?:)?//players\.brightcove\.net/(\d+)/([^/]+)_([^/]+)/index(?:\.min)?\.js''', webpage):
|
||||
for video_id in re.findall(r'''<div[^>]*data-video-id=['"](\d+)['"]''', webpage):
|
||||
|
||||
if not video_id:
|
||||
continue
|
||||
|
||||
if not account_id:
|
||||
continue
|
||||
|
||||
player_id = player_id or 'default'
|
||||
|
||||
embed = embed or 'default'
|
||||
|
||||
bc_url = 'http://players.brightcove.net/%s/%s_%s/index.html?videoId=%s' % (
|
||||
account_id, player_id, embed, video_id)
|
||||
|
||||
if not ie._is_valid_url(
|
||||
bc_url, video_id, 'possible brightcove video'):
|
||||
continue
|
||||
|
||||
entries.append(bc_url)
|
||||
|
||||
return entries
|
||||
|
||||
def _parse_brightcove_metadata(self, json_data, video_id):
|
||||
|
Loading…
Reference in New Issue
Block a user