]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/stretchinternet.py
ae2ac1b42fe0021c8b904721221d441368bf50ca
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\.htm\?.*?\beventId=(?P<id>\d+)'
10 'url': 'https://portal.stretchinternet.com/umary/portal.htm?eventId=313900&streamType=video',
14 'title': 'Augustana (S.D.) Baseball vs University of Mary',
15 'description': 'md5:7578478614aae3bdd4a90f578f787438',
16 'timestamp': 1490468400,
17 'upload_date': '20170325',
21 def _real_extract(self
, url
):
22 video_id
= self
._match
_id
(url
)
24 stream
= self
._download
_json
(
25 'https://neo-client.stretchinternet.com/streamservice/v1/media/stream/v%s'
28 video_url
= 'https://%s' % stream
['source']
30 event
= self
._download
_json
(
31 'https://neo-client.stretchinternet.com/portal-ws/getEvent.json',
38 title
= event
.get('title') or event
['mobileTitle']
39 description
= event
.get('customText')
40 timestamp
= int_or_none(event
.get('longtime'))
45 'description': description
,
46 'timestamp': timestamp
,