def play(params,url,category): xbmc.output("[totlolchannel.py] play") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = urllib.unquote_plus( params.get("plot") ) server = urllib.unquote_plus( params.get("server") ) # Abre dialogo dialogWait = xbmcgui.DialogProgress() dialogWait.create( xbmc.getLocalizedString( 30702 ), title , plot ) # Busca el id del vídeo # La URL tiene el id de vídeo de youtube: http://www.totlol.com/watch/Bxu3jfqpItE/Pocoyo-Dance/0/ patron = 'http\:\/\/www.totlol.com\/watch\/([^\/]+)/' matches = re.compile(patron,re.DOTALL).findall(url) scrapertools.printMatches(matches) if len(matches)>0: video_id = matches[0] url = youtube.geturl(video_id) listitem = xbmcgui.ListItem( title, iconImage="DefaultVideo.png", thumbnailImage=thumbnail ) listitem.setInfo( "video", { "Title": title, "Plot": plot } ) # Cierra dialogo dialogWait.close() del dialogWait # Play video with the proper core xbmc.Player().play( url, listitem )
def play(params,url,category): xbmc.output("[kideoschannel.py] play") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) xbmc.output("[kideoschannel.py] play thumbnail="+thumbnail) plot = urllib.unquote_plus( params.get("plot") ) server = urllib.unquote_plus( params.get("server") ) # Abre dialogo dialogWait = xbmcgui.DialogProgress() dialogWait.create( xbmc.getLocalizedString( 30901 ), title , plot ) # Carga la página de detalle data = scrapertools.cachePage(url) addvideopage(data,params,url,category) # Busca el id del vídeo patron = '<param name\="flashVars" value\="videoId\=([^"]+)"' matches = re.compile(patron,re.DOTALL).findall(data) scrapertools.printMatches(matches) if len(matches)>0: video_id = matches[0] url = youtube.geturl(video_id) listitem = xbmcgui.ListItem( title, iconImage="DefaultVideo.png", thumbnailImage=thumbnail ) listitem.setInfo( "video", { "Title": title, "Plot": plot } ) # Cierra dialogo dialogWait.close() del dialogWait # Play video with the proper core xbmc.Player().play( url, listitem )
def findurl(code,server): mediaurl = "ERROR" server = server.lower() #Para hacer el procedimiento case insensitive if server == "megavideo": mediaurl = megavideo.Megavideo(code) if server == "megaupload": mediaurl = megaupload.getvideo(code) if server == "wuapi": mediaurl = wuapi.Wuapi(code) if server == "vreel": mediaurl = vreel.Vreel(code) if server == "stagevu": mediaurl = stagevu.Stagevu(code) if server == "tu.tv": mediaurl = tutv.Tutv(code) if server == "movshare": mediaurl = movshare.getvideo(code) if server == "veoh": mediaurl = veoh.getvideo(code) if server == "directo": mediaurl = code if server == "metadivx": mediaurl = metadivx.geturl(code) if server == "divxden": mediaurl = divxden.geturl(code) if server == "divxlink": mediaurl = divxlink.geturl(code) if server == "videoweed": mediaurl = videoweed.geturl(code) if server == "youtube": mediaurl = youtube.geturl(code) if server == "cinshare": mediaurl = cinshare.geturl(code) if server == "facebook": mediaurl = code if server == "xml": mediaurl = xmltoplaylist.geturl(code) return mediaurl
def youtubeplay(params,url,category): logger.info("[peliculas21.py] youtubeplay") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = "Ver Video" server = "Directo" id = youtube.Extract_id(url) videourl = youtube.geturl(id) if videourl == "":return logger.info("link directo de youtube : "+videourl) xbmctools.playvideo("Trailer",server,videourl,category,title,thumbnail,plot)
def findurl(code, server): mediaurl = "ERROR" server = server.lower() #Para hacer el procedimiento case insensitive if server == "megavideo": mediaurl = megavideo.Megavideo(code) if server == "megaupload": mediaurl = megaupload.getvideo(code) if server == "wuapi": mediaurl = wuapi.Wuapi(code) if server == "vreel": mediaurl = vreel.Vreel(code) if server == "stagevu": mediaurl = stagevu.Stagevu(code) if server == "tu.tv": mediaurl = tutv.Tutv(code) if server == "movshare": mediaurl = movshare.getvideo(code) if server == "veoh": mediaurl = veoh.getvideo(code) if server == "directo": mediaurl = code if server == "metadivx": mediaurl = metadivx.geturl(code) if server == "divxden": mediaurl = divxden.geturl(code) if server == "divxlink": mediaurl = divxlink.geturl(code) if server == "videoweed": mediaurl = videoweed.geturl(code) if server == "youtube": mediaurl = youtube.geturl(code) if server == "cinshare": mediaurl = cinshare.geturl(code) if server == "facebook": mediaurl = code return mediaurl
def youtubeplay(params,url,category): logger.info("[peliculas21.py] youtubeplay") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = "Ver Video" server = "Directo" id = youtube.Extract_id(url) videourl = youtube.geturl(id) if videourl == ("" or "Esc"):return logger.info("link directo de youtube : "+videourl) xbmctools.playvideo("Trailer",server,videourl,category,title,thumbnail,plot)
def youtubeplay(params,url,category): logger.info("[dospuntocerovision.py] youtubeplay") if "www.youtube" not in url: url = 'http://www.youtube.com'+url title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = "Ver Video" server = "Directo" id = youtube.Extract_id(url) videourl = youtube.geturl(id) if len(videourl)>0: logger.info("link directo de youtube : "+videourl) xbmctools.playvideo("Trailer",server,videourl,category,title,thumbnail,plot) return
def youtubeplay(params, url, category): logger.info("[peliculasonlineflv.py] youtubeplay") if "www.youtube" not in url: url = 'http://www.youtube.com' + url title = urllib.unquote_plus(params.get("title")) thumbnail = urllib.unquote_plus(params.get("thumbnail")) plot = "Ver Video" server = "Directo" id = youtube.Extract_id(url) videourl = youtube.geturl(id) if len(videourl) > 0: logger.info("link directo de youtube : " + videourl) xbmctools.playvideo("Trailer", server, videourl, category, title, thumbnail, plot) return
def youtubeplay(params,url,category): logger.info("[series21.py] youtubeplay") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = "Ver Video" server = "Directo" id = youtube.Extract_id(url) # Abre el diálogo de selección opciones = [] opciones.append("(FLV) Baja calidad") opciones.append("(MP4) Alta calidad") dia = xbmcgui.Dialog() seleccion = dia.select("tiene 2 formatos elige uno", opciones) logger.info("seleccion=%d" % seleccion) if seleccion==-1: return("") if seleccion == 0: videourl,videoinfo = youtube.GetYoutubeVideoInfo(id) else: videourl = youtube.geturl(id) logger.info("link directo de youtube : "+videourl) xbmctools.playvideo("Trailer",server,videourl,category,title,thumbnail,plot)
def youtubeplay(params, url, category): logger.info("[series21.py] youtubeplay") title = urllib.unquote_plus(params.get("title")) thumbnail = urllib.unquote_plus(params.get("thumbnail")) plot = "Ver Video" server = "Directo" id = youtube.Extract_id(url) # Abre el diálogo de selección opciones = [] opciones.append("(FLV) Baja calidad") opciones.append("(MP4) Alta calidad") dia = xbmcgui.Dialog() seleccion = dia.select("tiene 2 formatos elige uno", opciones) logger.info("seleccion=%d" % seleccion) if seleccion == -1: return ("") if seleccion == 0: videourl, videoinfo = youtube.GetYoutubeVideoInfo(id) else: videourl = youtube.geturl(id) logger.info("link directo de youtube : " + videourl) xbmctools.playvideo("Trailer", server, videourl, category, title, thumbnail, plot)
def play(params, url, category): xbmc.output("[kideoschannel.py] play") title = urllib.unquote_plus(params.get("title")) thumbnail = urllib.unquote_plus(params.get("thumbnail")) xbmc.output("[kideoschannel.py] play thumbnail=" + thumbnail) plot = urllib.unquote_plus(params.get("plot")) server = urllib.unquote_plus(params.get("server")) # Abre dialogo dialogWait = xbmcgui.DialogProgress() dialogWait.create(xbmc.getLocalizedString(30901), title, plot) # Carga la página de detalle data = scrapertools.cachePage(url) addvideopage(data, params, url, category) # Busca el id del vídeo patron = '<param name\="flashVars" value\="videoId\=([^"]+)"' matches = re.compile(patron, re.DOTALL).findall(data) scrapertools.printMatches(matches) if len(matches) > 0: video_id = matches[0] url = youtube.geturl(video_id) listitem = xbmcgui.ListItem(title, iconImage="DefaultVideo.png", thumbnailImage=thumbnail) listitem.setInfo("video", {"Title": title, "Plot": plot}) # Cierra dialogo dialogWait.close() del dialogWait # Play video with the proper core xbmc.Player().play(url, listitem)
def findurl(code,server): mediaurl = "ERROR" server = server.lower() #Para hacer el procedimiento case insensitive if server == "megavideo": import megavideo mediaurl = megavideo.Megavideo(code) if server == "megaupload": import megaupload mediaurl = megaupload.getvideo(code) if server == "vreel": import vreel mediaurl = vreel.Vreel(code) if server == "stagevu": import stagevu mediaurl = stagevu.Stagevu(code) if server == "tu.tv": import tutv mediaurl = tutv.Tutv(code) if server == "movshare": import movshare mediaurl = movshare.getvideo(code) if server == "veoh": import veoh mediaurl = veoh.getvideo(code) if server == "directo": mediaurl = code if server == "metadivx": import metadivx mediaurl = metadivx.geturl(code) if server == "divxden": import divxden mediaurl = divxden.geturl(code) if server == "divxlink": import divxlink mediaurl = divxlink.geturl(code) if server == "videoweed": import videoweed mediaurl = videoweed.geturl(code) if server == "youtube": import youtube mediaurl = youtube.geturl(code) if server == "zshare": import zshare mediaurl = zshare.geturl(code) if server == "4shared": import fourshared mediaurl = fourshared.geturl(code) if server == "cinshare": import cinshare mediaurl = cinshare.geturl(code) if server == "facebook": mediaurl = code if server == "xml": import xmltoplaylist mediaurl = xmltoplaylist.geturl(code) if server == "vimeo": import vimeo mediaurl = vimeo.geturl(code) return mediaurl
def getLiveChannels(self): live = [] # live.append({ # 'slug': 'bandnews', # 'name': 'Band News', # 'logo': 'https://upload.wikimedia.org/wikipedia/commons/thumb/2/27/BandNews_TV_logo_2010.svg/1200px-BandNews_TV_logo_2010.svg.png', # 'fanart': 'https://observatoriodatelevisao.bol.uol.com.br/wp-content/uploads/2015/03/BandNews.jpg', # 'thumb': 'https://upload.wikimedia.org/wikipedia/commons/thumb/2/27/BandNews_TV_logo_2010.svg/1200px-BandNews_TV_logo_2010.svg.png', # 'playable': 'true', # 'plot': None, # 'id': -1, # 'channel_id': -1, # 'duration': None, # 'streamUrl': 'https://evpp.mm.uol.com.br/geob_band/bandnewstv/playlist.m3u8' # }) if ADDON.getSetting('channels.globoplay') == 'true': live.append({ 'slug': 'futura', 'name': 'Futura', 'fanart': 'http://static.futuraplay.org/img/og-image.jpg', 'thumb': 'https://live-thumbs.video.globo.com/futura24ha/snapshot/', 'logo': 'https://oisa.tmsimg.com/assets/s20386_h3_aa.png', 'playable': 'true', 'id': 4500346, 'channel_id': 1985, 'live': True, 'livefeed': 'false', # use vod player 'brplayprovider': 'globoplay', 'anonymous': True }) live.append({ 'slug': 'sbt', 'name': 'SBT Rio', 'logo': 'https://www.sbt.com.br/assets/images/logo-sbt.png', 'fanart': 'https://i.ytimg.com/vi/Sut2YB6U5fk/maxresdefault.jpg', 'thumb': 'https://i.ytimg.com/vi/Sut2YB6U5fk/maxresdefault.jpg', 'playable': 'true', 'plot': None, 'id': -3, 'channel_id': -3, 'duration': None, # 'streamUrl': 'plugin://plugin.video.youtube/play/?channel_id=UCsRfBAspa72ExrsN347W2xg&live=1' 'streamUrl': youtube.geturl( 'https://www.youtube.com/channel/UCsRfBAspa72ExrsN347W2xg/live' ) }) live.append({ 'slug': 'record news', 'name': 'Record News', 'logo': 'https://oisa.tmsimg.com/assets/s38709_h3_aa.png', 'fanart': 'https://oisa.tmsimg.com/assets/s38709_h3_aa.png', 'thumb': 'https://oisa.tmsimg.com/assets/s38709_h3_aa.png', 'playable': 'true', 'plot': None, 'id': -7, 'channel_id': -7, 'duration': None, 'streamUrl': youtube.geturl( 'https://www.youtube.com/channel/UCuiLR4p6wQ3xLEm15pEn1Xw/live' ) }) if ADDON.getSetting('channels.youtube') == 'true': live.append({ 'slug': 'justica', 'name': u'TV JUSTIÇA', 'logo': 'https://oisa.tmsimg.com/assets/s76237_h3_aa.png', 'fanart': 'https://yt3.ggpht.com/a-/ACSszfHWaYyZbKI54Ws8EsUYOZVLcc_ID2R_LlykCw=s900-mo-c-c0xffffffff-rj-k-no', 'thumb': 'https://yt3.ggpht.com/a-/ACSszfHWaYyZbKI54Ws8EsUYOZVLcc_ID2R_LlykCw=s900-mo-c-c0xffffffff-rj-k-no', 'playable': 'true', 'plot': None, 'id': -4, 'channel_id': -4, 'duration': None, # 'streamUrl': 'plugin://plugin.video.youtube/?action=play_video&videoid=3-7mJteOsxY' 'streamUrl': youtube.geturl( 'https://www.youtube.com/channel/UC0qlZ5jxxueKNzUERcrllNw/live' ) }) live.append({ 'slug': 'senado', 'name': 'TV Senado', 'logo': 'https://oisa.tmsimg.com/assets/s38060_h3_aa.png', 'fanart': 'https://yt3.ggpht.com/a-/ACSszfF-djZe6A1gCCr3q_aUQosHwe3dyTTHVFrXcw=s900-mo-c-c0xffffffff-rj-k-no', 'thumb': 'https://yt3.ggpht.com/a-/ACSszfF-djZe6A1gCCr3q_aUQosHwe3dyTTHVFrXcw=s900-mo-c-c0xffffffff-rj-k-no', 'playable': 'true', 'plot': None, 'id': -5, 'channel_id': -5, 'duration': None, # 'streamUrl': 'plugin://plugin.video.youtube/?action=play_video&videoid=Duvz4PaR7Gw' 'streamUrl': youtube.geturl( 'https://www.youtube.com/user/TVSenadoOficial/live') }) live.append({ 'slug': 'shoptime', 'name': 'Shoptime', 'logo': 'https://oisa.tmsimg.com/assets/s16398_h3_aa.png', 'fanart': 'https://images-shoptime.b2w.io/zion/manifest/icons/5d7e972cec3c839ef0f8ab8cdd7cdb42.opengraph-image.png', 'thumb': 'https://images-shoptime.b2w.io/zion/manifest/icons/5d7e972cec3c839ef0f8ab8cdd7cdb42.opengraph-image.png', 'playable': 'true', 'plot': None, 'id': -6, 'channel_id': -6, 'duration': None, # 'streamUrl': 'plugin://plugin.video.youtube/?action=play_video&videoid=qJ1QpbHn2Bk' 'streamUrl': youtube.geturl( 'https://www.youtube.com/user/CanalShoptime/live') }) threads = [] if ADDON.getSetting('channels.globoplay') == 'true': threads.append(workers.Thread(self.getGloboplayLive, live)) if ADDON.getSetting('channels.globosatplay') == 'true': threads.append(workers.Thread(self.getGlobosatLiveChannels, live)) if ADDON.getSetting('channels.premium') == 'true': threads.append( workers.Thread(self.getGlobosatPremiumLiveChannels, live)) if ADDON.getSetting('channels.premierefc') == 'true': threads.append(workers.Thread(self.getPremiereFcLiveChannel, live)) if ADDON.getSetting('channels.oiplay') == 'true': threads.append(workers.Thread(self.getOiPlayLiveChannels, live)) [i.start() for i in threads] [i.join() for i in threads] return live