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