]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/morningstar.py
1 from .common
import InfoExtractor
4 class MorningstarIE(InfoExtractor
):
5 IE_DESC
= 'morningstar.com'
6 _VALID_URL
= r
'https?://(?:(?:www|news)\.)morningstar\.com/[cC]over/video[cC]enter\.aspx\?id=(?P<id>[0-9]+)'
8 'url': 'http://www.morningstar.com/cover/videocenter.aspx?id=615869',
9 'md5': '6c0acface7a787aadc8391e4bbf7b0f5',
13 'title': 'Get Ahead of the Curve on 2013 Taxes',
14 'description': "Vanguard's Joel Dickson on managing higher tax rates for high-income earners and fund capital-gain distributions in 2013.",
15 'thumbnail': r
're:^https?://.*m(?:orning)?star\.com/.+thumb\.jpg$'
18 'url': 'http://news.morningstar.com/cover/videocenter.aspx?id=825556',
19 'only_matching': True,
22 def _real_extract(self
, url
):
23 mobj
= self
._match
_valid
_url
(url
)
24 video_id
= mobj
.group('id')
26 webpage
= self
._download
_webpage
(url
, video_id
)
27 title
= self
._html
_search
_regex
(
28 r
'<h1 id="titleLink">(.*?)</h1>', webpage
, 'title')
29 video_url
= self
._html
_search
_regex
(
30 r
'<input type="hidden" id="hidVideoUrl" value="([^"]+)"',
32 thumbnail
= self
._html
_search
_regex
(
33 r
'<input type="hidden" id="hidSnapshot" value="([^"]+)"',
34 webpage
, 'thumbnail', fatal
=False)
35 description
= self
._html
_search
_regex
(
36 r
'<div id="mstarDeck".*?>(.*?)</div>',
37 webpage
, 'description', fatal
=False)
43 'thumbnail': thumbnail
,
44 'description': description
,