Exemple #1
0
def peamenyy(params):
    plugintools.log(pnimi+vod_channels("TWFpbiBNZW51")+repr(params))
    load_channels()
    if not lehekylg:
        plugintools.open_settings_dialog()

    channels = kontroll()
    if channels == 1 and Overlord.mode != 5 and Overlord.mode != 1:
        plugintools.set_view( plugintools.LIST )
        plugintools.log(pnimi+vod_channels("TG9naW4gU3VjY2Vzcw=="))
        plugintools.add_item( action=vod_channels("ZXhlY3V0ZV9haW5mbw=="),   title="Your Account Information", thumbnail=os.path.join(LOAD_LIVE,vod_channels("bXlhY2MucG5n")) , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=True )
        plugintools.add_item( action=vod_channels("c2VjdXJpdHlfY2hlY2s="),  title="Overlord TV" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("bGl2ZXR2LnBuZw==")) , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=True )
        plugintools.add_item( action=vod_channels("ZGV0ZWN0X21vZGlmaWNhdGlvbg=="),   title=vod_channels("T24gRGVtYW5k") , thumbnail=os.path.join(LOAD_LIVE,vod_channels("dm9kLnBuZw==")), fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=")) , folder=True )
        plugintools.add_item( action=vod_channels("bGljZW5zZV9jaGVjaw=="), title="Your Settings" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("c2V0dGluZ3MuanBn")) , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=") ), folder=False )
        #Overlord.AddDir('Extras','Extras',5,Overlord.Images + 'extras.png')
    elif channels != 1 and Overlord.mode != 1:
        plugintools.add_item( action=vod_channels("bGljZW5zZV9jaGVjaw=="), title="Step 1. Enter Login details here" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("c2V0dGluZ3MuanBn")) , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=") ), folder=False )	
        plugintools.add_item( action=vod_channels("bGljZW5zZV9jaGVjazI="), title="Step 2. Click here" , thumbnail=os.path.join(LOAD_LIVE,vod_channels("c2V0dGluZ3MuanBn")) , fanart=os.path.join(LOAD_LIVE,vod_channels("YmFja2dyb3VuZC5wbmc=") ), folder=False )	
    if plugintools.get_setting("improve")=="true":
        tseaded = xbmc.translatePath(sync_data("c3BlY2lhbDovL3VzZXJkYXRhL2FkdmFuY2Vkc2V0dGluZ3MueG1s"))
        if not os.path.exists(tseaded):
            file = open( os.path.join(plugintools.get_runtime_path(),vod_channels("cmVzb3VyY2Vz"),sync_data("YWR2YW5jZWRzZXR0aW5ncy54bWw=")) )
            data = file.read()
            file.close()
            file = open(tseaded,"w")
            file.write(data)
            file.close()
            plugintools.message(pnimi, get_live("TmV3IGFkdmFuY2VkIHN0cmVhbWluZyBzZXR0aW5ncyBhZGRlZC4="))
def program_capis(params):
    plugintools.log("[PalcoTV-0.3.0].LaTuerka Videos"+repr(params))
    fanart = params.get("extra")

    data = plugintools.read(params.get("url"))
    #plugintools.log("data= "+data)

    #<a href="/publico-tv/program/59/video/216146/otra-vuelta-de-tuerka-jesus-cintora" class="play"><span>Reproducir</span></a>
    items_programa = plugintools.find_multiple_matches(data, '<div class="thumb">(.*?)</li>')

    for entry in items_programa:
        plugintools.log("items_programa= "+entry)
        url_programa = plugintools.find_single_match(entry, '<a href=\"(.*?)\"')
        img_programa = plugintools.find_single_match(entry, '<img src=\"(.*?)\"')
        title_programa = plugintools.find_single_match(entry, 'title="">(.*?)</a></p>')
        title_programa = title_programa.split('title="">')
        title_programa = title_programa[1]
        title_programa = title_programa.replace("&ntilde;", "ñ")
        #url_programa = plugintools.find_multiple_matches(entry, '<a href=(.*?)class=\"foto')
        url_programa = 'http://www.publico.es' + url_programa
        plugintools.log("url_programa= "+url_programa)
        url = tuerka_link(url_programa)
        plugintools.log("img_programa= "+img_programa)
        plugintools.log("title_programa= "+title_programa)
        plugintools.add_item(action="play", title = title_programa, url = url , thumbnail = img_programa, fanart = 'http://www.latuerka.net/img/bg.jpg' , folder = False , isPlayable = True)
def play_freetvcast(freetvcast_user):
    plugintools.log("[Movies-Online 0.0.1].freetvcast User= "******"rtmp") + " playpath=" + freetvcast_user.get("playpath") + " token=" + freetvcast_user.get("token") + " swfUrl=http://freetvcast.pw/player.swf pageUrl=" + freetvcast_user.get("pageurl") + " live=true timeout=15"
    url = url.strip()
    plugintools.play_resolved_url(url)       
    def onAction(self, action):
        plugintools.log("ChannelWindow.onAction action.id="+repr(action.getId())+" action.buttonCode="+repr(action.getButtonCode()))
        
        if action == ACTION_PARENT_DIR or action==ACTION_PREVIOUS_MENU or action==ACTION_PREVIOUS_MENU2:
            self.close()

        if action == ACTION_SELECT_ITEM or action == ACTION_MOUSE_LEFT_CLICK:

            loader_image = os.path.join( plugintools.get_runtime_path(), 'resources', 'skins', 'Default', 'media', 'loader.gif')
            loader = xbmcgui.ControlImage(1200, 19, 40, 40, loader_image)
            self.addControl(loader)

            pos = self.control_list.getSelectedPosition()
            item = self.itemlist[pos]
            if item.action.startswith("play_"):
                play_items = navigation.get_next_items( item )
                loader.setVisible(False)

                media_url = play_items[0].url
                plugintools.direct_play(media_url)
            else:
                next_items = navigation.get_next_items( item )
                loader.setVisible(False)

                # Si no hay nada, no muestra la pantalla vacía
                if len(next_items)>0:
                    next_window = navigation.get_window_for_item( item )
                    next_window.setItemlist(next_items)
                    next_window.setParentItem(item)

                    next_window.doModal()
                    del next_window
Exemple #5
0
def main_list(params):
    plugintools.log("MelodyEntInc.main_list "+repr(params))

    # On first page, pagination parameters are fixed
    if params.get("url") is None:
        params["url"] = "http://gdata.youtube.com/feeds/api/users/"+YOUTUBE_CHANNEL_ID+"/uploads?start-index=1&max-results=50"

    # Fetch video list from YouTube feed
    data = plugintools.read( params.get("url") )
    
    # Extract items from feed
    pattern = ""
    matches = plugintools.find_multiple_matches(data,"<entry>(.*?)</entry>")
    
    for entry in matches:
        plugintools.log("entry="+entry)
        
        # Not the better way to parse XML, but clean and easy
        title = plugintools.find_single_match(entry,"<titl[^>]+>([^<]+)</title>")
        plot = plugintools.find_single_match(entry,"<media\:descriptio[^>]+>([^<]+)</media\:description>")
        thumbnail = plugintools.find_single_match(entry,"<media\:thumbnail url='([^']+)'")
        video_id = plugintools.find_single_match(entry,"http\://www.youtube.com/watch\?v\=([0-9A-Za-z_-]{11})")
        url = "plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid="+video_id

        # Appends a new item to the xbmc item list
        plugintools.add_item( action="play" , title=title , plot=plot , url=url ,thumbnail=thumbnail , isPlayable=True, folder=False )
    
    # Calculates next page URL from actual URL
    start_index = int( plugintools.find_single_match( params.get("url") ,"start-index=(\d+)") )
    max_results = int( plugintools.find_single_match( params.get("url") ,"max-results=(\d+)") )
    next_page_url = "http://gdata.youtube.com/feeds/api/users/"+YOUTUBE_CHANNEL_ID+"/uploads?start-index=%d&max-results=%d" % ( start_index+max_results , max_results)

    plugintools.add_item( action="main_list" , title=">> Next page" , url=next_page_url , folder=True )
Exemple #6
0
def show_image(url):
    plugintools.log('[%s %s].show_image %s' % (addonName, addonVersion, url))

    plugintools.log("Iniciando descarga desde..."+url)
    h=urllib2.HTTPHandler(debuglevel=0)  # Iniciamos descarga...
    request = urllib2.Request(url)
    opener = urllib2.build_opener(h)
    urllib2.install_opener(opener)
    filename = url.split("/")
    max_len = len(filename)
    max_len = int(max_len) - 1
    filename = filename[max_len]
    fh = open(__temp__ + filename, "wb")  #open the file for writing
    connected = opener.open(request)
    meta = connected.info()
    filesize = meta.getheaders("Content-Length")[0]
    size_local = fh.tell()
    print 'filesize',filesize
    print 'size_local',size_local
    while int(size_local) < int(filesize):
        blocksize = 100*1024
        bloqueleido = connected.read(blocksize)
        fh.write(bloqueleido)  # read from request while writing to file
        size_local = fh.tell()
        print 'size_local',size_local
    imagen = __temp__ + filename
    xbmc.executebuiltin( "ShowPicture("+imagen+")" )
def gethttp_headers(pageurl):      
    request_headers=[]
    request_headers.append(["User-Agent","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31"])
    request_headers.append(["Referer", pageurl])
    body,response_headers = plugintools.read_body_and_headers(pageurl, headers=request_headers)      
    plugintools.log("body= "+body)
    return body
def ninestreams(params):
    plugintools.log("[PalcoTV-0.3.0].ninestreams "+repr(params))
    url_user = {}
    
    # Construimos diccionario...
    url = params.get("url")
    url_extracted = url.split(" ")
    for entry in url_extracted:
        if entry.startswith("rtmp"):
            entry = entry.replace("rtmp=", "")         
            url_user["rtmp"]=entry
        elif entry.startswith("playpath"):
            entry = entry.replace("playpath=", "")
            url_user["playpath"]=entry            
        elif entry.startswith("swfUrl"):
            entry = entry.replace("swfUrl=", "")
            url_user["swfurl"]=entry
        elif entry.startswith("pageUrl"):
            entry = entry.replace("pageUrl=", "")
            url_user["pageurl"]=entry          
        elif entry.startswith("token"):
            entry = entry.replace("token=", "")
            url_user["token"]=entry
        elif entry.startswith("referer"):
            entry = entry.replace("referer=", "")
            url_user["referer"]=entry

    plugintools.log("URL_user dict= "+repr(url_user)) 
    pageurl = url_user.get("pageurl")
    
    # Controlamos ambos casos de URL: Único link (pageUrl) o link completo rtmp://...
    if pageurl is None:
        pageurl = url_user.get("url")
        
    referer= url_user.get("referer")
    if referer is None:
        referer = 'http://verdirectotv.com/tv/documentales/history.html'
    channel_id = re.compile('channel=([^&]*)').findall(pageurl)
    print channel_id
    channel_id = channel_id[0]
    # http://www.9stream.com/embedplayer.php?width=650&height=400&channel=143&autoplay=true

    if pageurl.find("embedplayer.php") >= 0:
        pageurl = 'http://www.9stream.com/embedplayer.php?width=650&height=400&channel=' + channel_id + '&autoplay=true'
        url_user["pageurl"]=pageurl
        print 'pageurl',pageurl
        print 'referer',referer
        body = gethttp_headers(pageurl, referer)
        getparams_ninestream(url_user, body)
        url = 'rtmp://' + url_user.get("ip") + ':1935/verdirectotvedge/_definst_/ app=verdirectotvedge/_definst_/?xs=' + url_user.get("ninetok") + ' playpath=' + url_user.get("playpath") + ' token=' + url_user.get("token") + ' flashver=WIN%2011,9,900,117 swfUrl=http://www.9stream.com/player/player_orig_XXXXX.swf pageUrl=' + url_user.get("pageurl") + ' live=1 swfVfy=1 timeout=10'
        plugintools.play_resolved_url(url)        
    else:
        pageurl = 'http://www.9stream.com/embedplayer_2.php?width=650&height=400&channel=' + channel_id + '&autoplay=true'
        url_user["pageurl"]=pageurl
        print 'pageurl',pageurl
        print 'referer',referer
        body = gethttp_headers(pageurl, referer)
        getparams_ninestream(url_user, body)
        url = 'rtmp://' + url_user.get("ip") + ':1935/verdirectotvedge/_definst_/ app=verdirectotvedge/_definst_/?xs=' + url_user.get("ninetok") + ' playpath=' + url_user.get("playpath") + ' token=' + url_user.get("token") + ' flashver=WIN%2011,9,900,117 swfUrl=http://www.9stream.com/player/player_orig_XXXXX.swf pageUrl=' + url_user.get("pageurl") + ' live=1 swfVfy=1 timeout=10'
        plugintools.play_resolved_url(url)        
Exemple #9
0
def gethttp_noref(url):
    plugintools.log("[PalcoTV-0.3.0.gethttp_noref] "+url)    

    request_headers=[]
    request_headers.append(["User-Agent","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31"])
    body,response_headers = plugintools.read_body_and_headers(url, headers=request_headers)
    return body
Exemple #10
0
def mostrar_agenda(params):
  plugintools.log("arenavisionezy.mostrar_agenda "+repr(params))

  # Parse json
  jsonUrl = parserJsonUrl + '?cat=all'
  plugintools.log("arenavisionezy.mostrar_agenda Parsing: " + jsonUrl)
  jsonSrc     = urllib2.urlopen(jsonUrl)
  datos       = json.load(jsonSrc)
  eventos     = datos['eventos']
  last_update = datos['last_update']

  # Titulo de la categoria
  titulo01 = "                [COLOR skyblue]Agenda completa[/COLOR] (actualizado: "+last_update+")"
  plugintools.add_item( title = titulo01 , thumbnail = generar_miniatura('default'), action='', url='', isPlayable = False, folder = False )

  # Para cada evento
  for evento in eventos:
    title     = "[COLOR skyblue]" + evento['fecha'] + " " + evento['hora'] + "[/COLOR] " + evento['titulo']
    plot      = ""
    thumbnail = generar_miniatura(evento['categoria'])
    url       = "plugin://plugin.video.arenavisionezy/?action=listado_canales&evento="+evento['id']
    plugintools.add_item(
      action="listado_canales" ,
      title=title ,
      plot=plot ,
      url=url ,
      thumbnail=thumbnail ,
      isPlayable=True,
      folder=True
    )
def playedto(params):
    plugintools.log("[Movies-Online 0.0.1].playedto " + repr(params))

    url = params.get("url")
    url = url.split("/")
    url_fixed = "http://played.to/embed-" + url[3] +  "-640x360.html"
    plugintools.log("url_fixed= "+url_fixed)

    request_headers=[]
    request_headers.append(["User-Agent","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31"])
    body,response_headers = plugintools.read_body_and_headers(url_fixed, headers=request_headers)
    plugintools.log("data= "+body)

    r = re.findall('file(.+?)\n', body)
    
    for entry in r:
        
        entry = entry.replace('",', "")
        entry = entry.replace('"', "")
        entry = entry.replace(': ', "")
        entry = entry.strip()
        plugintools.log("vamos= "+entry)
        
        if entry.endswith("flv"):
            plugintools.play_resolved_url(entry)
            xbmc.executebuiltin("Notification(%s,%s,%i,%s)" % ('Movies-Online', "Resolviendo enlace...", 3 , art+'icon.png'))            
            params["url"]=entry
            plugintools.log("URL= "+entry)
Exemple #12
0
def tvshow_seasons(params):
    plugintools.log("movie4k.tvshow_seasons "+repr(params))

    #plugintools.set_view(plugintools.LIST)

    body,response_headers = read_body_and_headers(params.get("url"))

    '''
    <TR>
    <TD id="tdmovies" width="538"><a href="tvshows-episode-1-Arrow.html">Arrow          , Season: 1                     </a></TD>
    <TD id="tdmovies"><img border=0 src="http://img.movie4k.to/img/us_ger_small.png" width=24 height=14></TD>
    </TR>
    '''
    pattern  = '<TR[^<]+'
    pattern += '<TD id="tdmovies" width="\d+"><a href="([^"]+)">([^<]+)</a></TD[^<]+'
    pattern += '<TD id="tdmovies"><img border=0 src="([^\"]+)"'
    matches = plugintools.find_multiple_matches(body,pattern)

    for scrapedurl, scrapedtitle, flag in matches:
        
        url = urlparse.urljoin(params.get("url"),scrapedurl)
        title = scrapedtitle.strip()
        title=title + get_language_from_flag_img(flag)
        thumbnail = ""
        plot = ""
        plugintools.log("movie4k.tvshow_seasons title="+title+", url="+url+", thumbnail="+thumbnail)

        plugintools.add_item( action="tvshow_episodes", title=title, url=url, thumbnail=thumbnail , plot=plot, fanart=thumbnail , folder=True )
Exemple #13
0
def search(params):
    plugintools.log("movie4k.search "+repr(params))
    text = plugintools.keyboard_input(title="Input search terms")

    url = MAIN_URL+"movies.php?list=search"
    post = "search="+text.replace(" ","+")

    body,response_headers = read_body_and_headers(url, post=post)
    pattern  = '<TR id="coverPreview[^<]+'
    pattern += '<TD width="550" id="tdmovies"[^<]+'
    pattern += '<a href="([^"]+)">([^<]+)</a>'
    matches = plugintools.find_multiple_matches(body,pattern)

    for scrapedurl, scrapedtitle in matches:
        
        url = urlparse.urljoin(url,scrapedurl)
        title = scrapedtitle.strip()
        thumbnail = ""
        plot = ""
        plugintools.log("movie4k.search title="+title+", url="+url+", thumbnail="+thumbnail)

        if "watch-tvshow" in url:
            url = MAIN_URL+"tvshows-season-"+plugintools.find_single_match(url,MAIN_URL+"([A-Za-z0-9\-]+)-watch-tvshow-\d+.html")+".html"
            plugintools.add_item( action="tvshow_seasons", title=title, url=url, thumbnail=thumbnail , plot=plot, fanart=thumbnail , folder=True )
        else:
            plugintools.add_item( action="single_movie", title=title, url=url, thumbnail=thumbnail , plot=plot, fanart=thumbnail , folder=True )
Exemple #14
0
def tvshows_featured(params):
    plugintools.log("movie4k.tvshows_featured "+repr(params))

    #plugintools.set_view(plugintools.MOVIES)

    body,response_headers = read_body_and_headers(params.get("url"))
    pattern  = '<div style="float.left"[^<]+'
    pattern += '<a href="([^"]+)"><img src="([^"]+)".*?'
    pattern += '<h2[^<]+<a[^<]+<font[^>]+>([^<]+)</a[^<]+<img src="([^"]+)".*?'
    matches = plugintools.find_multiple_matches(body,pattern)

    for scrapedurl, scrapedthumbnail, scrapedtitle, flag in matches:
        
        url = urlparse.urljoin(params.get("url"),scrapedurl)
        url = MAIN_URL+"tvshows-season-"+plugintools.find_single_match(url,MAIN_URL+"([A-Za-z0-9\-]+)-watch-tvshow-\d+.html")+".html"

        title = scrapedtitle
        if title.strip().endswith(":"):
            title = title.strip()[:-1]
        title=title + get_language_from_flag_img(flag)
        thumbnail = urlparse.urljoin(params.get("url"),scrapedthumbnail)
        plot = ""
        plugintools.log("movie4k.tvshows_featured title="+title+", url="+url+", thumbnail="+thumbnail)

        plugintools.add_item( action="tvshow_seasons", title=title, url=url, thumbnail=thumbnail , plot=plot, fanart=thumbnail , folder=True )
Exemple #15
0
def tvshows_all(params):
    plugintools.log("movie4k.tvshows_all "+repr(params))

    #plugintools.set_view(plugintools.THUMBNAIL)

    '''
    <TR>
    <TD id="tdmovies" width="538"><a href="tvshows-season-Jane-by-Design.html">Jane By Design                                   </a></TD>
    <TD id="tdmovies"><img border=0 src="http://img.movie4k.to/img/us_flag_small.png" width=24 height=14></TD>
    </TR>
    '''

    body,response_headers = read_body_and_headers(params.get("url"))
    pattern  = '<TR[^<]+'
    pattern += '<TD id="tdmovies" width="538"[^<]+'
    pattern += '<a href="([^"]+)">([^<]+)</a.*?<img border=0 src="([^\"]+)"'
    matches = plugintools.find_multiple_matches(body,pattern)

    for scrapedurl, scrapedtitle, flag in matches:
        
        url = urlparse.urljoin(params.get("url"),scrapedurl)
        title = scrapedtitle.strip()
        if title.strip().endswith(":"):
            title = title.strip()[:-1]
        title=title + get_language_from_flag_img(flag)
        thumbnail = ""
        plot = ""
        plugintools.log("movie4k.tvshows_all title="+title+", url="+url+", thumbnail="+thumbnail)

        plugintools.add_item( action="tvshow_seasons", title=title, url=url, thumbnail=thumbnail , plot=plot, fanart=thumbnail , folder=True )

    next_page_url = plugintools.find_single_match(body,'<div id="boxwhite">\d+ </div><div id="boxgrey"><a href="([^"]+)">\d+')
    next_page_number = plugintools.find_single_match(body,'<div id="boxwhite">\d+ </div><div id="boxgrey"><a href="[^"]+">(\d+)')
    if next_page_url!="":
        plugintools.add_item( action="tvshows_all", title=">> Go to page "+next_page_number, url=urlparse.urljoin(params.get("url"),next_page_url), folder=True )
Exemple #16
0
def movies_all(params):
    plugintools.log("movie4k.movies_all "+repr(params))

    #plugintools.set_view(plugintools.THUMBNAIL)

    body,response_headers = read_body_and_headers(params.get("url"))
    pattern  = '<TR id="(coverPreview\d+)[^<]+'
    pattern += '<TD width="550" id="tdmovies"[^<]+'
    pattern += '<a href="([^"]+)">([^<]+)</a[^<]+.*?<TD align="right" id="tdmovies"[^<]+<img border=0 src="([^\"]+)"'
    matches = plugintools.find_multiple_matches(body,pattern)

    for cover_id, scrapedurl, scrapedtitle, flag in matches:
        
        url = urlparse.urljoin(params.get("url"),scrapedurl)
        title = scrapedtitle.strip()
        if title.strip().endswith(":"):
            title = title.strip()[:-1]
        title=title + get_language_from_flag_img(flag)
        thumbnail = plugintools.find_single_match(body,"\$\(\"\#"+cover_id+"\"\).hover\(function\(e\)[^<]+<p id='coverPreview'><img src='([^']+)'")
        plot = ""
        plugintools.log("movie4k.movies_all title="+title+", url="+url+", thumbnail="+thumbnail)

        plugintools.add_item( action="single_movie", title=title, url=url, thumbnail=thumbnail , plot=plot, fanart=thumbnail , folder=True )

    next_page_url = plugintools.find_single_match(body,'<div id="boxwhite">\d+ </div><div id="boxgrey"><a href="([^"]+)">\d+')
    next_page_number = plugintools.find_single_match(body,'<div id="boxwhite">\d+ </div><div id="boxgrey"><a href="[^"]+">(\d+)')
    if next_page_url!="":
        plugintools.add_item( action="movies_all", title=">> Go to page "+next_page_number, url=urlparse.urljoin(params.get("url"),next_page_url), folder=True )
Exemple #17
0
def genres(params):
    plugintools.log("movie4k.genres "+repr(params))

    #plugintools.set_view(plugintools.LIST)

    body,response_headers = read_body_and_headers(params.get("url"))

    '''
    <TR>
    <TD id="tdmovies" width="155"><a href="movies-genre-59-Reality-TV.html">Reality-TV</a></TD>
    <TD id="tdmovies" width="50">30</TD>
    </TR>
    '''
    pattern  = '<TR[^<]+'
    pattern += '<TD id="tdmovies" width="\d+"><a href="('+params.get("extra")+'-[^"]+)">([^<]+)</a></TD[^<]+'
    pattern += '<TD id="tdmovies" width="\d+">(\d+)</TD[^<]+'
    pattern += '</TR>'
    matches = plugintools.find_multiple_matches(body,pattern)

    for scrapedurl, scrapedtitle, counter in matches:
        
        url = urlparse.urljoin(params.get("url"),scrapedurl)
        title = scrapedtitle.strip()+" ("+counter+" movies)"
        thumbnail = ""
        plot = ""
        plugintools.log("movie4k.genres title="+title+", url="+url+", thumbnail="+thumbnail)

        if params.get("extra") == "tvshows-genre":
            plugintools.add_item( action="tvshows_all", title=title, url=url, thumbnail=thumbnail , plot=plot, fanart=thumbnail , folder=True )
        else:
            plugintools.add_item( action="movies_all", title=title, url=url, thumbnail=thumbnail , plot=plot, fanart=thumbnail , folder=True )
Exemple #18
0
def videos_get_media_url(id):
    plugintools.log("tvalacarta.api.get_media_url")

    service_url = MAIN_URL+"/videos/get_media_url.php"
    service_parameters = {"id":id,"s":get_session_token(),"api_key":API_KEY}

    return get_response(service_url,service_parameters)
Exemple #19
0
def ioncube1(bodi):
 plugintools.log("bodi= "+bodi)
 p = re.compile(ur'<script language=javascript>(c=".*?)<\/script>')
 result=re.findall(p, bodi)
 p = re.compile(ur'eval\(unescape\(\'?"?"(.*?)\'?"?\)\)')
 result=re.findall(p, str(result))
 import urllib
 result = urllib.unquote_plus(str(result))
 p = re.compile(ur'c="([^"]+)')
 valc=re.findall(p, bodi);valc=valc[0];
 
 p = re.compile(ur'x\("([^"]+)')
 valx=re.findall(p, bodi);valx=valx[0];
 d="";int1 = 0;
 while int1 < len(valc):
  if int1%3==0:
   d+="%";
  else:
   d+=valc[int1];
  int1 += 1
 valc=urllib.unquote_plus(d)
 valt=re.compile('t=Array\(([0-9,]+)\)').findall(valc)[0];
 
 valz=valez(valx,valt);
 p=re.compile(ur'(getJSON\(|streamer|file|flash\'?"?,?\s?src)\'?"?\s?:?\s?\'?"?([^\'"]+)');vals=re.findall(p,valz);
 if len(vals)>=3:
  return vals
 else:
  print "!!! NO PARAMS !!!\n"+str(vals)+"\n"+valc
  return
Exemple #20
0
def add_to_favorites(id):
    plugintools.log("tvalacarta.api.add_to_favorites")

    service_url = MAIN_URL+"/favorites/add.php"
    service_parameters = {"id_program":id,"s":get_session_token(),"api_key":API_KEY}

    get_itemlist(service_url,service_parameters)
Exemple #21
0
def remove_from_hidden(id):
    plugintools.log("tvalacarta.api.remove_from_hidden")

    service_url = MAIN_URL+"/programs/remove_from_hidden.php"
    service_parameters = {"id":id,"s":get_session_token(),"api_key":API_KEY}

    get_itemlist(service_url,service_parameters)
Exemple #22
0
def navigation_get_programs_menu(item,viewmode="",channel=""):
    plugintools.log("tvalacarta.api.navigation_get_programs_menu")

    service_url = MAIN_URL+"/navigation/get_programs_menu.php"
    service_parameters = {"s":get_session_token(),"api_key":API_KEY}

    return get_itemlist(service_url,service_parameters,viewmode=viewmode,channel=channel)
    def onInit( self ):
        plugintools.log("MenuWindow.onInit")

        if self.first_time == True:
            return
        
        self.first_time = True
                   
        self.control_list = self.getControl(100)

        if self.itemlist is None:
            next_items = navigation.get_next_items( self.parent_item )
            self.setItemlist(next_items)

        if len(self.itemlist)>0:
            item = self.itemlist[0]
            self.setContentDetailsFields(item)

        for item in self.itemlist:

            list_item = xbmcgui.ListItem( item.title , iconImage=item.thumbnail, thumbnailImage=item.thumbnail)

            info_labels = { "Title" : item.title, "FileName" : item.title, "Plot" : item.plot }
            list_item.setInfo( "video", info_labels )

            if item.fanart!="":
                list_item.setProperty('fanart_image',item.fanart)

            self.control_list.addItem(list_item)

        self.getControl(300).setLabel(self.parent_item.channel)
        self.setFocusId(100)

        self.loader = self.getControl(400)
        self.loader.setVisible(False)
Exemple #24
0
def tvshow_episodes(params):
    plugintools.log("movie4k.tvshow_episodes "+repr(params))

    #plugintools.set_view(plugintools.LIST)
    body,response_headers = read_body_and_headers_cached(params.get("url"))

    pattern  = '<TR[^<]+'
    pattern += '<TD id="tdmovies" width="\d+"[^<]+'
    pattern += '<a href="([^"]+)">([^<]+)</a></TD[^<]+'
    pattern += '<TD id="tdmovies" width="\d+"[^<]+'
    pattern += '<img[^>]+>([^<]+)</TD[^<]+'
    pattern += '.*?<img border=0 src="([^"]+)"'
    matches = plugintools.find_multiple_matches(body,pattern)

    for scrapedurl, scrapedtitle, mirrorname, flag in matches:
        url = urljoin(params.get("url"),scrapedurl)
        title = html_unescape(scrapedtitle).strip()
        if title.strip().endswith(":"):
            title = title.strip()[:-1]
        title = title + " ("+mirrorname.strip().replace("watch on ","")+")"
        title = title + "  (" + get_language_from_flag_img(flag) + ")"
        plugintools.log("movie4k.tvshow_episodes title="+title+", url="+url)

        for hoster in HOSTERS_BLACKLIST:
            #plugintools.log("<<<<<"+hoster+">>>>> IN <<<<<<"+title.lower()+">>>>>>")
            if hoster in title.lower():
                break;
        else:
            plugintools.add_item( action="play", title=title, url=url, fanart=FANART, folder=True )
Exemple #25
0
def search(params):
    plugintools.log("movie4k.search "+repr(params))
    text = plugintools.keyboard_input(title="Input search terms")

    url = MAIN_URL+"movies.php?list=search"
    post = "search="+text.replace(" ","+")

    body,response_headers = read_body_and_headers_cached(url, post=post)
    pattern  = '<TR id="coverPreview\d+">(.*?)</TR>'
    matches = plugintools.find_multiple_matches(body,pattern)
    for match in matches:
        pattern = '<a href="([^"]+)">([^<]+).*?<img border=0 src="([^"]+)'
        scrapedurl, scrapedtitle, flag = plugintools.find_single_match(match, pattern)
        pattern = '/img/smileys/(\d).gif'
        quality = plugintools.find_single_match(match, pattern)
        pattern = '<STRONG>(\d+\.*\d*)'
        rating = plugintools.find_single_match(match, pattern)

        url = urljoin(url,scrapedurl)
        title = html_unescape(scrapedtitle)
        title = re.sub('\s+', ' ', title).strip() + "  (" + get_language_from_flag_img(flag) + "  IMDB:" + rating + "  Quality:" + quality + ")"
        plugintools.log("movie4k.search title=" + title + ", url=" + url)

        if "watch-tvshow" in url:
            url = MAIN_URL+"tvshows-season-"+plugintools.find_single_match(url,MAIN_URL+"([A-Za-z0-9\-]+)-watch-tvshow-\d+.html")+".html"
            plugintools.add_item( action="tvshow_seasons", title=title, url=url, fanart=FANART , folder=True )
        else:
            plugintools.add_item( action="single_movie", title=title, url=url, fanart=FANART , folder=True )
def play(params):
    plugintools.log("dandb.play "+repr(params))

    #plugintools.set_view(plugintools.LIST)

    try:
        url = params.get("url")
        plugintools.log("dandb.play url="+repr(url))

        if url=="":
            return

        from urlresolver.types import HostedMediaFile
        hosted_media_file = HostedMediaFile(url=url)
        plugintools.log("dandb.play hosted_media_file="+repr(hosted_media_file))

        try:
            media_url = hosted_media_file.resolve()
            plugintools.log("dandb.play media_url="+repr(media_url))

            if media_url:
                #plugintools.add_item( action="playable", title="Play this video from "+hosted_media_file.get_host()+"", url=media_url, isPlayable=True, folder=False )
                plugintools.play_resolved_url( media_url )    
            else:
                plugintools.play_resolved_url( url )    
        except:
            import traceback
            plugintools.log(traceback.format_exc())
            #plugintools.add_item( action="play", title="Error while getting access to video", isPlayable=True, folder=False )
            plugintools.message("D&B TV","Error while getting access to video")

    except urllib2.URLError,e:
        #plugintools.add_item( action="play", title="Error reading data, please try again", isPlayable=True, folder=False )
        plugintools.message("D&B TV","Connection error while getting access to video")
        body = ""
def get_navigation(params):
    plugintools.log("dandb.get_navigation "+repr(params))

    itemlist = api.navigation_get_all(params.get("url"),0,1000)
    add_items_to_xbmc(params,itemlist)

    plugintools.set_view( plugintools.LIST )
def header_pl(data, title_header):
    # Mostramos encabezado
    header = plugintools.find_single_match(data, '<div id="pl-header"(.*?)</ul>')
    #plugintools.log("header= "+header)
    title = plugintools.find_single_match(header, '<h1 class="pl-header-title">(.*?)</h1>').strip()
    plugintools.log("title= "+title)
    pl_name = plugintools.find_single_match(header, 'data-name="">(.*?)</a>').strip()
    hits = plugintools.find_multiple_matches(header, '<li>(.*?)</li>')
    hit_list = []
    for entry in hits:
        #plugintools.log("hit= "+entry)
        hit_list.append(entry)

    if title == "":
        plugintools.add_item(action="", title = title_header, url = "", folder=False, isPlayable=False)
        return title_header       
    else:
        try:
            title_header = '[COLOR orange][B]'+title+'[/B][I][COLOR white] '+hit_list[1]+' [COLOR lightyellow]'+hit_list[2]+'[/I][/COLOR]'
            plugintools.add_item(action="", title = title_header, url = "", folder=False, isPlayable=False)
            return title_header
        except:
            title_header = '[COLOR orange][B]'+title+'[/B][I][COLOR white] '+hit_list[1]+' [/I][/COLOR]'
            plugintools.add_item(action="", title = title_header, url = "", folder=False, isPlayable=False)
            return title_header            
def sawlive(params):
    plugintools.log('[%s %s] Sawlive %s' % (addonName, addonVersion, repr(params)))  
    url_user = {}
    
    # Construimos diccionario...
    url = params.get("url")
    url_extracted = url.split(" ")
    for entry in url_extracted:
        if entry.startswith("rtmp"):
            entry = entry.replace("rtmp=", "")         
            url_user["rtmp"]=entry
        elif entry.startswith("playpath"):
            entry = entry.replace("playpath=", "")
            url_user["playpath"]=entry            
        elif entry.startswith("swfUrl"):
            entry = entry.replace("swfUrl=", "")
            url_user["swfurl"]=entry
        elif entry.startswith("pageUrl"):
            entry = entry.replace("pageUrl=", "")
            url_user["pageurl"]=entry          
        elif entry.startswith("token"):
            entry = entry.replace("token=", "")
            url_user["token"]=entry
        elif entry.startswith("referer"):
            entry = entry.replace("referer=", "")
            url_user["referer"]=entry

    plugintools.log("URL_user dict= "+repr(url_user)) 
    pageurl = url_user.get("pageurl")
    referer = url_user.get("referer")
    if referer == "":
        referer = 'http://www.wiz1.net/lag10_home.php'
    url = wizz1(pageurl, referer)
Exemple #30
0
def get_favorite_programs(item,viewmode="", channel="", context=""):
    plugintools.log("tvalacarta.api.get_favorite_programs")

    service_url = MAIN_URL+"/programs/get_all.php"
    service_parameters = {"favorites":"1","s":get_session_token(),"api_key":API_KEY}

    return get_itemlist(service_url,service_parameters,viewmode=viewmode,channel=channel)
def sod0(params):
    plugintools.log("[movie.ultra.7k 0.3.3].Sports on Demand " + repr(params))

    thumbnail = "http://nba.lemons.se/gfx/nbadavkabt.gif"
    fanart = "http://www.acrossthenba.com/wp-content/uploads/2015/01/NBA-Logo-Wallpaper-HD.jpg"

    plugintools.add_item(
        action="davka0",
        title=
        '[COLOR white]Davka BT [/COLOR][I][COLOR lightgreen](Basketball) [/I][/COLOR]',
        url='http://bt.davka.info/',
        thumbnail=thumbnail,
        fanart=fanart,
        folder=True,
        isPlayable=False)
    plugintools.add_item(
        action="sv_hockey0",
        title=
        '[COLOR white]Sport-Video [/COLOR][I][COLOR lightgreen](Hockey) [/I][/COLOR]',
        url='http://www.sport-video.org.ua/hockey.html',
        thumbnail=thumbnail,
        fanart=fanart,
        folder=True,
        isPlayable=False)
    plugintools.add_item(
        action="sv_hockey0",
        title=
        '[COLOR white]Sport-Video [/COLOR][I][COLOR lightgreen](European Football/Soccer) [/I][/COLOR]',
        url='http://www.sport-video.org.ua/soccer.html',
        thumbnail=thumbnail,
        fanart=fanart,
        folder=True,
        isPlayable=False)
    plugintools.add_item(
        action="sv_hockey0",
        title=
        '[COLOR white]Sport-Video [/COLOR][I][COLOR lightgreen](Basketball) [/I][/COLOR]',
        url='http://www.sport-video.org.ua/basketball.html',
        thumbnail=thumbnail,
        fanart=fanart,
        folder=True,
        isPlayable=False)
    plugintools.add_item(
        action="sv_hockey0",
        title=
        '[COLOR white]Sport-Video [/COLOR][I][COLOR lightgreen](AFL/Gaelic Football) [/I][/COLOR]',
        url='http://www.sport-video.org.ua/gaelic.html',
        thumbnail=thumbnail,
        fanart=fanart,
        folder=True,
        isPlayable=False)
    plugintools.add_item(
        action="sv_hockey0",
        title=
        '[COLOR white]Sport-Video [/COLOR][I][COLOR lightgreen](Rugby) [/I][/COLOR]',
        url='http://www.sport-video.org.ua/rugby.html',
        thumbnail=thumbnail,
        fanart=fanart,
        folder=True,
        isPlayable=False)
    plugintools.add_item(
        action="sv_hockey0",
        title=
        '[COLOR white]Sport-Video [/COLOR][I][COLOR lightgreen](American Football) [/I][/COLOR]',
        url='http://www.sport-video.org.ua/americanfootball.html',
        thumbnail=thumbnail,
        fanart=fanart,
        folder=True,
        isPlayable=False)
    plugintools.add_item(
        action="sv_hockey0",
        title=
        '[COLOR white]Sport-Video [/COLOR][I][COLOR lightgreen](Basketball) [/I][/COLOR]',
        url='http://www.sport-video.org.ua/rugby.html',
        thumbnail=thumbnail,
        fanart=fanart,
        folder=True,
        isPlayable=False)
    plugintools.add_item(
        action="sv_hockey0",
        title=
        '[COLOR white]Sport-Video [/COLOR][I][COLOR lightgreen](Baseball) [/I][/COLOR]',
        url='http://www.sport-video.org.ua/baseball.html',
        thumbnail=thumbnail,
        fanart=fanart,
        folder=True,
        isPlayable=False)
Exemple #32
0
def pelisadicto_linker0(params):
    plugintools.log("[%s %s] Pelisadicto %s" %
                    (addonName, addonVersion, repr(params)))

    url = params.get("url")
    r = requests.get(url)
    data = r.content

    plugintools.add_item(action="",
                         url="",
                         title="[COLOR lightblue][B] Pelisadicto" + version +
                         "[/B][COLOR lightblue]" + sc4 + "[I] [/I]" + ec4,
                         thumbnail=thumbnail,
                         fanart=fanart,
                         folder=False,
                         isPlayable=False)

    logo = 'http://pelisadicto.com' + plugintools.find_single_match(
        data, '<img style="width: 240px; height: 360px;" src="([^"]+)"')
    if logo == "": logo = thumbnail

    title = plugintools.find_single_match(
        data, '<meta property="og:title" content="(.*?)\(').strip()
    if title == "":
        title = plugintools.find_single_match(
            data, '<meta property="og:title" content="(.*?)"')
    year = plugintools.find_single_match(
        data, '<meta property="og:title" content=".*?\((.*?)\)')
    bloq_genr = plugintools.find_single_match(data, '<p>Genero(.*?)</p>')
    genrfull = plugintools.find_multiple_matches(bloq_genr,
                                                 'title=".*?">(.*?)<')

    genr = pelisadicto_genr(genrfull)

    sinopsis = plugintools.find_single_match(data,
                                             '<p>(.*?)</p>').strip().replace(
                                                 '\n', '')

    datamovie = {
        'genre': sc3 + '[B]Género: [/B]' + ec3 + sc + str(genr) + ', ' + ec,
        'year': sc3 + '[B]Año: [/B]' + ec3 + sc + str(year) + '[CR]' + ec,
        'sinopsis': sc3 + '[B]Sinopsis: [/B]' + ec3 + sc + str(sinopsis) + ec
    }

    datamovie["plot"] = datamovie["genre"] + datamovie["year"] + datamovie[
        "sinopsis"]

    plugintools.addPeli(action="",
                        url="",
                        title=sc5 + "[B]" + title + "[/B]" + ec5,
                        info_labels=datamovie,
                        thumbnail=thumbnail,
                        fanart=fanart,
                        folder=False,
                        isPlayable=False)
    #plugintools.add_item(action="",url="",title=sc+"Género: "+ec+sc3+str(genr)+ec3+sc+"  Año: "+ec+sc3+year+ec3,thumbnail=thumbnail,fanart=fanart,folder=False,isPlayable=False)
    #plugintools.add_item(action="",url="",title=sc5+"Enlaces disponibles"+ec5,thumbnail=logo,fanart=fanart,folder=False,isPlayable=False)

    bloq_link = plugintools.find_single_match(data, '<tbody>(.*?)</table>')
    link = plugintools.find_multiple_matches(bloq_link, '<tr>(.*?)</tr>')
    for item in link:
        lang = plugintools.find_single_match(item, '<td><img src="([^"]+)"')
        if '1.png' in lang: lang = sc2 + '[I][ESP][/I]' + ec2
        if '2.png' in lang: lang = sc2 + '[I][LAT][/I]' + ec2
        if '3.png' in lang: lang = sc2 + '[I][ENG-SUB][/I]' + ec2
        if '4.png' in lang: lang = sc2 + '[I][ENG][/I]' + ec2
        quality = plugintools.find_single_match(
            item, '<td><img src=".*?</td>\s+<td>(.*?)</td>')
        url_server = plugintools.find_single_match(item, ' href="([^"]+)"')
        server = video_analyzer(url_server)
        titlefull = sc + server.title(
        ) + ec + " " + lang + "  " + sc + "Video: " + ec + sc5 + quality + ec5
        plugintools.addPeli(action=server,
                            url=url_server,
                            title=titlefull,
                            info_labels=datamovie,
                            thumbnail=logo,
                            fanart=fanart,
                            folder=False,
                            isPlayable=True)
Exemple #33
0
def documania1(params):
    plugintools.log("[%s %s] documania1 %s " %
                    (addonName, addonVersion, repr(params)))
    plugintools.modo_vista("tvshows")
    datamovie = {}

    plugintools.add_item(action="",
                         title='[COLOR gold][B]Documaniatv.com / ' +
                         params.get("title") + '[/B][/COLOR]',
                         url="",
                         thumbnail=thumb_docus,
                         fanart=fanart_docus,
                         folder=False,
                         isPlayable=False)

    url = params.get("url")
    ref = 'http://www.documaniatv.com'
    body = gethttp_referer_headers(url, ref)
    plugintools.log("body= " + body)
    plugintools.modo_vista("tvshows")
    bloque_docus = plugintools.find_single_match(
        body,
        '<div class="pm-li-video">(.*?)<div class="pagination pagination-centered">'
    )
    plugintools.log("bloque_docus= " + bloque_docus)
    matches = plugintools.find_multiple_matches(bloque_docus, '<li>(.*?)</li>')
    for entry in matches:
        plugintools.log("entry= " + entry)
        title_docu = plugintools.find_single_match(entry, 'alt="([^"]+)')
        url_docu = plugintools.find_single_match(entry, '<a href="([^"]+)')
        thumb_docu = plugintools.find_single_match(
            entry, '<img src="http://www.documaniatv.com/([^"]+)')
        length_docu = plugintools.find_single_match(
            entry,
            '<span class="pm-label-duration border-radius3 opac7">([^<]+)')
        length_docu = length_docu.replace("&iacute;", "í").strip()
        visitors_docu = plugintools.find_single_match(
            entry, '<span class="pm-video-attr-numbers"><small>([^<]+)')
        visitors_docu = visitors_docu.strip()
        published_docu = plugintools.find_single_match(
            entry, '<time datetime[^>]+>(.*?)</time>')
        #linea_sinopsis = '[COLOR lightblue]['+visitors_docu+'] [/COLOR]COLOR lightgreen][I]('+length_docu+')[/COLOR] [COLOR orange]'+published_docu+'[/I][/COLOR]\n'
        linea_sinopsis = '[COLOR white]Visitas: [COLOR lightblue]' + visitors_docu + '[/COLOR][COLOR white] Duracion: [COLOR lightgreen][I]' + length_docu + '[/COLOR] [COLOR white]Subido: [COLOR orange]' + published_docu + '[/I][/COLOR]\n'

        if thumb_docu.startswith("data") == True:
            thumb_docu = thumb_docus
        elif thumb_docu.find("xviews") >= 0:
            thumb_docu = 'http://www.documaniatv.com/uploads/xcustom-logo.png.pagespeed.ic.FSHzD0Pwtr.png'
        else:
            thumb_docu = thumb_docu.replace(".webp", "")
            if thumb_docu.endswith("png") == True:
                pass
            else:
                thumb_docu = thumb_docu + '.png'
                thumb_docu = thumb_docu.strip()
                thumb_docu = 'http://www.documaniatv.com/' + thumb_docu

        sinopsis_docu = plugintools.find_single_match(
            entry, '<p class="pm-video-attr-desc">(.*?)</p>')
        sinopsis_docu = linea_sinopsis + sinopsis_docu + '... [COLOR lightyellow][I](sigue)[/I][/COLOR]'
        sinopsis_docu = sinopsis_docu.decode('utf-8')
        datamovie["Plot"] = html_unescape(
            sinopsis_docu
        )  # Resuelve problema de codificación de caracteres en Python
        plugintools.log("published_docu= " + published_docu)
        plugintools.log("title_docu= " + title_docu)
        plugintools.log("url_docu= " + url_docu)
        plugintools.log("thumb_docu= " + thumb_docu)
        try:
            plugintools.log("sinopsis_docu= " + sinopsis_docu)
        except:
            pass
        plugintools.add_item(action="documania2",
                             title='[COLOR white]' + title_docu +
                             '[/COLOR] [COLOR lightyellow][I]' + length_docu +
                             ' [COLOR orange](' + visitors_docu +
                             ')[/I][/COLOR]',
                             url=url_docu,
                             thumbnail=thumb_docu,
                             info_labels=datamovie,
                             fanart=fanart_docus,
                             folder=False,
                             isPlayable=True)
Exemple #34
0
def play_url(url):
    plugintools.log('[%s %s].play %s' % (addonName, addonVersion, url))

    plugintools.modo_vista("tvshows")
    params = plugintools.get_params()
    show = params.get("page")
    if show == "":
        show = "list"
    plugintools.modo_vista(show)

    # Notificación de inicio de resolver en caso de enlace RTMP
    url = url.strip()

    if url.startswith("http") == True:
        if url.find("allmyvideos") >= 0:
            params = plugintools.get_params()
            params["url"] = url
            allmyvideos(params)
        elif url.find("streamcloud") >= 0:
            params["url"] = url
            params["title"] = title
            params = plugintools.get_params()
            streamcloud(params)
        elif url.find("vidspot") >= 0:
            params = plugintools.get_params()
            params["url"] = url
            vidspot(params)
        elif url.find("played.to") >= 0:
            params = plugintools.get_params()
            params["url"] = url
            playedto(params)
        elif url.find("vk.com") >= 0:
            params = plugintools.get_params()
            params["url"] = url
            vk(params)
        elif url.find("nowvideo") >= 0:
            params = plugintools.get_params()
            params["url"] = url
            nowvideo(params)
        elif url.find("tumi") >= 0:
            params = plugintools.get_params()
            params["url"] = url
            tumi(params)
        elif url.find("streamin.to") >= 0:
            params = plugintools.get_params()
            params["url"] = url
            streaminto(params)
        elif url.find("veehd") >= 0:
            params = plugintools.get_params()
            params["url"] = url
            veehd(params)
        elif url.find("novamov") >= 0:
            params = plugintools.get_params()
            params["url"] = url
            novamov(params)
        elif url.find("gamovideo") >= 0:
            params = plugintools.get_params()
            params["url"] = url
            gamovideo(params)
        elif url.find("movshare") >= 0:
            params = plugintools.get_params()
            params["url"] = url
            movshare(params)
        elif url.find("powvideo") >= 0:
            params = plugintools.get_params()
            params["url"] = url
            powvideo(params)
        elif url.find("mail.ru") >= 0:
            params = plugintools.get_params()
            params["url"] = url
            mailru(params)
        elif url.find("tumi.tv") >= 0:
            params = plugintools.get_params()
            params["url"] = url
            tumi(params)
        elif url.find("videobam") >= 0:
            params = plugintools.get_params()
            params["url"] = url
            videobam(params)

        else:
            url = url.strip()
            plugintools.play_resolved_url(url)

    elif url.startswith("rtp") >= 0:  # Control para enlaces de Movistar TV
        plugintools.play_resolved_url(url)

    else:
        plugintools.play_resolved_url(url)

    plugintools.modo_vista("tvshows")
def dinozap0(params):
    plugintools.log('[%s %s] Initializing Businessapp regex... %s' %
                    (addonName, addonVersion, repr(params)))
    url_user = {}

    # Construimos diccionario...
    url = params.get("url")
    url_extracted = url.split(" ")
    for entry in url_extracted:
        if entry.startswith("rtmp"):
            entry = entry.replace("rtmp=", "")
            url_user["rtmp"] = entry
        elif entry.startswith("playpath"):
            entry = entry.replace("playpath=", "")
            url_user["playpath"] = entry
        elif entry.startswith("swfUrl"):
            entry = entry.replace("swfUrl=", "")
            url_user["swfurl"] = entry
        elif entry.startswith("pageUrl"):
            entry = entry.replace("pageUrl=", "")
            url_user["pageurl"] = entry
        elif entry.startswith("token"):
            entry = entry.replace("token=", "")
            url_user["token"] = entry
        elif entry.startswith("referer"):
            entry = entry.replace("referer=", "")
            url_user["referer"] = entry

    url = url_user.get("pageurl")
    ref = 'http://www.dinozap.info/'
    body = ''
    body = gethttp_referer_headers(url, ref)
    reff = url
    url = plugintools.find_single_match(body, 'iframe\ssrc="([^"]+)')
    for i in range(1, 10):
        k = url
        body = gethttp_referer_headers(url, reff)
        scrpt = 'document\.write\(unescape\(\'([^\']+)'
        scrpt = plugintools.find_single_match(body, scrpt)
        tok = 'securetoken([^\n]+)'
        tok = plugintools.find_single_match(body, tok)
        try:
            hidd = 'type="hidden"\sid="([^"]+)"\svalue="([^"]*)'
            hidd = plugintools.find_multiple_matches(body, hidd)
        except:
            i -= 1
        diov = 'var\s(sUrl|cod1)\s=\s\'([^\']+)'
        diov = plugintools.find_multiple_matches(body, diov)
        #print diov;
        Epoc_mil = str(int(time.time() * 1000))
        EpocTime = str(int(time.time()))
        jquery = '%s?callback=jQuery17049106340911455604_%s&v_cod1=%s&v_cod2=%s&_=%s'
        jurl = jquery % (hidd[3][1].decode('base64'), Epoc_mil,
                         urllib.quote_plus(hidd[1][1]),
                         urllib.quote_plus(hidd[2][1]), Epoc_mil)
        r = '"result\d{1}":"([^"]+)'
        p = 'plugintools.find_multiple_matches(body,r)'
        body = gethttp_referer_headers(jurl, k)
        x = eval(p)[0]
        print jurl
        if x == 'not_found': print 'try ' + str(i) + ' : ' + x
        else:
            print 'try ' + str(i) + ' : OK :)'
            break
Exemple #36
0
def get_system_platform(params):
    plugintools.log("[PalcoTV-0.2.99].get_system_platform " + repr(params))

   
    if xbmc.getCondVisibility( "system.platform.ipad" ):
        platform = "linux"
        # Var / Stash /Applications/ XBMC.app / Frameworks / librtmp.0.dylib
        libdir = xbmc.translatePath(os.path.join('special://xbmc/Frameworks/', ''))
        plugintools.log("dir= "+libdir)
        filename = "librtmp.0.dylib"
        shutil.copyfile(libdir + 'librtmp.0.dylib', libdir + 'librtmp.0.dylib')

        # fh = open(libdir + filename, "wb")
        bajalib(params, platform)

    if xbmc.getCondVisibility( "system.platform.iphone" ):
        platform = "iphone"
        # Var / Stash /Applications/ XBMC.app / Frameworks / librtmp.0.dylib
        libdir = xbmc.translatePath(os.path.join('special://xbmc/Frameworks/', ''))
        plugintools.log("dir= "+libdir)
        filename = "librtmp.0.dylib"
        shutil.copyfile(libdir + 'librtmp.0.dylib', libdir + 'librtmp.0.dylib')

        # fh = open(libdir + filename, "wb")
        bajalib(params, platform)

    if xbmc.getCondVisibility( "system.platform.appletv" ):
        platform = "appletv"
        # Var / Stash /Applications/ XBMC.app / Frameworks / librtmp.0.dylib
        libdir = xbmc.translatePath(os.path.join('special://xbmc/Frameworks/', ''))
        plugintools.log("dir= "+libdir)
        filename = "librtmp.0.dylib"
        shutil.copyfile(libdir + 'librtmp.0.dylib', libdir + 'librtmp.0.dylib')

        # fh = open(libdir + filename, "wb")
        bajalib(params, platform)         

    elif xbmc.getCondVisibility( "system.platform.linux" ):
        platform = "android"
        # /data / data / org.xbmc.xbmc / lib / librtmp.so
        libdir = xbmc.translatePath(os.path.join('special://data/data/org.xbmc.xbmc/lib/', ''))
        plugintools.log("dir= "+libdir)
        filename = "librtmp.so"
        shutil.copyfile(libdir + 'librtmp.so', libdir + 'librtmp.so')

        bajalib(params, platform, libdir, filename)        
                
    elif xbmc.getCondVisibility( "system.platform.windows" ):
        platform = "windows"
        # Program Files (x86)/XBMC/system/players/dvdplayer/librtmp.dll
        # Archivos de Programa/XBMC/system/players/dvdplayer/librtmp.dll
        # Da igual porque special://xbmc/ apunta a la carpeta de instalación de XBMC
        libdir = xbmc.translatePath(os.path.join('special://xbmc/system/players/dvdplayer/', ''))
        filename = "librtmp.dll"
        plugintools.log("dir= "+libdir)
        filename = "librtmp.dll"
        shutil.copyfile(libdir + 'librtmp.dll', libdir + 'librtmp_bakup.dll')

        # fh = open(libdir + filename, "wb")
        bajalib(params, platform, libdir, filename)
                
    elif xbmc.getCondVisibility( "system.platform.osx" ):
        platform = "osx"
        # Var / Stash /Applications/ XBMC.app / Frameworks / librtmp.0.dylib
        libdir = xbmc.translatePath(os.path.join('special://xbmc/Frameworks/', ''))
        plugintools.log("dir= "+libdir)
        filename = "librtmp.0.dylib"
        shutil.copyfile(libdir + 'librtmp.0.dylib', libdir + 'librtmp.0.dylib')

        # fh = open(libdir + filename, "wb")
        bajalib(params, platform)        
    else:
        platform = "unknow"
        
    plugintools.log("plataforma= "+platform)
Exemple #37
0
def cineclasico_linker0(params):
    plugintools.log("[%s %s] Linker Descarga Cine Clasico %s" %
                    (addonName, addonVersion, repr(params)))

    plugintools.add_item(action="",
                         url="",
                         title="[COLOR lightblue][B]Linker CineClasico" +
                         version + "[/B][COLOR lightblue]" + sc4 +
                         "[I] *** By Aquilesserr/PalcoTV Team ***[/I]" + ec4,
                         thumbnail=thumbnail,
                         fanart=fanart,
                         folder=False,
                         isPlayable=False)

    ################## Params Library ####################
    url_list = []
    option_list = []
    source = params.get("extra")
    ######################################################
    url = params.get("url")
    r = requests.get(url)
    data = r.content

    ####################################### Control for Linker ##########################################
    if source == "linker":
        fondo = plugintools.find_single_match(
            data, '<meta property="og:image" content="([^"]+)"')
        if fondo == "": fondo = fanart
        logo = plugintools.find_single_match(
            data, '<img width="145" height="245" src="([^"]+)"')
        if logo == "": logo = thumbnail
        title = plugintools.find_single_match(
            data, '<h1 class="page-title">([^\()]+)\(').upper()
        pais = plugintools.find_single_match(
            data, '<strong>País:</strong></td>.*?rel="tag">(.*?)</a></td>')
        if pais == "": pais = 'N/D'
        year = plugintools.find_single_match(
            data, '<strong>Año:</strong></td>.*?rel="tag">(.*?)</a></td>')
        if year == "": year = 'N/D'
        bloq_genr = plugintools.find_single_match(
            data, '<strong>Género:</strong></td>(.*?)</td>')
        genrfull = plugintools.find_multiple_matches(
            bloq_genr, 'rel="category tag">([^<]+)<')
        genr = imdb_genr(genrfull)
        sinopsis = plugintools.find_single_match(
            data, '<div style="margin-top:-10px;"><p><strong>(.*?)<h3>')
        sinopsis = sinopsis.replace('&#8216;',
                                    '').replace('&#8220;', '').replace(
                                        '&#8221;', '').replace('&#8230;', '')
        sinopsis = sinopsis.replace('<strong>', '').replace(
            '</strong>',
            '').replace('<br/>', '').replace('<em>', '').replace('</em>', '')
        sinopsis = sinopsis.replace('<p>',
                                    '').replace('</p>',
                                                '').replace('&amp;', '')
        if sinopsis == "": sinopsis = 'N/D'
        datamovie = {
            'genre':
            sc3 + '[B]Género: [/B]' + ec3 + sc + str(genr) + ', ' + ec,
            'year': sc3 + '[B]Año: [/B]' + ec3 + sc + str(year) + ', ' + ec,
            'sinopsis':
            sc3 + '[B]Sinopsis: [/B]' + ec3 + sc + str(sinopsis) + ec
        }
        datamovie["plot"] = datamovie["genre"] + datamovie["year"] + datamovie[
            "sinopsis"]
        plugintools.addPeli(action="",
                            url="",
                            title=sc5 + "[B]" + title + "[/B]" + ec5,
                            info_labels=datamovie,
                            thumbnail=thumbnail,
                            fanart=fanart,
                            folder=False,
                            isPlayable=False)
    #####################################################################################################

    bloq_film = plugintools.find_single_match(data,
                                              '<h3>Ver Online(.*?)</center>')
    film = plugintools.find_multiple_matches(
        bloq_film, 'class="MO">(.*?)rel="/nofollow"')

    for item in film:
        lang = plugintools.find_single_match(
            item,
            'src="http://www.descargacineclasico.net/wp-content/themes/TvClasico/imgdes/(.*?).png'
        ).strip()
        if 'esp' in lang:
            lang = lang.replace('esp', '[I][ESP][/I]')
        elif 'dual-sub' in lang:
            lang = lang.replace('dual-sub', '[I][ESP-SUB][/I]')
        elif 'esp-lat-mex' in lang:
            lang = lang.replace('esp-lat-mex', '[I][LAT][/I]')
        elif 'vo' in lang:
            lang = lang.replace('vo', '[I][VO][/I]')
        else:
            lang = 'N/D'
        quality = plugintools.find_single_match(
            item, '<span>Opci&oacute;n.*?</span>\s+<span>([^<]+)</span>'
        ).strip().replace("\n", "").replace("\t", "")
        url_vid = plugintools.find_single_match(
            item, '<a href=(.*?)target="').strip()
        url = cineclasico_adfly(url_vid)
        server = video_analyzer(url)
        ####################################### Control for Linker ##########################################
        if source == "linker":
            titlefull = sc + server.title(
            ) + ec + " " + sc2 + lang + ec2 + " " + sc + " Video: " + ec + sc5 + quality + ec5
            plugintools.addPeli(action=server,
                                url=url,
                                title=titlefull,
                                info_labels=datamovie,
                                thumbnail=logo,
                                fanart=fondo,
                                folder=False,
                                isPlayable=True)
        #####################################################################################################
        ####################################### Control for Library #########################################
        elif source == "library":
            plugintools.log("server= " + server)
            plugintools.log("lang= " + lang)
            plugintools.log("quality= " + quality)
            titlefull = '[COLOR white]' + server.title(
            ) + ' ' + '[/COLOR][COLOR lightyellow][I][' + lang.replace(
                "[I]", ""
            ).replace("[/I]", "").replace("[", "").replace("]", "").strip(
            ) + '] [/COLOR][COLOR lightblue][' + quality + '] [/COLOR][COLOR gold][HDFull][/I][/COLOR]'
            url_list.append(url)
            option_list.append(titlefull)
        #####################################################################################################

    if source == "library": return option_list, url_list
def davka0(params):
    plugintools.log("[movie.ultra.7k 0.3.3].Davka BT " + repr(params))

    thumbnail = "http://nba.lemons.se/gfx/nbadavkabt.gif"
    fanart = "http://www.acrossthenba.com/wp-content/uploads/2015/01/NBA-Logo-Wallpaper-HD.jpg"

    url = params.get("url")
    referer = url
    data = gethttp_referer_headers(url, referer)
    plugintools.log("data= " + data)

    matches = plugintools.find_multiple_matches(data,
                                                "<TD>name</TD>(.*?)</A></TD>")
    for entry in matches:
        plugintools.log("entry= " + entry)
        url_match = plugintools.find_single_match(
            entry, "<TD colspan=7><B><A href='(.*?)</A></B></TD>")
        plugintools.log("url_match= " + url_match)
        url_match = url_match.split("'>")
        url = url_match[0]
        url = 'http://bt.davka.info/' + url
        title_match = url_match[1]
        title_match_fixed = title_match.split("(")
        if len(title_match_fixed) >= 2:
            title_match_fixed = title_match_fixed[0]
        date = plugintools.find_single_match(title_match, '\((.*?)\)')
        date = date.split(".")
        month = date[0]
        day = date[1]
        title_fixed = '[COLOR gold][B]' + day + '/' + month + ' [/B][/COLOR]' + title_match_fixed
        extra = plugintools.find_multiple_matches(
            entry, '<FONT color=white>(.*?)</FONT></TD>')
        for entri in extra:
            plugintools.log("entri= " + entri)
            title_fixed = title_fixed + '  [COLOR lightyellow][I][' + entri + '][/I][/COLOR]'

        plugintools.log("url= " + url)
        plugintools.log("title_match= " + title_match)
        plugintools.add_item(action="sport_launchtorrent",
                             title=title_fixed,
                             url=url,
                             thumbnail=thumbnail,
                             fanart=fanart,
                             folder=False,
                             isPlayable=True)
Exemple #39
0
def yt_playlist(params):

    url = params.get("url")
    i = 1

    data = gethttp_headers(params)
    plugintools.log("data= " + data)
    url = data.strip()

    # Cargamos función de encabezado del playlist
    title_header = ""
    title_header = header_pl(data, title_header)

    # Cargamos botón de página siguiente (+100 vídeos)
    load_more = plugintools.find_single_match(
        data, 'data-uix-load-more-href="([^"]+)')
    load_more = 'https://www.youtube.com/' + load_more
    plugintools.log("load_more= " + load_more)
    plugintools.add_item(action="load_more_vids",
                         title="[COLOR lightyellow]Cargar más...[/COLOR]",
                         url=load_more,
                         extra=str(i),
                         page=title_header,
                         folder=True,
                         isPlayable=False)

    i = 1
    canal = plugintools.find_multiple_matches(
        data, '<tr class="pl-video yt-uix-tile(.*?)</span>')
    for entry in canal:
        plugintools.log("Núm. " + str(i))
        plugintools.log("Canal= " + entry)
        vid_title = plugintools.find_single_match(entry, 'data-title="([^"]+)')
        vid_title = parsing_yt(vid_title)
        plugintools.log("URL= " + vid_title)
        vid_url = plugintools.find_single_match(
            entry, 'data-video-id="([^"]+)').strip()
        vid_url = 'plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid=' + vid_url
        vid_url = vid_url.strip()
        plugintools.log("URL= " + vid_url)
        vid_thumb = plugintools.find_single_match(entry, 'src="(.*?)"')
        vid_thumb = 'https:' + vid_thumb
        vid_thumb = vid_thumb.replace("vi_webp", "vi")
        vid_thumb = vid_thumb.replace("default.webp", "default.jpg")
        plugintools.log("thumbnail= " + vid_thumb)
        fanart = art + 'youtube.png'
        plugintools.add_item(
            action="play",
            title=str(i) + '. ' + vid_title +
            ' [COLOR white][[COLOR red]You[COLOR white]tube Video][/COLOR]',
            url=vid_url,
            thumbnail=vid_thumb,
            fanart=fanart,
            folder=False,
            isPlayable=True)
        i = i + 1
def sv_hockey0(params):
    plugintools.log("[movie.ultra.7k 0.3.3].Sport-video Hockey " +
                    repr(params))

    thumbnail = 'http://www.mytinyphone.com/uploads/users/hockeyfan49/189572.jpg'

    url = params.get("url")
    if url.endswith("gaelic.html") == True:
        title = '[COLOR gold][B]Sport-Video Gaelic Football[/B][/COLOR]'
        fanart = 'http://gaa.eircom.ie/image/var/files/experience-speaks/Football-tackles/PIC_2.jpg'
    elif url.endswith("hockey.html") == True:
        title = '[COLOR gold][B]Sport-Video Hockey[/B][/COLOR]'
        fanart = 'http://www.thesportsdb.com/images/media/team/fanart/vtrqwu1421535548.jpg'
    elif url.endswith("rugby.html") == True:
        title = '[COLOR gold][B]Sport-Video Rugby[/B][/COLOR]'
        fanart = 'http://static.trueachievements.com/customimages/012874.jpg'
    elif url.endswith("americanfootball.html") == True:
        title = '[COLOR gold][B]Sport-Video American Football[/B][/COLOR]'
        fanart = 'http://s1.picswalls.com/wallpapers/2014/07/25/awesome-rugby-wallpaper_041253717_99.jpg'
    elif url.endswith("soccer.html") == True:
        title = '[COLOR gold][B]Sport-Video European Football (Soccer)[/B][/COLOR]'
        fanart = 'http://images5.alphacoders.com/481/481998.jpg'
    elif url.endswith("baseball.html") == True:
        title = '[COLOR gold][B]Sport-Video Baseball[/B][/COLOR]'
        fanart = 'http://3.bp.blogspot.com/-toqMAo5-7WM/TpAeLJsqCDI/AAAAAAAACYQ/FGXLGdNo47I/s1600/The-best-top-desktop-baseball-wallpapers+baseball-america-wallpaper2012.jpg'
    elif url.endswith("basketball.html") == True:
        title = '[COLOR gold][B]Sport-Video Basketball[/B][/COLOR]'
        fanart = 'http://www.hdwallpaperscool.com/wp-content/uploads/2013/11/basketball-hd-wallpapers-beautiful-desktop-backgrounds-widescreen.jpg'

    plugintools.add_item(action="",
                         title=title,
                         url="",
                         thumbnail=thumbnail,
                         fanart=fanart,
                         folder=False,
                         isPlayable=True)

    referer = url
    data = gethttp_referer_headers(url, referer)
    plugintools.log("data= " + data)

    #Paginación
    matches = plugintools.find_multiple_matches(
        data, '<span style="color:#000000(.*?)</a></strong></span></div>')
    for entry in matches:
        #plugintools.log("entry= "+entry)
        page_matches = plugintools.find_multiple_matches(
            entry, '<a href="([^"]+)')
        for entry in page_matches:
            entry = entry.strip()
            if entry.endswith(".html") == True:
                plugintools.log("entry= " + entry)

    #Resultados de partidos
    matches = plugintools.find_multiple_matches(
        data, '<a href="javascript:popupwnd(.*?).torrent')
    for entry in matches:
        plugintools.log("entry= " + entry)
        title_match = plugintools.find_multiple_matches(
            entry, 'title="([^"]+)')
        if len(title_match) >= 2: title_match = title_match[1]
        else: title_match = title_match[0]
        thumbnail_match = plugintools.find_single_match(
            entry, 'img src="(.*?)" id="Image')
        thumbnail_match = 'http://www.sport-video.org.ua/' + thumbnail_match
        url_match = plugintools.find_single_match(entry,
                                                  '<a href="./(.*?).mkv')
        url = plugintools.find_single_match(url_match, '<a href="([^"]+)')
        url = url.replace("./", "http://www.sport-video.org.ua/")
        url = url.replace(" ", "%20").replace("%2F", "/").replace("%3A",
                                                                  ":").strip()
        plugintools.log("url= " + url)
        if url != "":
            url = url + '.mkv.torrent'
            plugintools.log("title_match= " + title_match)
            plugintools.log("thumbnail_match= " + thumbnail_match)
            plugintools.log("url= " + url)
            plugintools.add_item(action="sport_launchtorrent",
                                 title=title_match,
                                 url=url,
                                 thumbnail=thumbnail_match,
                                 fanart=fanart,
                                 folder=False,
                                 isPlayable=True)
        else:
            xbmc.executebuiltin("Notification(%s,%s,%i,%s)" %
                                ('Movie Ultra 7K', "URL no encontrada...", 3,
                                 art + 'icon.png'))
Exemple #41
0
 def onPlayBackSeekChapter(self,seekChaper):
     plugintools.log("CustomPlayer.onPlayBackSeekChapter")
Exemple #42
0
def main_list(params):
    plugintools.log("SkullRock.main_list " + repr(params))

    plugintools.log("SkullRock.run")
Exemple #43
0
 def onPlayBackResumed(self):
     plugintools.log("CustomPlayer.onPlayBackResumed")
Exemple #44
0
def load_more_vids(params):
    plugintools.log('[%s %s] load_more_vids %s' %
                    (addonName, addonVersion, repr(params)))

    url = params.get("url")
    i = params.get("extra")
    title_header = params.get("page")

    request_headers = []
    request_headers.append([
        "User-Agent",
        "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31"
    ])
    request_headers.append(
        ["Referer", 'http://www.digitele.com/pluginfiles/canales/'])
    body, response_headers = plugintools.read_body_and_headers(
        url, headers=request_headers)
    body = body.replace('\u003c', '<')
    body = body.replace('\u003e', '>')
    body = body.replace('\u003a', ':')
    body = body.replace('\u003b', ';')
    body = body.replace('\u003d', '=')
    body = body.replace('\u003f', '?')
    body = body.replace('\u002f', '/')
    body = body.replace('\u002e', '.')
    body = body.replace('\u002d', '-')
    body = body.replace('\u002c', ',')
    body = body.replace('\u0026', '&')
    body = body.replace('\u0023', '#')
    body = body.replace('\u0020', ' ')
    body = body.replace('\u00e1', 'á')
    body = body.replace('\u00e0', 'á')
    body = body.replace('\u00e9', 'é')
    body = body.replace('\u00a1', '¡')
    body = body.replace('\u00d1', 'ñ')
    body = body.replace('\u00f1', 'ñ')
    body = body.replace('&#39', 'á')
    body = body.replace('\u00fa', 'ú')
    body = body.replace('\u00c1', 'Á')
    body = body.replace('\u00ed', 'í')
    body = body.replace('\u00cd', 'Í')
    body = body.replace('\u00eb', 'ë')
    #plugintools.log("body= "+body)

    title_header = header_pl(body, title_header)

    # Comprobamos si hay más vídeos en el playlist que no ha mostrado Youtube
    load_more = plugintools.find_single_match(
        body, 'data-uix-load-more-href="([^"]+)')
    load_more_2 = plugintools.find_single_match(
        body, 'data-uix-load-more-href=\"|/(.*?)data-uix-load-more-target-id')
    plugintools.log("load_more= " + load_more)
    plugintools.log("load_more_2= " + load_more_2)
    if load_more != "":
        load_more_fixed = 'https://www.youtube.com/' + load_more
        plugintools.log("load_more= " + load_more_fixed)
        i = 200
        plugintools.add_item(action="load_more_vids",
                             title="[COLOR lightyellow]Cargar más...[/COLOR]",
                             url=load_more_fixed,
                             extra=str(i),
                             page=title_header,
                             folder=True,
                             isPlayable=False)

    elif load_more_2 != "":
        load_more_fixed = 'https://www.youtube.com/' + load_more_2
        plugintools.log("load_more= " + load_more_fixed)
        i = 100
        plugintools.add_item(action="load_more_vids",
                             title="[COLOR lightyellow]Cargar más...[/COLOR]",
                             url=load_more_fixed,
                             extra=str(i),
                             page=title_header,
                             folder=True,
                             isPlayable=False)
    else:
        i = 101

    # Vamos a mostrar los videos...
    matches = plugintools.find_multiple_matches(body, '<tr(.*?)tr>')
    for entry in matches:
        vid_title = plugintools.find_single_match(
            entry, 'data-title(.*?)data-video-id')
        vid_title = vid_title.replace("data-set-video-id", "").replace(
            '=\\"', "").replace('\\"', "").replace("&quot;", '"').strip()
        title_fixed = vid_title.split(">")
        if len(title_fixed) >= 2:
            vid_title = title_fixed[0]
            vid_title = vid_title.replace("&quot;", '"')
        vid_url = plugintools.find_single_match(entry, 'data-video-id(.*?)">')
        vid_url = vid_url.replace('=\\"', "")
        vid_url_fixed = vid_url.split('\\')
        if len(vid_url_fixed) >= 2:
            vid_url = vid_url_fixed[0]
        vid_url = 'plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid=' + vid_url
        #plugintools.log("vid_url= "+vid_url)
        vid_thumb = plugintools.find_single_match(entry, 'src(.*?)width')
        vid_thumb = vid_thumb.replace("\\/", "/")
        vid_thumb = vid_thumb.replace('=\\"', "")
        vid_thumb = vid_thumb.replace('\\"', "")
        vid_thumb = vid_thumb.replace('//', "")
        vid_thumb = vid_thumb.replace('.webp', ".jpg")
        vid_thumb = 'http://' + vid_thumb
        i = int(i) + 1
        print i
        plugintools.add_item(
            action="play",
            title=str(i) + '. ' + vid_title +
            ' [COLOR white][[COLOR red]You[COLOR white]tube Video][/COLOR]',
            url=vid_url,
            thumbnail=vid_thumb,
            fanart=art + 'youtube.png',
            folder=False,
            isPlayable=True)
Exemple #45
0
    def onPlayBackStopped(self):
        plugintools.log("CustomPlayer.onPlayBackStopped")

        if self.listener is not None:
            self.listener.on_playback_stopped()
Exemple #46
0
 def onPlayBackSeek(self,time,seekOffset):
     plugintools.log("CustomPlayer.onPlayBackSeek")
Exemple #47
0
 def play_stream(self, url):  
     plugintools.log("CustomPlayer.play_stream url="+url)
     self.play(url)
Exemple #48
0
 def onPlayBackPaused(self):
     plugintools.log("CustomPlayer.onPlayBackPaused")
Exemple #49
0
 def onQueueNextItem(self):
     plugintools.log("CustomPlayer.onQueueNextItem")
Exemple #50
0
    def set_listener(self, listener):  
        plugintools.log("CustomPlayer.set_listener")

        self.listener = listener
Exemple #51
0
def mundoplus1(params):
    plugintools.log("[tv.ultra.7k 0.3.3].Mundoplus.tv búsqueda "+repr(params))

    sinopsis = params.get("plot")
    datamovie = {}
    datamovie["Plot"]=sinopsis

    thumbnail = params.get("thumbnail")
    if thumbnail == "":
        thumbnail = 'http://www.mundoplus.tv/tpl/v3.1/logo_mundoplus.png'

    texto=params.get("plot");url=params.get("url");
    plugintools.add_item(action="", title= '[COLOR royalblue][B]MUNDOPLUS.TV /[/B][/COLOR] [COLOR white]Resultados de la búsqueda: [I][B]"'+texto+'"[/B][/I][/COLOR]', url = "", info_labels = datamovie , thumbnail = thumbnail , fanart = fanart , folder = False, isPlayable = False)
   
    referer = url
    data = gethttp_referer_headers(url,referer)
    plugintools.log("data= "+data)

    block_matches = plugintools.find_single_match(data, "Buscador</h1>(.*?)</body>")
    matches = plugintools.find_multiple_matches(block_matches, '<div>(.*?)</div>')
    for entry in matches:
        plugintools.log("entry= "+entry)
        hora_match = plugintools.find_single_match(entry, '<b>(.*?)</b>')
        plugintools.log("hora_match= "+hora_match)
        title_match = entry.replace("<span>", "").replace("</span>", "").replace("<b>", "[B]").replace("</b>", "[/B]").strip()
        channel_match = plugintools.find_single_match(entry, '<span>(.*?)<span>')
        channel_match = channel_match.strip()
        if channel_match == "Cuatro":
            channel_match = channel_match.replace("Cuatro", "[COLOR red]Cuatro[/COLOR]")
        if channel_match == "Energy":
            channel_match = channel_match.replace("Energy", "[COLOR orange]Energy[/COLOR]")
        if channel_match == "Telecinco":
            channel_match = channel_match.replace("Telecinco", "[COLOR blue]Telecinco[/COLOR]")
        if channel_match == "La Sexta":
            channel_match = channel_match.replace("La Sexta", "[COLOR green]laSexta[/COLOR]")
        if channel_match == "Fox":
            channel_match = channel_match.replace("Fox", "[COLOR blue]Fox[/COLOR]")             
        day_match = plugintools.find_single_match(entry, '<span>(.*?)</span>')
        day_match = day_match.split("<span>")
        day_match = day_match[1].strip()
        event_match = entry.split("</b>")
        event_match = event_match[1]
        plugintools.log("event_match= "+event_match)
        plugintools.log("channel_match= "+channel_match)
        plugintools.log("day_match= "+day_match)        
        plugintools.log("title_match= "+title_match)
        title_fixed = '[COLOR lightyellow]'+day_match+'/[COLOR lightyellow][B]'+hora_match+' [/B][/COLOR][COLOR lightgreen]'+channel_match+'[/COLOR][COLOR white] '+event_match+'[/COLOR]'
        plugintools.add_item(action="", title= title_fixed, url="", thumbnail = thumbnail, info_labels = datamovie , fanart = fanart , folder = False, isPlayable = False)

    plugintools.setview("biglist")
Exemple #52
0
def play(url):
    plugintools.log("custom_play ["+url+"]")

    player = CustomPlayer()
    player.PlayStream( url )
Exemple #53
0
def main_list(params):
    plugintools.log("POKER.main_list "+repr(params))
Exemple #54
0
 def onPlayBackSpeedChanged(self,speed):
     plugintools.log("CustomPlayer.onPlayBackSpeedChanged")
Exemple #55
0
def peamenyy(params):
    plugintools.log(pnimi + vod_channels("TWFpbiBNZW51") + repr(params))
    load_channels()
    if not lehekylg:
        plugintools.open_settings_dialog()
    if uuendused == "true":
        kontrolli_uuendusi()
    channels = kontroll()
    if channels == 1:
        plugintools.log(pnimi + vod_channels("TG9naW4gU3VjY2Vzcw=="))
        plugintools.add_item(action=vod_channels("ZXhlY3V0ZV9haW5mbw=="),
                             title=vod_channels("TXkgQWNjb3VudA=="),
                             thumbnail="",
                             fanart=os.path.join(
                                 LOAD_LIVE,
                                 vod_channels("YmFja2dyb3VuZC5wbmc=")),
                             folder=True)
        plugintools.add_item(action=vod_channels("c2VjdXJpdHlfY2hlY2s="),
                             title=vod_channels("TGl2ZSBUVg=="),
                             thumbnail="",
                             fanart=os.path.join(
                                 LOAD_LIVE,
                                 vod_channels("YmFja2dyb3VuZC5wbmc=")),
                             folder=True)
        plugintools.add_item(
            action=vod_channels("ZGV0ZWN0X21vZGlmaWNhdGlvbg=="),
            title=vod_channels("VmlkZW8gT24gRGVtYW5k"),
            thumbnail="",
            fanart=os.path.join(LOAD_LIVE,
                                vod_channels("YmFja2dyb3VuZC5wbmc=")),
            folder=True)
        plugintools.add_item(action=vod_channels("bGljZW5zZV9jaGVjaw=="),
                             title=vod_channels("U2V0dGluZ3M="),
                             thumbnail="",
                             fanart=os.path.join(
                                 LOAD_LIVE,
                                 vod_channels("YmFja2dyb3VuZC5wbmc=")),
                             folder=False)
        plugintools.set_view(plugintools.LIST)
    else:
        plugintools.log(pnimi + vod_channels("TG9naW4gZmFpbGVk"))
        plugintools.message(
            vod_channels("TG9naW4gZmFpbGVk"),
            vod_channels(
                "UG9zc2libGUgcmVhc29uczogV3JvbmcgaG9zdCxwb3J0LHVzZXJuYW1lIG9yIHBhc3MuICAgICAgICAgIFBsZWFzZSByZWNvbmZpZ3VyZSAlcyBwbHVnaW4gd2l0aCBjb3JyZWN0IGRldGFpbHMh"
            ) % (pnimi))
        exit()
    if plugintools.get_setting("improve") == "true":
        tseaded = xbmc.translatePath(
            sync_data("c3BlY2lhbDovL3VzZXJkYXRhL2FkdmFuY2Vkc2V0dGluZ3MueG1s"))
        if not os.path.exists(tseaded):
            file = open(
                os.path.join(plugintools.get_runtime_path(),
                             vod_channels("cmVzb3VyY2Vz"),
                             sync_data("YWR2YW5jZWRzZXR0aW5ncy54bWw=")))
            data = file.read()
            file.close()
            file = open(tseaded, "w")
            file.write(data)
            file.close()
            plugintools.message(
                pnimi,
                get_live(
                    "TmV3IGFkdmFuY2VkIHN0cmVhbWluZyBzZXR0aW5ncyBhZGRlZC4="))
def ninestreams(params):
    plugintools.log("[PalcoTV-0.3.0].ninestreams " + repr(params))
    url_user = {}

    # Construimos diccionario...
    url = params.get("url")
    url_extracted = url.split(" ")
    for entry in url_extracted:
        if entry.startswith("rtmp"):
            entry = entry.replace("rtmp=", "")
            url_user["rtmp"] = entry
        elif entry.startswith("playpath"):
            entry = entry.replace("playpath=", "")
            url_user["playpath"] = entry
        elif entry.startswith("swfUrl"):
            entry = entry.replace("swfUrl=", "")
            url_user["swfurl"] = entry
        elif entry.startswith("pageUrl"):
            entry = entry.replace("pageUrl=", "")
            url_user["pageurl"] = entry
        elif entry.startswith("token"):
            entry = entry.replace("token=", "")
            url_user["token"] = entry
        elif entry.startswith("referer"):
            entry = entry.replace("referer=", "")
            url_user["referer"] = entry

    plugintools.log("URL_user dict= " + repr(url_user))
    pageurl = url_user.get("pageurl")

    # Controlamos ambos casos de URL: Único link (pageUrl) o link completo rtmp://...
    if pageurl is None:
        pageurl = url_user.get("url")

    referer = url_user.get("referer")
    if referer is None:
        referer = 'http://www.verdirectotv.com'
    channel_id = re.compile('channel=([^&]*)').findall(pageurl)
    channel_id = channel_id[0]
    # http://www.9stream.com/embedplayer.php?width=650&height=400&channel=143&autoplay=true

    if pageurl.find("embedplayer.php") >= 0:
        body = gethttp_headers(pageurl, referer)
        plugintools.log("body= " + body)
        url_user = getparams_ninestream(url_user, params, body)
        pageurl = url_user.get("pageurl")
        pageurl = 'http://www.9stream.com/embedplayer.php?width=650&height=400&channel=' + channel_id + '&autoplay=true'
        url_user["pageurl"] = pageurl
        print url_user
        url = 'rtmp://' + url_user.get(
            "rtmp"
        ) + ':1935/verdirectotvedge/_definst_/ app=verdirectotvedge/_definst_/?xs=' + url_user.get(
            "ninetok"
        ) + ' playpath=' + url_user.get("playpath") + ' token=' + url_user.get(
            "token"
        ) + ' flashver=WIN%2011,9,900,117 swfUrl=http://www.9stream.com/player/player_orig_XXXXX.swf pageUrl=' + url_user.get(
            "pageurl") + ' live=1 swfVfy=1 timeout=10'
        plugintools.play_resolved_url(url)

    else:
        body = gethttp_headers(pageurl, referer)
        plugintools.log("body= " + body)
        body = ioncube1(body)
        url_user = getparams_ninestream(url_user, params, body)
        pageurl = url_user.get("pageurl")
        pageurl = 'http://www.9stream.com/embedplayer_2.php?width=650&height=400&channel=' + channel_id + '&autoplay=true'
        url_user["pageurl"] = pageurl
        ninetok = get_fileserver(decoded, url_user)
        print 'ninetok', ninetok
        url_user["token"] = ninetok
        print 'url_user', url_user
        url = 'rtmp://' + url_user.get(
            "rtmp"
        ) + ':1935/verdirectotvedge/_definst_/ app=verdirectotvedge/_definst_/?xs=' + url_user.get(
            "ninetok"
        ) + ' playpath=' + url_user.get("playpath") + ' token=' + url_user.get(
            "token"
        ) + ' flashver=WIN%2011,9,900,117 swfUrl=http://www.9stream.com/player/player_orig_XXXXX.swf pageUrl=' + url_user.get(
            "pageurl") + ' live=1 swfVfy=1 timeout=10'
        plugintools.play_resolved_url(url)
Exemple #57
0
def stream_video(params):
    plugintools.log(pnimi + sync_data("TGl2ZSBDaGFubmVscyBNZW51IA==") +
                    repr(params))
    if get_live("WHRyZWFtLUNvZGVz") not in open(
            addonDir + "/" + sync_data("YWRkb24ueG1s")).read():
        check_user()
    if vanemalukk == "true":
        pealkiri = params.get(sync_data("dGl0bGU="))
        vanema_lukk(pealkiri)
    url = params.get(get_live("dXJs"))
    request = urllib2.Request(url, headers={"Accept": "application/xml"})
    u = urllib2.urlopen(request)
    tree = ElementTree.parse(u)
    rootElem = tree.getroot()
    for channel in tree.findall(sync_data("Y2hhbm5lbA==")):
        kanalinimi = channel.find(get_live("dGl0bGU=")).text
        kanalinimi = base64.b64decode(kanalinimi)
        kanalinimi = kanalinimi.partition("[")
        striimilink = channel.find(get_live("c3RyZWFtX3VybA==")).text
        pilt = channel.find(vod_channels("ZGVzY19pbWFnZQ==")).text
        kava = kanalinimi[1] + kanalinimi[2]
        kava = kava.partition("]")
        kava = kava[2]
        kava = kava.partition("   ")
        kava = kava[2]
        shou = get_live("W0NPTE9SIHdoaXRlXSVzIFsvQ09MT1Jd") % (
            kanalinimi[0]) + kava
        kirjeldus = channel.find(sync_data("ZGVzY3JpcHRpb24=")).text
        if kirjeldus:
            kirjeldus = base64.b64decode(kirjeldus)
            nyyd = kirjeldus.partition("(")
            nyyd = sync_data("Tk9XOiA=") + nyyd[0]
            jargmine = kirjeldus.partition(")\n")
            jargmine = jargmine[2].partition("(")
            jargmine = sync_data("TkVYVDog") + jargmine[0]
            kokku = nyyd + jargmine
        else:
            kokku = ""
        if pilt:
            plugintools.add_item(action=sync_data("cnVuX2Nyb25qb2I="),
                                 title=shou,
                                 url=striimilink,
                                 thumbnail=pilt,
                                 plot=kokku,
                                 fanart=os.path.join(
                                     LOAD_LIVE,
                                     vod_channels("aG9tZXRoZWF0ZXIuanBn")),
                                 extra="",
                                 isPlayable=True,
                                 folder=False)
        else:
            plugintools.add_item(
                action=sync_data("cnVuX2Nyb25qb2I="),
                title=shou,
                url=striimilink,
                thumbnail=os.path.join(LOAD_LIVE,
                                       sync_data("ZGVmYXVsdGxvZ28ucG5n")),
                plot=kokku,
                fanart=os.path.join(LOAD_LIVE,
                                    sync_data("aG9tZXRoZWF0ZXIuanBn")),
                extra="",
                isPlayable=True,
                folder=False)
    plugintools.set_view(plugintools.EPISODES)
    xbmc.executebuiltin(vod_channels("Q29udGFpbmVyLlNldFZpZXdNb2RlKDUwMyk="))
Exemple #58
0
def janjua0(params):
    plugintools.log("[%s %s] Castalba regex: %s " %
                    (addonName, addonVersion, repr(params)))

    url = params.get("url")
    url_user = {}

    # Construimos diccionario...
    url = params.get("url")
    url_extracted = url.split(" ")
    for entry in url_extracted:
        if entry.startswith("rtmp"):
            entry = entry.replace("rtmp=", "")
            url_user["rtmp"] = entry
        elif entry.startswith("playpath"):
            entry = entry.replace("playpath=", "")
            url_user["playpath"] = entry
        elif entry.startswith("swfUrl"):
            entry = entry.replace("swfUrl=", "")
            url_user["swfurl"] = entry
        elif entry.startswith("pageUrl"):
            entry = entry.replace("pageUrl=", "")
            url_user["pageurl"] = entry
        elif entry.startswith("token"):
            entry = entry.replace("token=", "")
            url_user["token"] = entry
        elif entry.startswith("referer"):
            entry = entry.replace("referer=", "")
            url_user["referer"] = entry

    plugintools.log("URL_user dict= " + repr(url_user))
    pageurl = url_user.get("pageurl")
    referer = url_user.get("referer")
    body = gethttp_referer_headers(pageurl, referer)
    plugintools.log("body= " + body)

    playpath = plugintools.find_single_match(body, "var v_part = '([^']+)")
    playpath = playpath.replace("/privatestream/", "")
    plugintools.log("playpath= " + playpath)
    url_redirect = 'http://www.janjua.tv:1935/loadbalancer'
    bodi = gethttp_referer_headers(url_redirect, referer)
    plugintools.log("bodi= " + bodi)
    ip = plugintools.find_single_match(bodi, 'redirect=([^ ]+)')
    plugintools.log("ip= " + ip)

    # Construimos la URL original
    url = url_user.get(
        "rtmp") + ' playpath=' + playpath + ' swfUrl=' + url_user.get(
            "swfurl"
        ) + ' pageUrl=' + pageurl + ' swfVfy=true buffer=5000 live=true'
    plugintools.log("url= " + url)
    plugintools.play_resolved_url(url)
Exemple #59
0
def license_check(params):
    plugintools.log(pnimi + get_live("U2V0dGluZ3MgbWVudQ==") + repr(params))
    plugintools.open_settings_dialog()
Exemple #60
0
def kontrolli_uuendusi():
    req = urllib2.Request(uuenduslink)
    req.add_header(vod_channels("VXNlci1BZ2VudA=="),
                   sync_data("S29kaSBwbHVnaW4gYnkgTWlra00="))
    response = urllib2.urlopen(req)
    repoversion = response.read()
    repoversion = repoversion.partition("\n")
    iversion = repoversion[1]
    global dlink
    dlink = repoversion[2]
    response.close()
    if iversion <> version:
        update = " "
    else:
        if plugintools.message_yes_no(
                pnimi, sync_data("TmV3IHVwZGF0ZSBpcyBhdmFpbGFibGUh"),
                get_live("RG8geW91IHdhbnQgdG8gdXBkYXRlIHBsdWdpbiBub3c/")):
            plugintools.log(
                pnimi + vod_channels("VHJ5aW5nIHRvIHVwZGF0ZSBwbHVnaW4uLi4="))
            try:
                destpathname = xbmc.translatePath(
                    os.path.join(sync_data("c3BlY2lhbDovLw=="),
                                 sync_data("aG9tZS9hZGRvbnMv")))
                local_file_name = os.path.join(plugintools.get_runtime_path(),
                                               get_live("dXBkYXRlLnppcA=="))
                plugintools.log(pnimi + local_file_name)
                urllib.urlretrieve(dlink, local_file_name)
                DownloaderClass(dlink, local_file_name)
                plugintools.log(pnimi +
                                sync_data("RXh0cmFjdGluZyB1cGRhdGUuLi4="))
                import ziptools
                unzipper = ziptools.ziptools()
                #destpathname = xbmc.translatePath(os.path.join('special://','home'))
                plugintools.log(pnimi + destpathname)
                unzipper.extract(local_file_name, destpathname)
                os.remove(local_file_name)
                xbmc.executebuiltin((
                    u'XBMC.Notification("Updated", "The add-on has been updated", 2000)'
                ))
                #import updater
                xbmc.executebuiltin("Container.Refresh")
                plugintools.log(pnimi + get_live("VXBkYXRlIHN1Y2Nlc3M="))
            except:
                plugintools.log(pnimi + get_live("VXBkYXRlIGZhaWxlZA=="))
                xbmc.executebuiltin((
                    u'XBMC.Notification("Not updated", "An error causes the update to fail", 2000)'
                ))