]>
jfr.im git - yt-dlp.git/blob - youtube_dlc/extractor/stretchinternet.py
1 from __future__
import unicode_literals
3 from .common
import InfoExtractor
4 from ..utils
import int_or_none
7 class StretchInternetIE(InfoExtractor
):
8 _VALID_URL
= r
'https?://portal\.stretchinternet\.com/[^/]+/(?:portal|full)\.htm\?.*?\beventId=(?P<id>\d+)'
10 'url': 'https://portal.stretchinternet.com/umary/portal.htm?eventId=573272&streamType=video',
14 'title': 'University of Mary Wrestling vs. Upper Iowa',
15 'timestamp': 1575668361,
16 'upload_date': '20191206',
20 def _real_extract(self
, url
):
21 video_id
= self
._match
_id
(url
)
23 event
= self
._download
_json
(
24 'https://api.stretchinternet.com/trinity/event/tcg/' + video_id
,
29 'title': event
['title'],
30 'timestamp': int_or_none(event
.get('dateCreated'), 1000),
31 'url': 'https://' + event
['media'][0]['url'],