1 from .mtv
import MTVServicesInfoExtractor
2 from ..utils
import unified_strdate
5 class BetIE(MTVServicesInfoExtractor
):
7 _VALID_URL
= r
'https?://(?:www\.)?bet\.com/(?:[^/]+/)+(?P<id>.+?)\.html'
10 'url': 'http://www.bet.com/news/politics/2014/12/08/in-bet-exclusive-obama-talks-race-and-racism.html',
12 'id': '07e96bd3-8850-3051-b856-271b457f0ab8',
13 'display_id': 'in-bet-exclusive-obama-talks-race-and-racism',
15 'title': 'A Conversation With President Obama',
16 'description': 'President Obama urges persistence in confronting racism and bias.',
18 'upload_date': '20141208',
19 'thumbnail': r
're:(?i)^https?://.*\.jpg$',
26 'skip_download': True,
30 'url': 'http://www.bet.com/video/news/national/2014/justice-for-ferguson-a-community-reacts.html',
32 'id': '9f516bf1-7543-39c4-8076-dd441b459ba9',
33 'display_id': 'justice-for-ferguson-a-community-reacts',
35 'title': 'Justice for Ferguson: A Community Reacts',
36 'description': 'A BET News special.',
38 'upload_date': '20141125',
39 'thumbnail': r
're:(?i)^https?://.*\.jpg$',
46 'skip_download': True,
51 _FEED_URL
= 'http://feeds.mtvnservices.com/od/feed/bet-mrss-player'
53 def _get_feed_query(self
, uri
):
58 def _extract_mgid(self
, webpage
):
59 return self
._search
_regex
(r
'data-uri="([^"]+)', webpage
, 'mgid')
61 def _real_extract(self
, url
):
62 display_id
= self
._match
_id
(url
)
64 webpage
= self
._download
_webpage
(url
, display_id
)
65 mgid
= self
._extract
_mgid
(webpage
)
66 videos_info
= self
._get
_videos
_info
(mgid
)
68 info_dict
= videos_info
['entries'][0]
70 upload_date
= unified_strdate(self
._html
_search
_meta
('date', webpage
))
71 description
= self
._html
_search
_meta
('description', webpage
)
74 'display_id': display_id
,
75 'description': description
,
76 'upload_date': upload_date
,