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