mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-08-27 16:10:33 +02:00
[espn] Extract better titles
This commit is contained in:
parent
930087f2f6
commit
69f8595256
@ -1,6 +1,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
|
from ..utils import remove_end
|
||||||
|
|
||||||
|
|
||||||
class ESPNIE(InfoExtractor):
|
class ESPNIE(InfoExtractor):
|
||||||
@ -10,7 +11,7 @@ class ESPNIE(InfoExtractor):
|
|||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'FkYWtmazr6Ed8xmvILvKLWjd4QvYZpzG',
|
'id': 'FkYWtmazr6Ed8xmvILvKLWjd4QvYZpzG',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'dm_140128_30for30Shorts___JudgingJewellv2',
|
'title': '30 for 30 Shorts: Judging Jewell',
|
||||||
'description': None,
|
'description': None,
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
@ -23,7 +24,7 @@ class ESPNIE(InfoExtractor):
|
|||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '50NDFkeTqRHB0nXBOK-RGdSG5YQPuxHg',
|
'id': '50NDFkeTqRHB0nXBOK-RGdSG5YQPuxHg',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'int_151206_Must_See_Moments_Best_of_MLS_2015_season',
|
'title': 'Must-See Moments: Best of the MLS season',
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
# m3u8 download
|
# m3u8 download
|
||||||
@ -65,6 +66,13 @@ class ESPNIE(InfoExtractor):
|
|||||||
pcode = self._search_regex(
|
pcode = self._search_regex(
|
||||||
r'["\']pcode=([^"\']+)["\']', player, 'pcode')
|
r'["\']pcode=([^"\']+)["\']', player, 'pcode')
|
||||||
|
|
||||||
return self.url_result(
|
title = remove_end(
|
||||||
'ooyalaexternal:%s:%s:%s' % (cms, video_id, pcode),
|
self._og_search_title(webpage),
|
||||||
'OoyalaExternal')
|
'- ESPN Video').strip()
|
||||||
|
|
||||||
|
return {
|
||||||
|
'_type': 'url_transparent',
|
||||||
|
'url': 'ooyalaexternal:%s:%s:%s' % (cms, video_id, pcode),
|
||||||
|
'ie_key': 'OoyalaExternal',
|
||||||
|
'title': title,
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user