Browse Source

[stretchinternet] Add extractor

master-ytdl-org
Andrew Bottom 7 years ago
committed by Sergey M․
parent
commit
f4cc03d60b
No known key found for this signature in database GPG Key ID: 2C393E0F18A9236D
2 changed files with 29 additions and 0 deletions
  1. +1
    -0
      youtube_dl/extractor/extractors.py
  2. +28
    -0
      youtube_dl/extractor/stretchinternet.py

+ 1
- 0
youtube_dl/extractor/extractors.py View File

@ -1001,6 +1001,7 @@ from .streamango import StreamangoIE
from .streamcloud import StreamcloudIE from .streamcloud import StreamcloudIE
from .streamcz import StreamCZIE from .streamcz import StreamCZIE
from .streetvoice import StreetVoiceIE from .streetvoice import StreetVoiceIE
from .stretchinternet import StretchInternetIE
from .sunporno import SunPornoIE from .sunporno import SunPornoIE
from .svt import ( from .svt import (
SVTIE, SVTIE,


+ 28
- 0
youtube_dl/extractor/stretchinternet.py View File

@ -0,0 +1,28 @@
# coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class StretchInternetIE(InfoExtractor):
IE_DESC = 'StretchInternet'
_VALID_URL = r'https?://.*?stretchinternet\.com/[^/_?].*(?<=eventId=)(?P<id>.*)(?=&).*'
_TEST = {
'url': 'https://portal.stretchinternet.com/umary/portal.htm?eventId=313900&streamType=video',
'info_dict': {
'id': '313900',
'ext': 'mp4',
'title': 'StretchInternet'
}
}
def _real_extract(self, url):
video_id = self._match_id(url)
stream = self._download_json('https://neo-client.stretchinternet.com/streamservice/v1/media/stream/v%s' % video_id, video_id)
stream_url = stream.get('source')
return {
'ie_key': 'Generic',
'id': video_id,
'url': 'http://%s' % stream_url,
'title': 'StretchInternet'
}

Loading…
Cancel
Save