from ..compat import compat_chr
from ..utils import (
determine_ext,
+ ExtractorError,
int_or_none,
js_to_json,
)
class StreamangoIE(InfoExtractor):
- _VALID_URL = r'https?://(?:www\.)?streamango\.com/(?:f|embed)/(?P<id>[^/?#&]+)'
+ _VALID_URL = r'https?://(?:www\.)?(?:streamango\.com|fruithosts\.net)/(?:f|embed)/(?P<id>[^/?#&]+)'
_TESTS = [{
'url': 'https://streamango.com/f/clapasobsptpkdfe/20170315_150006_mp4',
'md5': 'e992787515a182f55e38fc97588d802a',
'params': {
'skip_download': True,
},
+ 'skip': 'gone',
}, {
'url': 'https://streamango.com/embed/clapasobsptpkdfe/20170315_150006_mp4',
'only_matching': True,
+ }, {
+ 'url': 'https://fruithosts.net/f/mreodparcdcmspsm/w1f1_r4lph_2018_brrs_720p_latino_mp4',
+ 'only_matching': True,
}]
def _real_extract(self, url):
'height': int_or_none(video.get('height')),
'tbr': int_or_none(video.get('bitrate')),
})
+
+ if not formats:
+ error = self._search_regex(
+ r'<p[^>]+\bclass=["\']lead[^>]+>(.+?)</p>', webpage,
+ 'error', default=None)
+ if not error and '>Sorry' in webpage:
+ error = 'Video %s is not available' % video_id
+ if error:
+ raise ExtractorError(error, expected=True)
+
self._sort_formats(formats)
return {