1 from .adobepass
import AdobePassIE
9 class SproutIE(AdobePassIE
):
10 _VALID_URL
= r
'https?://(?:www\.)?(?:sproutonline|universalkids)\.com/(?:watch|(?:[^/]+/)*videos)/(?P<id>[^/?#]+)'
12 'url': 'https://www.universalkids.com/shows/remy-and-boo/season/1/videos/robot-bike-race',
16 'title': 'Robot Bike Race',
17 'description': 'md5:436b1d97117cc437f54c383f4debc66d',
18 'timestamp': 1606148940,
19 'upload_date': '20201123',
20 'uploader': 'NBCU-MPAT',
23 'skip_download': True,
26 'url': 'http://www.sproutonline.com/watch/cowboy-adventure',
27 'only_matching': True,
29 'url': 'https://www.universalkids.com/watch/robot-bike-race',
30 'only_matching': True,
32 _GEO_COUNTRIES
= ['US']
34 def _real_extract(self
, url
):
35 display_id
= self
._match
_id
(url
)
36 mpx_metadata
= self
._download
_json
(
37 # http://nbcuunikidsprod.apps.nbcuni.com/networks/universalkids/content/videos/
38 'https://www.universalkids.com/_api/videos/' + display_id
,
39 display_id
)['mpxMetadata']
40 media_pid
= mpx_metadata
['mediaPid']
41 theplatform_url
= 'https://link.theplatform.com/s/HNK2IC/' + media_pid
46 if mpx_metadata
.get('entitlement') == 'auth':
47 query
['auth'] = self
._extract
_mvpd
_auth
(url
, media_pid
, 'sprout', 'sprout')
48 theplatform_url
= smuggle_url(
49 update_url_query(theplatform_url
, query
), {
50 'force_smil_url': True,
51 'geo_countries': self
._GEO
_COUNTRIES
,
54 '_type': 'url_transparent',
56 'url': theplatform_url
,
57 'series': mpx_metadata
.get('seriesName'),
58 'season_number': int_or_none(mpx_metadata
.get('seasonNumber')),
59 'episode_number': int_or_none(mpx_metadata
.get('episodeNumber')),
60 'ie_key': 'ThePlatform',