Browse Source

[brightcove:new] Add support for ref: preffixed video ids (Closes #7794)

totalwebcasting
Sergey M․ 9 years ago
parent
commit
9fd0f67678
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      youtube_dl/extractor/brightcove.py

+ 2
- 2
youtube_dl/extractor/brightcove.py View File

@ -355,7 +355,7 @@ class BrightcoveLegacyIE(InfoExtractor):
class BrightcoveNewIE(InfoExtractor): class BrightcoveNewIE(InfoExtractor):
IE_NAME = 'brightcove:new' IE_NAME = 'brightcove:new'
_VALID_URL = r'https?://players\.brightcove\.net/(?P<account_id>\d+)/(?P<player_id>[^/]+)_(?P<embed>[^/]+)/index\.html\?.*videoId=(?P<video_id>\d+)'
_VALID_URL = r'https?://players\.brightcove\.net/(?P<account_id>\d+)/(?P<player_id>[^/]+)_(?P<embed>[^/]+)/index\.html\?.*videoId=(?P<video_id>(?:ref:)?\d+)'
_TESTS = [{ _TESTS = [{
'url': 'http://players.brightcove.net/929656772001/e41d32dc-ec74-459e-a845-6c69f7b724ea_default/index.html?videoId=4463358922001', 'url': 'http://players.brightcove.net/929656772001/e41d32dc-ec74-459e-a845-6c69f7b724ea_default/index.html?videoId=4463358922001',
'md5': 'c8100925723840d4b0d243f7025703be', 'md5': 'c8100925723840d4b0d243f7025703be',
@ -414,7 +414,7 @@ class BrightcoveNewIE(InfoExtractor):
# may be optional and what to do when it is # may be optional and what to do when it is
r'''(?sx) r'''(?sx)
<video[^>]+ <video[^>]+
data-video-id=["\'](\d+)["\'][^>]*>.*?
data-video-id=["\']((?:ref:)?\d+)["\'][^>]*>.*?
</video>.*? </video>.*?
<script[^>]+ <script[^>]+
src=["\'](?:https?:)?//players\.brightcove\.net/ src=["\'](?:https?:)?//players\.brightcove\.net/


Loading…
Cancel
Save