1 from __future__
import unicode_literals
3 from .common
import InfoExtractor
6 class StretchInternetIE(InfoExtractor
):
7 _VALID_URL
= r
'https?://portal\.stretchinternet\.com/[^/]+/(?:portal|full)\.htm\?.*?\beventId=(?P<id>\d+)'
9 'url': 'https://portal.stretchinternet.com/umary/portal.htm?eventId=573272&streamType=video',
13 'title': 'UNIVERSITY OF MARY WRESTLING VS UPPER IOWA',
14 # 'timestamp': 1575668361,
15 # 'upload_date': '20191206',
16 'uploader_id': '99997',
20 def _real_extract(self
, url
):
21 video_id
= self
._match
_id
(url
)
23 media_url
= self
._download
_json
(
24 'https://core.stretchlive.com/trinity/event/tcg/' + video_id
,
25 video_id
)[0]['media'][0]['url']
26 event
= self
._download
_json
(
27 'https://neo-client.stretchinternet.com/portal-ws/getEvent.json',
28 video_id
, query
={'eventID': video_id, 'token': 'asdf'}
)['event']
32 'title': event
['title'],
33 # TODO: parse US timezone abbreviations
34 # 'timestamp': event.get('dateTimeString'),
35 'url': 'https://' + media_url
,
36 'uploader_id': event
.get('ownerID'),