def resolve_live(url,title): if 'm3u8' in url or 'rtmp' in url or 'flv' in url or 'mp4' in url: return url elif 'sipragezabava' in url or 'netraja' in url: return resolve_siprage(url) elif 'lshstream' in url: from lib.resolvers import lshunter return lshunter.resolve(url) elif 'abcast' in url: from lib.resolvers import abcast return abcast.resolve(url) elif 'filmon' in url: from lib.resolvers import filmon return filmon.resolve(url) elif 'hdcast' in url: from lib.resolvers import hdcast return hdcast.resolve(url) elif 'sawlive' in url: from lib.resolvers import sawlive return sawlive.resolve(url) elif 'vaughn' in url: from lib.resolvers import vaughnlive return vaughnlive.resolve(url) elif 'p2pcast' in url: from lib.resolvers import p2pcast return p2pcast.resolve(url) elif 'veetle' in url: from lib.resolvers import veetle return veetle.resolve(url) elif 'mybeststream' in url: from lib.resolvers import mybeststream return mybeststream.resolve(url) elif 'dailymotion' in url: from lib.resolvers import dailymotion return dailymotion.resolve(url) elif 'youtube' in url: from lib.resolvers import youtube return youtube.resolve(url) elif 'acestream://' in url or 'sop://' in url: from lib.resolvers import sop_ace return sop_ace.resolve(url,title) elif 'serbiaplus' in url: from lib.sources import serbiaplus return serbiaplus.resolve_serbiaplus(url,title) else: try: return resolve_siprage(url) except: return url return url
def resolve_live(url, title): if 'm3u8' in url or 'rtmp' in url or 'flv' in url or 'mp4' in url: return url elif 'sipragezabava' in url or 'netraja' in url: return resolve_siprage(url) elif 'lshstream' in url: from lib.resolvers import lshunter return lshunter.resolve(url) elif 'abcast' in url: from lib.resolvers import abcast return abcast.resolve(url) elif 'filmon' in url: from lib.resolvers import filmon return filmon.resolve(url) elif 'hdcast' in url: from lib.resolvers import hdcast return hdcast.resolve(url) elif 'sawlive' in url: from lib.resolvers import sawlive return sawlive.resolve(url) elif 'vaughn' in url: from lib.resolvers import vaughnlive return vaughnlive.resolve(url) elif 'p2pcast' in url: from lib.resolvers import p2pcast return p2pcast.resolve(url) elif 'veetle' in url: from lib.resolvers import veetle return veetle.resolve(url) elif 'mybeststream' in url: from lib.resolvers import mybeststream return mybeststream.resolve(url) elif 'dailymotion' in url: from lib.resolvers import dailymotion return dailymotion.resolve(url) elif 'youtube' in url: from lib.resolvers import youtube return youtube.resolve(url) elif 'acestream://' in url or 'sop://' in url: from lib.resolvers import sop_ace return sop_ace.resolve(url, title) elif 'serbiaplus' in url: from lib.sources import serbiaplus return serbiaplus.resolve_serbiaplus(url, title) else: try: return resolve_siprage(url) except: return url return url
def otvori_epizodu(url, title, thumb): #prvo pogledaj ako ima vise dijelova try: soup = get_soup(url) tag = soup.find('div', {'id': 'Playerholder'}) frames = tag.findAll('iframe') if len(frames) > 1: sources = [] for i in range(len(frames)): sources += ['%s. dio' % (i + 1)] dialog = xbmcgui.Dialog() index = dialog.select('Odaberite:', sources) li = xbmcgui.ListItem('%s' % title) li.setInfo('video', {'title': '%s' % title}) li.setThumbnailImage(thumb) if index > -1: link = frames[index] link = link['src'] try: from lib.resolvers import dailymotion resolved = dailymotion.resolve(link) resolved = resolved[0]['url'] except: import urlresolver resolved = urlresolver.resolve(link) xbmc.Player().play(resolved, li) return else: return except: pass try: soup = get_soup(url) link = soup.findAll('iframe')[1]['src'] except: try: html = read_url(url) soup = bs(html) link = soup.findAll('iframe')[1]['src'] except: try: soup = get_soup(url) try: link = soup.find('div', { 'id': 'Playerholder' }).find('embed')['src'] except: link = soup.find('div', { 'id': 'Playerholder' }).find('iframe')['src'] except: html = read_url(url).lower() ind = html.index('player.src') html = html[ind:ind + 80] reg = r'watch\?v=(.+?)"' link = re.findall(re.compile(reg), html)[0] link = 'http://www.youtube.com/watch?v=' + link if 'moevideo' in link or 'playreplay' in link: import YDStreamExtractor vid = YDStreamExtractor.getVideoInfo(link, quality=1) resolved = vid.streamURL() else: try: from lib.resolvers import dailymotion resolved = dailymotion.resolve(link) resolved = resolved[0]['url'] except: try: import urlresolver resolved = urlresolver.resolve(link) except: try: import YDStreamExtractor vid = YDStreamExtractor.getVideoInfo(link, quality=1) resolved = vid.streamURL() except: pass li = xbmcgui.ListItem('%s' % title) li.setInfo('video', {'title': '%s' % title}) li.setThumbnailImage(thumb) xbmc.Player().play(item=resolved, listitem=li)
def download_epizodu(title, url): try: soup = get_soup(url) tag = soup.find('div', {'id': 'Playerholder'}) frames = tag.findAll('iframe') if len(frames) > 1: sources = [] for i in range(len(frames)): sources += ['%s. dio' % (i + 1)] dialog = xbmcgui.Dialog() index = dialog.select('Odaberite:', sources) li = xbmcgui.ListItem('%s' % title) li.setInfo('video', {'title': '%s' % title}) if index > -1: link = frames[index] title = title + ' (%s od %s)' % (index + 1, len(frames)) link = link['src'] try: from lib.resolvers import dailymotion resolved = dailymotion.resolve(link) resolved = resolved[0]['url'] except: try: import urlresolver resolved = urlresolver.resolve(link) except: try: import YDStreamExtractor YDStreamExtractor.disableDASHVideo(True) vid = YDStreamExtractor.getVideoInfo(link, quality=1) resolved = vid.streamURL() except: pass download(title, resolved) return else: return except: pass try: soup = get_soup(url) link = soup.findAll('iframe')[1]['src'] except: try: soup = get_soup(url) link = soup.findAll('iframe')[1]['src'] except: try: soup = get_soup(url) try: link = soup.find('div', { 'id': 'Playerholder' }).find('embed')['src'] except: link = soup.find('div', { 'id': 'Playerholder' }).find('iframe')['src'] except: html = read_url(url).lower() ind = html.index('player.src') html = html[ind:ind + 80] reg = r'watch\?v=(.+?)"' link = re.findall(re.compile(reg), html)[0] link = 'http://www.youtube.com/watch?v=' + link if 'moevideo' in link or 'playreplay' in link: import YDStreamExtractor YDStreamExtractor.disableDASHVideo(True) vid = YDStreamExtractor.getVideoInfo(link, quality=1) resolved = vid.streamURL() else: try: from lib.resolvers import dailymotion resolved = dailymotion.resolve(link) resolved = resolved[0]['url'] except: try: import urlresolver resolved = urlresolver.resolve(link) except: try: import YDStreamExtractor YDStreamExtractor.disableDASHVideo(True) vid = YDStreamExtractor.getVideoInfo(link, quality=1) resolved = vid.streamURL() except: pass download(title, resolved)
def otvori_epizodu(url,title,thumb): #prvo pogledaj ako ima vise dijelova try: soup=get_soup(url) tag=soup.find('div',{'id':'Playerholder'}) frames=tag.findAll('iframe') if len(frames)>1: sources=[] for i in range(len(frames)): sources+=['%s. dio'%(i+1)] dialog = xbmcgui.Dialog() index = dialog.select('Odaberite:', sources) li = xbmcgui.ListItem('%s'%title) li.setInfo('video', { 'title': '%s'%title }) li.setThumbnailImage(thumb) if index>-1: link=frames[index] link=link['src'] try: from lib.resolvers import dailymotion resolved=dailymotion.resolve(link) resolved=resolved[0]['url'] except: import urlresolver resolved=urlresolver.resolve(link) xbmc.Player().play(resolved,li) return else: return except: pass try: soup=get_soup(url) link=soup.findAll('iframe')[1]['src'] except: try: html=read_url(url) soup=bs(html) link=soup.findAll('iframe')[1]['src'] except: try: soup=get_soup(url) try: link=soup.find('div',{'id':'Playerholder'}).find('embed')['src'] except: link=soup.find('div',{'id':'Playerholder'}).find('iframe')['src'] except: html=read_url(url).lower() ind=html.index('player.src') html=html[ind:ind+80] reg=r'watch\?v=(.+?)"' link=re.findall(re.compile(reg),html)[0] link='http://www.youtube.com/watch?v=' + link if 'moevideo' in link or 'playreplay' in link : import YDStreamExtractor vid = YDStreamExtractor.getVideoInfo(link,quality=1) resolved = vid.streamURL() else: try: from lib.resolvers import dailymotion resolved=dailymotion.resolve(link) resolved=resolved[0]['url'] except: try: import urlresolver resolved=urlresolver.resolve(link) except: try: import YDStreamExtractor vid = YDStreamExtractor.getVideoInfo(link,quality=1) resolved = vid.streamURL() except: pass li = xbmcgui.ListItem('%s'%title) li.setInfo('video', { 'title': '%s'%title }) li.setThumbnailImage(thumb) xbmc.Player().play(item=resolved, listitem=li)
def download_epizodu(title,url): try: soup=get_soup(url) tag=soup.find('div',{'id':'Playerholder'}) frames=tag.findAll('iframe') if len(frames)>1: sources=[] for i in range(len(frames)): sources+=['%s. dio'%(i+1)] dialog = xbmcgui.Dialog() index = dialog.select('Odaberite:', sources) li = xbmcgui.ListItem('%s'%title) li.setInfo('video', { 'title': '%s'%title }) if index>-1: link=frames[index] title=title+' (%s od %s)'%(index+1,len(frames)) link=link['src'] try: from lib.resolvers import dailymotion resolved=dailymotion.resolve(link) resolved=resolved[0]['url'] except: try: import urlresolver resolved=urlresolver.resolve(link) except: try: import YDStreamExtractor YDStreamExtractor.disableDASHVideo(True) vid = YDStreamExtractor.getVideoInfo(link,quality=1) resolved = vid.streamURL() except: pass download(title,resolved) return else: return except: pass try: soup=get_soup(url) link=soup.findAll('iframe')[1]['src'] except: try: soup=get_soup(url) link=soup.findAll('iframe')[1]['src'] except: try: soup=get_soup(url) try: link=soup.find('div',{'id':'Playerholder'}).find('embed')['src'] except: link=soup.find('div',{'id':'Playerholder'}).find('iframe')['src'] except: html=read_url(url).lower() ind=html.index('player.src') html=html[ind:ind+80] reg=r'watch\?v=(.+?)"' link=re.findall(re.compile(reg),html)[0] link='http://www.youtube.com/watch?v=' + link if 'moevideo' in link or 'playreplay' in link : import YDStreamExtractor YDStreamExtractor.disableDASHVideo(True) vid = YDStreamExtractor.getVideoInfo(link,quality=1) resolved = vid.streamURL() else: try: from lib.resolvers import dailymotion resolved=dailymotion.resolve(link) resolved=resolved[0]['url'] except: try: import urlresolver resolved=urlresolver.resolve(link) except: try: import YDStreamExtractor YDStreamExtractor.disableDASHVideo(True) vid = YDStreamExtractor.getVideoInfo(link,quality=1) resolved = vid.streamURL() except: pass download(title,resolved)