mirror of https://github.com/blackjack4494/yt-dlc
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.0 KiB
Python
33 lines
1.0 KiB
Python
7 years ago
|
from __future__ import unicode_literals
|
||
|
|
||
|
from .common import InfoExtractor
|
||
7 years ago
|
from ..utils import int_or_none
|
||
7 years ago
|
|
||
|
|
||
|
class StretchInternetIE(InfoExtractor):
|
||
5 years ago
|
_VALID_URL = r'https?://portal\.stretchinternet\.com/[^/]+/(?:portal|full)\.htm\?.*?\beventId=(?P<id>\d+)'
|
||
7 years ago
|
_TEST = {
|
||
5 years ago
|
'url': 'https://portal.stretchinternet.com/umary/portal.htm?eventId=573272&streamType=video',
|
||
7 years ago
|
'info_dict': {
|
||
5 years ago
|
'id': '573272',
|
||
7 years ago
|
'ext': 'mp4',
|
||
5 years ago
|
'title': 'University of Mary Wrestling vs. Upper Iowa',
|
||
|
'timestamp': 1575668361,
|
||
|
'upload_date': '20191206',
|
||
7 years ago
|
}
|
||
|
}
|
||
|
|
||
|
def _real_extract(self, url):
|
||
|
video_id = self._match_id(url)
|
||
7 years ago
|
|
||
|
event = self._download_json(
|
||
5 years ago
|
'https://api.stretchinternet.com/trinity/event/tcg/' + video_id,
|
||
|
video_id)[0]
|
||
7 years ago
|
|
||
7 years ago
|
return {
|
||
|
'id': video_id,
|
||
5 years ago
|
'title': event['title'],
|
||
|
'timestamp': int_or_none(event.get('dateCreated'), 1000),
|
||
|
'url': 'https://' + event['media'][0]['url'],
|
||
7 years ago
|
}
|