1 from .adobepass
import AdobePassIE
8 class SyfyIE(AdobePassIE
):
10 _VALID_URL
= r
'https?://(?:www\.)?syfy\.com/(?:[^/]+/)?videos/(?P<id>[^/?#]+)'
12 'url': 'http://www.syfy.com/theinternetruinedmylife/videos/the-internet-ruined-my-life-season-1-trailer',
16 'title': 'The Internet Ruined My Life: Season 1 Trailer',
17 'description': 'One tweet, one post, one click, can destroy everything.',
18 'uploader': 'NBCU-MPAT',
19 'upload_date': '20170113',
20 'timestamp': 1484345640,
24 'skip_download': True,
26 'add_ie': ['ThePlatform'],
27 'skip': 'Redirects to main page',
30 def _real_extract(self
, url
):
31 display_id
= self
._match
_id
(url
)
32 webpage
= self
._download
_webpage
(url
, display_id
)
33 syfy_mpx
= next(iter(self
._parse
_json
(self
._search
_regex
(
34 r
'jQuery\.extend\(Drupal\.settings\s*,\s*({.+?})\);', webpage
, 'drupal settings'),
35 display_id
)['syfy']['syfy_mpx'].values()))
36 video_id
= syfy_mpx
['mpxGUID']
37 title
= syfy_mpx
['episodeTitle']
42 if syfy_mpx
.get('entitlement') == 'auth':
43 resource
= self
._get
_mvpd
_resource
(
44 'syfy', title
, video_id
,
45 syfy_mpx
.get('mpxRating', 'TV-14'))
46 query
['auth'] = self
._extract
_mvpd
_auth
(
47 url
, video_id
, 'syfy', resource
)
50 '_type': 'url_transparent',
51 'ie_key': 'ThePlatform',
52 'url': smuggle_url(update_url_query(
53 self
._proto
_relative
_url
(syfy_mpx
['releaseURL']), query
),
54 {'force_smil_url': True}),
57 'display_id': display_id
,