2014-09-29 20:58:42 +02:00
|
|
|
# coding: utf-8
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from .common import InfoExtractor
|
|
|
|
|
|
|
|
|
|
|
|
class KaraoketvIE(InfoExtractor):
|
2016-04-15 15:49:17 +02:00
|
|
|
'''
|
|
|
|
In api_play.php there's a video-cdn.com <iframe>. The latter plays an
|
|
|
|
unencrypted RTMP stream. However I can't download it with rtmpdump.
|
|
|
|
'''
|
|
|
|
_WORKING = False
|
|
|
|
|
|
|
|
_VALID_URL = r'http://www.karaoketv.co.il/[^/]+/(?P<id>\d+)'
|
2014-09-29 20:58:42 +02:00
|
|
|
_TEST = {
|
2016-04-15 15:49:17 +02:00
|
|
|
'url': 'http://www.karaoketv.co.il/%D7%A9%D7%99%D7%A8%D7%99_%D7%A7%D7%A8%D7%99%D7%95%D7%A7%D7%99/58356/%D7%90%D7%99%D7%96%D7%95%D7%9F',
|
2014-09-29 20:58:42 +02:00
|
|
|
'info_dict': {
|
2016-04-15 15:49:17 +02:00
|
|
|
'id': '58356',
|
|
|
|
'ext': 'flv',
|
|
|
|
'title': 'קריוקי של איזון',
|
2014-09-29 20:58:42 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
def _real_extract(self, url):
|
2015-01-10 18:03:36 +01:00
|
|
|
video_id = self._match_id(url)
|
2014-09-29 20:58:42 +02:00
|
|
|
webpage = self._download_webpage(url, video_id)
|
|
|
|
|
2016-04-15 15:49:17 +02:00
|
|
|
api_page_url = self._html_search_regex(
|
|
|
|
r'<iframe[^>]+src="(http://www.karaoke.co.il/api_play.php?[^"]+)"',
|
|
|
|
webpage, 'API play URL')
|
2014-09-29 20:58:42 +02:00
|
|
|
|
|
|
|
return {
|
2016-04-15 15:49:17 +02:00
|
|
|
'_type': 'url_transparent',
|
2014-09-29 20:58:42 +02:00
|
|
|
'id': video_id,
|
|
|
|
'title': self._og_search_title(webpage),
|
2016-04-15 15:49:17 +02:00
|
|
|
'url': api_page_url,
|
2015-01-10 18:03:36 +01:00
|
|
|
}
|