1 from __future__ 
import unicode_literals
 
   3 from .mtv 
import MTVServicesInfoExtractor
 
   4 from ..utils 
import unified_strdate
 
   5 from ..compat 
import compat_urllib_parse_urlencode
 
   8 class BetIE(MTVServicesInfoExtractor
): 
   9     _VALID_URL 
= r
'https?://(?:www\.)?bet\.com/(?:[^/]+/)+(?P<id>.+?)\.html' 
  12             'url': 'http://www.bet.com/news/politics/2014/12/08/in-bet-exclusive-obama-talks-race-and-racism.html', 
  14                 'id': '07e96bd3-8850-3051-b856-271b457f0ab8', 
  15                 'display_id': 'in-bet-exclusive-obama-talks-race-and-racism', 
  17                 'title': 'A Conversation With President Obama', 
  18                 'description': 'President Obama urges persistence in confronting racism and bias.', 
  20                 'upload_date': '20141208', 
  21                 'thumbnail': 're:(?i)^https?://.*\.jpg$', 
  28                 'skip_download': True, 
  32             'url': 'http://www.bet.com/video/news/national/2014/justice-for-ferguson-a-community-reacts.html', 
  34                 'id': '9f516bf1-7543-39c4-8076-dd441b459ba9', 
  35                 'display_id': 'justice-for-ferguson-a-community-reacts', 
  37                 'title': 'Justice for Ferguson: A Community Reacts', 
  38                 'description': 'A BET News special.', 
  40                 'upload_date': '20141125', 
  41                 'thumbnail': 're:(?i)^https?://.*\.jpg$', 
  48                 'skip_download': True, 
  53     _FEED_URL 
= "http://feeds.mtvnservices.com/od/feed/bet-mrss-player" 
  55     def _get_feed_query(self
, uri
): 
  56         return compat_urllib_parse_urlencode({ 
  60     def _extract_mgid(self
, webpage
): 
  61         return self
._search
_regex
(r
'data-uri="([^"]+)', webpage
, 'mgid') 
  63     def _real_extract(self
, url
): 
  64         display_id 
= self
._match
_id
(url
) 
  66         webpage 
= self
._download
_webpage
(url
, display_id
) 
  67         mgid 
= self
._extract
_mgid
(webpage
) 
  68         videos_info 
= self
._get
_videos
_info
(mgid
) 
  70         info_dict 
= videos_info
['entries'][0] 
  72         upload_date 
= unified_strdate(self
._html
_search
_meta
('date', webpage
)) 
  73         description 
= self
._html
_search
_meta
('description', webpage
) 
  76             'display_id': display_id
, 
  77             'description': description
, 
  78             'upload_date': upload_date
,