コード例 #1
0
def states(params):
    plugintools.log("broadcastify.states "+repr(params))
    itemlist = []

    # Descarga la home
    body,response_headers = plugintools.read_body_and_headers(params.get("url"))
    
    # Search for states combo
    body2 = plugintools.find_single_match(body,'<form method="GET" action="/listen/"><select size="1" name="stid"(.*?)</selec')
    patron = '<option value="([^"]+)">([^<]+)</option>'
    matches = plugintools.find_multiple_matches(body2,patron)

    for code,title in matches:
        url="http://www.broadcastify.com/listen/stid/"+code
        plugintools.log("title=["+title+"], url=["+url+"]")
        plugintools.add_item( action="feeds", title=title , url=url , folder=True )

    # Search for states urls without repeating
    #<a href="/listen/stid/689">Flevoland</a>
    patron = '<a href="/listen/stid/(\d+)">([^<]+)</a>'
    matches = plugintools.find_multiple_matches(body,patron)

    encontrados = set()

    for code,title in matches:
        if code not in encontrados:    
            url="http://www.broadcastify.com/listen/stid/"+code
            plugintools.log("title=["+title+"], url=["+url+"]")
            plugintools.add_item( action="feeds", title=title , url=url , folder=True )
            encontrados.add(code)
コード例 #2
0
def GetSerieChapters(params):
    #plugintools.log("[%s %s] Seriesadicto: getseriechapters() %s" % (addonName, addonVersion, repr(params)))

    season = params.get("season")
    datamovie = {}
    datamovie["Plot"] = params.get("plot")
    data = plugintools.read(params.get("url"))
    show = params.get("series_id")  # Obtenemos modo de vista del usuario para series TV
    if show is None:
        show = params.get("page")
        if show is None:
            show = "tvshows"
    plugintools.log("show= "+show)            
    plugintools.modo_vista(show)        
    
    season = plugintools.find_multiple_matches(data, season + '(.*?)</table>')
    season = season[0]
    
    for entry in season:
        url_cap = plugintools.find_multiple_matches(season, '<a href=\"/capitulo(.*?)\" class=\"color4\"')
        title = plugintools.find_multiple_matches(season, 'class=\"color4\">(.*?)</a>')

    num_items = len(url_cap)    
    i = 1
    
    while i <= num_items:
        url_cap_fixed = 'http://seriesadicto.com/capitulo/' + url_cap[i-1]
        title_fixed = title[i-1]
        fanart = "http://socialgeek.co/wp-content/uploads/2013/06/series-TV-Collage-television-10056729-2560-1600.jpg"
        plugintools.add_item(action="seriesadicto4", title= title_fixed, url = url_cap_fixed, thumbnail = params.get("thumbnail") , extra = str(i) , info_labels = datamovie , page = show , plot = datamovie["Plot"] , fanart = fanart, folder = True, isPlayable = False)        
        i = i + 1
コード例 #3
0
def video(params):
    plugintools.log("miratuserie_tv.video "+repr(params))
    url=params.get("url")
    plugintools.add_item(title=url)
    #"verVid('kv2a6a98x113','played',0,1,0,1,'es'); sub="112" urlorg="americanhorrorstory/ir""
    #url ="verVid('kv2a6a98x113','played',0,1,0,1,'es'); sub='112' urlorg='americanhorrorstory/ir'"
    id=plugintools.find_single_match(url,"verVid\((.*?)\);")
    split1= plugintools.find_multiple_matches(id,"'(.*?)'")
    split2= plugintools.find_multiple_matches(id,",(\d)")
    #spliit1 [0] key ,[1]host,[2]idiomas
    #split2 [0]plugin,[1]subs,[2]hd,[3]gk
    sub= plugintools.find_single_match(url,'sub="(.*?)"')
    urlorig= plugintools.find_single_match(url,'urlorg="(.*?)"')
    #print sub
    #print urlorig
    key=split1[0]
    host=split1[1]
    plugin=split2[0]
    subs=split2[1]
    sub=sub
    hd=split2[2]
    gk=split2[3]
    idiomas=split1[2]
    urlserie=urlorig
    urlvideo=get_url_video(key,host,plugin,subs,sub,hd,gk,idiomas,urlserie)
    #print "--------split------",split1,"--------split2------",split2
    #print key,host,plugin,subs,sub,hd,gk,idiomas,urlserie,urlvideo
    pagvideo=plugintools.read(urlvideo)
    print "-----------------------pagvideo----------------------------------",pagvideo,"-----------------------------------------------"
コード例 #4
0
def lista_capis(params):
    plugintools.log('[%s %s] lista_capis %s' % (addonName, addonVersion, repr(params)))

    show = plugintools.get_setting("series_id")
    if show == "":
        show = "tvshows"
        plugintools.modo_vista(show)
        plugintools.log("show= "+show)

    thumbnail = params.get("thumbnail")
    if thumbnail == "":  
        thumbnail = 'http://m1.paperblog.com/i/249/2490697/seriesflv-mejor-alternativa-series-yonkis-L-2whffw.jpeg'
    fanart = 'http://www.nikopik.com/wp-content/uploads/2011/10/S%C3%A9ries-TV.jpg'

    sinopsis = params.get("plot")
    datamovie = {}
    datamovie["Plot"]=sinopsis        
        
    url = params.get("url")
    referer = 'http://www.seriesflv.net/'
    data = gethttp_referer_headers(url,referer,show)

    # Carátula de la serie
    cover = plugintools.find_single_match(data, '<div class="portada">(.*?)</div>')
    thumbnail = plugintools.find_single_match(cover, 'src="([^"]+)')
    
    matches = plugintools.find_multiple_matches(data, '<th class="sape">Capitulos</th>(.*?)</table>')
    for entry in matches:
        capis= plugintools.find_multiple_matches(entry, '<td class="sape">(.*?)</td>')
        for entry in capis:
            title_capi = plugintools.find_single_match(entry, 'class="color4">(.*?)</a>')
            url_capi = plugintools.find_single_match(entry, '<a href="([^"]+)')
            plugintools.add_item(action="chapter_urls", title= title_capi, url= url_capi, info_labels = datamovie , page = show , extra = show , thumbnail = thumbnail , fanart = fanart , folder = True, isPlayable = False)
コード例 #5
0
def lstv2():
    params = plugintools.get_params()

    url = params.get("url")
    data = gethttp_referer_headers(url,url)
    
    match_coverage = plugintools.find_single_match(data, 'International Coverage(.*?)<div id="match-lineups" class="match-info hidden">')
    country_match = plugintools.find_multiple_matches(match_coverage, '<div class="row">(.*?)<div class="b_channel col-xs-12 -low b_trim -international">')
    for entry in country_match:
        plugintools.log("entry= "+entry)
        country = plugintools.find_single_match(entry, '<div class="fll b_channel_name -broadcast -country b_trim_inner">(.*?)</div>').replace("&nbsp;", "").strip()
        if country != "":
            channels = ""
            channel = plugintools.find_multiple_matches(entry, '<div class="fll b_channel_name -broadcast b_trim_inner">(.*?)</div>')
            for item in channel:
                if channels == "":
                    channels = item
                else:
                    channels = channels + ', '+item                    

            lstv_file = open(temp + "lstv.tmp", "a")
            lstv_file.write('[COLOR gold][B]'+country+'[/B][/COLOR][COLOR white]: '+channels+'[/COLOR]\n')


    lstv_file.close()
    params["url"] = temp + 'lstv.tmp'
    txt_reader(params)
コード例 #6
0
def themoviedb(title, datamovie):
    plugintools.log("TMD: "+title)
    
    title_fixed = title.replace(" ", "+")
    plugintools.log("title_fixed= "+title_fixed)
    url = 'https://www.themoviedb.org/search?query='+title_fixed+'?language=es'
    plugintools.log("URL= "+url)
    referer = 'https://www.hemoviedb.org/'
    data = gethttp_referer_headers(url,referer)
    plugintools.log("data= "+data)
    matches = plugintools.find_single_match(data, '<ul class="search_results movie">(.*?)</ul>')
    plugintools.log("matches= "+matches)
    title_film = plugintools.find_single_match(matches, 'title="([^"]+)')
    plugintools.log("title_film= "+title_film)
    url_film = plugintools.find_single_match(matches, '<a href="([^"]+)')
    url_film = 'https://www.themoviedb.org/'+url_film+'?language=es'
    plugintools.log("url_film= "+url_film)
    year_film = plugintools.find_single_match(matches, '<span>(.*?)</span>')
    plugintools.log("year_film= "+year_film)
    body = gethttp_referer_headers(url_film,referer)
    plugintools.log("body= "+body)
    sinopsis = plugintools.find_single_match(body, 'itemprop="description">(.*?)</p>')
    datamovie["Plot"]=sinopsis.replace('"',"'")
    plugintools.log("sinopsis= "+sinopsis)
    crew_match = plugintools.find_single_match(body, '<h3>Crew</h3>(.*?)</table>')
    match_director = plugintools.find_single_match(crew_match, '<td class="job">Director:</td>(.*?)</td>')
    director = plugintools.find_multiple_matches(match_director, 'itemprop="name">(.*?)</span>')
    directores = ""
    for match in director:
        if directores == "":
            directores = match
        else:
            directores = directores+", "+match
    datamovie["Director"] = directores
    plugintools.log("director(es)= "+directores)        
    match_writers = plugintools.find_single_match(crew_match, '<td class="job">Writers:</td>(.*?)</td>')
    writers = plugintools.find_multiple_matches(match_director, 'itemprop="name">(.*?)</span>')
    guionistas = ""
    for entry in writers:
        if guionistas == "":
            guionistas = entry
        else:
            guionistas = guionistas+", "+entry
    datamovie["Writer"] = guionistas
    plugintools.log("guionista(s)= "+guionistas)        
    backdrop = plugintools.find_single_match(body, '<meta name="twitter:image" content="([^"]+)')
    datamovie["Fanart"]=backdrop
    plugintools.log("backdrop= "+backdrop)
    match_genres = plugintools.find_single_match(body, '<span id="genres">(.*?)</ul>')
    genres_match = plugintools.find_multiple_matches(match_genres, '<span itemprop="genre">(.*?)</span>')
    generos = ""
    for genero in genres_match:
        if generos == "":
            generos = genero
        else:
            generos = generos+", "+genero
    datamovie["Genre"] = generos
    plugintools.log("generos= "+generos)
コード例 #7
0
def lstv3():
    params=plugintools.get_params()
    title = params.get("title").replace("[COLOR white]", "[COLOR lightgreen]")
    team_a = title.split(" vs ")[0]
    team_b = title.split(" vs ")[1]
    url = 'http://m.livesoccertv.com/match/1709586/olympiakos-piraeus-vs-bayern-m-nchen/'
    data = gethttp_referer_headers(url,url)

    lstv_file = open(temp + "lstv_stats.tmp", "wb")
    lstv_file.write("\n[COLOR red]"+title+"[/COLOR]\n")    
    lstv_file.write("\n[COLOR gold]TITULARES[/COLOR]\n")
            
    stats = plugintools.find_single_match(data, '<span>Stats</span>(.*?)Substitutes</h3>')
    players_a = plugintools.find_multiple_matches(stats, '<div class="fll b_lineup_players b_trim_inner -right">(.*?)</div>')
    players_b = plugintools.find_multiple_matches(stats, '<div class="fll b_lineup_players b_trim_inner -left">(.*?)</div>')
    i = 0
    while i < len(players_a):
        players_a[i]=players_a[i].replace("</span>", "[/COLOR] ").replace('<span class="b_lineup_number">', '[COLOR lightyellow]').rstrip()
        players_b[i]=players_b[i].replace("</span>", "[/COLOR] ").replace('<span class="b_lineup_number">', '[COLOR lightyellow]').rstrip()
        spaces = 80 - len(players_b[i])
        plugintools.log("longitud_texto= "+str(len(players_a[i])))
        plugintools.log("espacios que faltan= "+str(spaces))
        tabulador = ""
        j = spaces
        k = 0 
        while k <= j:
            tabulador = tabulador + "..."
            k = k + 1
        line_player = players_b[i]+tabulador+players_a[i]+'\n'
        lstv_file.write(line_player)
        print line_player
        i = i + 1

    lstv_file.write("\n\n[COLOR gold]SUPLENTES[/COLOR]\n")
    stats = plugintools.find_single_match(data, 'Substitutes</h3>(.*?)<div id="match-stats"')
    players_a = plugintools.find_multiple_matches(stats, '<div class="fll b_lineup_players b_trim_inner -right">(.*?)</div>')
    players_b = plugintools.find_multiple_matches(stats, '<div class="fll b_lineup_players b_trim_inner -left">(.*?)</div>')
    i = 0
    while i < len(players_a):
        players_a[i]=players_a[i].replace("</span>", "[/COLOR] ").replace('<span class="b_lineup_number">', '[COLOR lightyellow]').rstrip()
        players_b[i]=players_b[i].replace("</span>", "[/COLOR] ").replace('<span class="b_lineup_number">', '[COLOR lightyellow]').rstrip()
        spaces = 80 - len(players_b[i])
        tabulador = ""
        j = spaces
        k = 0 
        while k <= j:
            tabulador = tabulador + "..."
            k = k + 1
        line_player = players_b[i]+tabulador+players_a[i]+'\n'
        lstv_file.write(line_player)
        print line_player
        i = i + 1
    
    lstv_file.close()
    params["url"] = temp + 'lstv_stats.tmp'
    txt_reader(params)    
コード例 #8
0
def laligatv(params):
    plugintools.log("[PalcoTV-0.3.0].laligatv.es Playlist Sport Channels( "+repr(params))

    thumbnail = params.get("thumbnail")
    plugintools.log("thumbnail= "+thumbnail)
   
    plugintools.add_item(action="", title = '[B][I][COLOR darkviolet]LALIGATV.ES[/B][/I][/COLOR]', url = "", thumbnail = 'http://files.lfp.es/201402/640x360_06172611noticia-la-liga-tv.es.jpg' , fanart = 'https://fbcdn-sphotos-b-a.akamaihd.net/hphotos-ak-ash3/556377_550288405007723_1790184113_n.jpg' , folder = True, isPlayable = False)
    plugintools.add_item(action="", title = '[B][I][COLOR white]Las emisiones comenzarán 15 minutos antes de cada partido[/B][/I][/COLOR]', url = "", thumbnail = 'http://files.lfp.es/201402/640x360_06172611noticia-la-liga-tv.es.jpg' , fanart = 'https://fbcdn-sphotos-b-a.akamaihd.net/hphotos-ak-ash3/556377_550288405007723_1790184113_n.jpg' , folder = True, isPlayable = False)
    
    url = params.get("url")
    thumbnail = params.get("thumbnail")
    fanart = params.get("fanart")
    title = params.get("title")
    plugintools.log("title= "+title)
    data = plugintools.read(url)
    match_total = plugintools.find_single_match(data, 'id=\"coming-soon\"(.*?)fb-root')
    plugintools.log("match_total= "+match_total)
    matches_dia = plugintools.find_single_match(data, 'id=\"coming-soon\"(.*?)</div></div>')
    plugintools.log("matches_dia= "+matches_dia) 
    jornada = plugintools.find_multiple_matches(match_total, 'class=\"title_jornada\">(.*?)</div>')
    #print 'jornada',jornada       
    matches = plugintools.find_multiple_matches(matches_dia, '<a href="(.*?)</a>')
    plugintools.add_item(action="" , title = '[COLOR lavender][B]' + jornada[0] + '[/B][/COLOR]' , thumbnail = thumbnail , folder = False , isPlayable = False)
    
    for entry in matches:
        plugintools.log("entry= "+entry)
        url_partido = entry.split('"')
        url_partido = url_partido[0]
        url_partido = url_partido.strip()
        plugintools.log("url_partido= "+url_partido)
        hora = plugintools.find_single_match(entry, 'hora_partido_otras_competiciones\">(.*?)</span>')
        plugintools.log("hora= "+hora)
        local = plugintools.find_single_match(entry, 'equipo_local_otras_competiciones\">(.*?)</span>')
        visitante = plugintools.find_single_match(entry, 'equipo_visitante_otras_competiciones\">(.*?)</span>')
        plugintools.log("local= "+local)
        plugintools.log("viistante= "+visitante)
        plugintools.add_item(action="adelante_geturl" , title = '[COLOR lightyellow][B](' + hora + ')[/B][/COLOR][COLOR white] ' + local + ' - ' + visitante + ' [/COLOR]' , url = url_partido , thumbnail = params.get("thumbnail") , folder = False , isPlayable = True)

    if len(jornada) >= 2:
        plugintools.add_item(action="" , title = '[COLOR lavender][B]' + jornada[1] + '[/B][/COLOR]' , thumbnail = thumbnail , folder = False , isPlayable = False)
        matches_dia = plugintools.find_single_match(match_total, jornada[1]+'(.*?)</div></div>')
        plugintools.log("matches_dia= "+matches_dia)
        matches = plugintools.find_multiple_matches(matches_dia, '<a href="(.*?)</a>')
        for entry in matches:
            plugintools.log("entry= "+entry)
            url_partido = entry.split('"')
            url_partido = url_partido[0]
            url_partido = url_partido.strip()
            plugintools.log("url_partido= "+url_partido)
            hora = plugintools.find_single_match(entry, 'hora_partido_otras_competiciones\">(.*?)</span>')
            plugintools.log("hora= "+hora)
            local = plugintools.find_single_match(entry, 'equipo_local_otras_competiciones\">(.*?)</span>')
            visitante = plugintools.find_single_match(entry, 'equipo_visitante_otras_competiciones\">(.*?)</span>')
            plugintools.log("local= "+local)
            plugintools.log("viistante= "+visitante)
            plugintools.add_item(action="adelante_geturl" , title = '[COLOR lightyellow][B](' + hora + ')[/B][/COLOR][COLOR white] ' + local + ' - ' + visitante + ' [/COLOR]' , url = url_partido , thumbnail = params.get("thumbnail") , folder = False , isPlayable = True)       
コード例 #9
0
def get_program(horas, eventos, url):
    epg_channel = []
    body = gethttp_noref(url)
    arena1 = plugintools.find_multiple_matches(body, '<td class=\'text-center strong \'>(.*?)</td>')
    event = plugintools.find_multiple_matches(body, '<td class=\'\'>(.*?)</td></tr>')
    evento_ahora = plugintools.find_single_match(body, '<td class=\'bg-warning\'>(.*?)</td></tr>')
    next_matches = plugintools.find_single_match(body, evento_ahora+'(.*?)</div>')
    evento_luego = plugintools.find_single_match(next_matches, '<td class=\'\'>(.*?)</td></tr>')
    hora_luego = plugintools.find_single_match(next_matches, '<td class=\'text-center strong \'>(.*?)</td>')
    hora_ahora = plugintools.find_single_match(body, 'class=\'text-center strong bg-warning\'>(.*?)</td><td class=\'bg-warning\'>'+evento_ahora)

    epg_channel = hora_ahora,evento_ahora,hora_luego,evento_luego
    return epg_channel    
コード例 #10
0
ファイル: seriesflv.py プロジェクト: franbetis/actualizarkodi
def lista_capis(params):
    plugintools.log('[%s %s] Linker SeriesFlv %s' % (addonName, addonVersion, repr(params)))

    plugintools.add_item(action="",url="",title="[COLOR lightblue][B]Linker SeriesFlv"+version+"[/B][COLOR lightblue]"+sc4+"[I] *** PLD.VisionTV  ***[/I]"+ec4,thumbnail=thumbnail,fanart=fanart,folder=False,isPlayable=False)
    
    url = params.get("url")
    data = jump_cloudflare(url)
    
    logo = plugintools.find_single_match(data,'<img title=".*?src="([^"]+)"')
    if logo =="": logo = thumbnail  
    title = plugintools.find_single_match(data,'<h1 class="off">([^<]+)</h1>').replace('\\','') 
    votos = plugintools.find_single_match(data,'<span id="reviewCount">(.*?)<')
    if votos =="": votos = 'N/D'
    punt = plugintools.find_single_match(data,'<meta itemprop="ratingValue" content="([^"]+)"')
    if punt =="": punt = 'N/D'
    year = plugintools.find_single_match(data,'<td>Año.*?<td>(.*?)</td>')
    if year =="": year = 'N/D'
    bloq_temp =plugintools.find_single_match(data,'<div class="temporadas m1">(.*?)<div id="lista" class="color1 ma1">')
    n_temp = plugintools.find_multiple_matches(bloq_temp,'<a class="color1 on ma1 font2".*?">Temporada(.*?)<')
    n_temp = n_temp[-1].strip()
    if n_temp =="": n_temp = 'N/D'
    bloq_genr = plugintools.find_single_match(data,'<td>Géneros(.*?)</tr>')
    n_genr = plugintools.find_multiple_matches(bloq_genr,'href=".*?">(.*?)<')
    genr = seriesflv_genr(n_genr)
    bloq_pais = plugintools.find_single_match(data,'<td>País </td>(.*?)/td>')
    pais = plugintools.find_multiple_matches(bloq_pais,'<img src=".*?">(.*?)<')
    try:
        pais = pais[-1].strip()
    except: pais = 'N/D'
    sinopsis = plugintools.find_single_match(data,'<p class="color7">(.*?)</p>').replace('\&quot;','"')
    if sinopsis =="": sinopsis = 'N/D'

    datamovie = {
    'season': sc3+'[B]Temporadas Disponibles: [/B]'+ec3+sc+str(n_temp)+', '+ec,
    'votes': sc3+'[B]Votos: [/B]'+ec3+sc+str(votos)+', '+ec,
    'rating': sc3+'[B]Puntuación: [/B]'+ec3+sc+str(punt)+', '+ec,
    'genre': sc3+'[B]Género: [/B]'+ec3+sc+str(genr)+', '+ec,
    'year': sc3+'[B]Año: [/B]'+ec3+sc+str(year)+', '+ec,
    'country': sc3+'[B]País: [/B]'+ec3+sc+str(pais)+'[CR]'+ec,
    'sinopsis': sc3+'[B]Sinopsis: [/B]'+ec3+sc+str(sinopsis)+ec}
    
    datamovie["plot"]=datamovie["season"]+datamovie["votes"]+datamovie["rating"]+datamovie["genre"]+datamovie["year"]+datamovie["country"]+datamovie["sinopsis"]

    plugintools.add_item(action="",url="",title=sc5+"[B]"+title+"[/B]"+ec5,info_labels=datamovie,thumbnail=thumbnail,fanart=fanart,folder=False,isPlayable=False)

    patron_temp = '<a class="color1 on ma1 font2"(.*?)/a>'
    item_temp = re.compile(patron_temp,re.DOTALL).findall(data)
    for temp in item_temp:
        url = plugintools.find_single_match(temp,'href="([^"]+)"')
        name_temp = plugintools.find_single_match(temp,'.html">(.*?)<')
        plugintools.addPeli(action="seriesflv_linker_capit",url=url,title=sc2+name_temp+' >>'+ec2,info_labels=datamovie,thumbnail=logo,fanart=fanart,folder=True,isPlayable=False)
コード例 #11
0
def nfo_reader(title, url):
    data=gethttp_referer_headers(url,referer="")
    datamovie={}
    title=plugintools.find_single_match(data, '<title>([^<]+)')
    datamovie["Title"] = title
    imdb_rating=plugintools.find_single_match(data, '<rating>([^<]+)')
    datamovie["Rating"] = imdb_rating
    top = plugintools.find_single_match(data, '<top250>([^<]+)')
    datamovie["Top250"]=top
    year=plugintools.find_single_match(data, '<year>([^<]+)')
    datamovie["Year"] = year
    votes=plugintools.find_single_match(data, '<votes>([^<]+)')
    datamovie["Votes"] = votes
    sinopsis=plugintools.find_single_match(data, '<plot>([^<]+)')
    datamovie["Plot"] = sinopsis
    tagline=plugintools.find_single_match(data, '<tagline>([^<]+)')
    datamovie["Tagline"] = tagline
    duration=plugintools.find_single_match(data, '<runtime>([^<]+)')
    datamovie["Duration"] = duration
    fanart_matches=plugintools.find_single_match(data, '<fanart>(.*?)</fanart>')
    fanart=plugintools.find_single_match(fanart_matches, '<thumb[^>]+([^<]+)').replace(">", "").strip()
    datamovie["Fanart"] = fanart
    thumbnail=plugintools.find_single_match(data, '<thumb[^>]+([^<]+)').replace(">", "").strip()
    datamovie["Poster"] = thumbnail
    genres=plugintools.find_multiple_matches(data, '<genre>([^<]+)')
    genre_final = []
    for genre in genres:
        genre_final.append(genre)
    datamovie["Genre"] = genre_final
    dir=plugintools.find_single_match(data, '<director>([^<]+)')
    datamovie["Director"] = dir
    trailer=plugintools.find_single_match(data, '<trailer>([^<]+)')
    datamovie["Trailer"] = trailer
    duration=plugintools.find_single_match(data, '<runtime>([^<]+)')
    datamovie["Duration"] = duration
    cast_item=plugintools.find_multiple_matches(data, '<actor>(.*?)</actor>')
    cast_final = []
    for item in cast_item:
        #plugintools.log("item= "+item)
        actor=plugintools.find_single_match(item, '<name>(.*?)</name>')
        cast_final.append(actor)
    datamovie["Cast"]=cast_final
    studio=plugintools.find_single_match(data, '<studio><thumb preview="([^<]+)')
    datamovie["Studio"]=studio
    writers=plugintools.find_multiple_matches(data, '<credits>(.*?)</credits>')
    writers_final=[]
    for item in writers:
        writers_final.append(item)
    datamovie["Writer"]=writers_final
    return datamovie
コード例 #12
0
def serie_capis(params):
    plugintools.log('[%s %s] serie_capis %s' % (addonName, addonVersion, repr(params)))  
    
    datamovie={}
    if params.get("plot") != "":
        datamovie["Plot"]=params.get("plot")  # Cargamos sinopsis de la serie... (si existe)
    else:
        datamovie["Plot"]="."
        
    show = params.get("series_id")  # Obtenemos modo de vista del usuario para series TV
    if show is None:
        show = params.get("page")        
        if show is None:
            show = "tvshows"            
    print show
    plugintools.modo_vista(show)
    
    url = params.get("url")
    referer = 'http://www.seriesyonkis.sx/'
    data = gethttp_referer_headers(url,referer,show)
    show = params.get("series_id")  # Obtenemos modo de vista del usuario para series TV
    if show is None:
        show = params.get("page")
        if show is None:
            show = "tvshows"
    plugintools.log("show= "+show)
    plugintools.modo_vista(show)      
    #plugintools.log("data= "+data)
    
    #Carátula
    cover = plugintools.find_single_match(data, '<img src="([^"]+)')
    match_temporadas = plugintools.find_single_match(data, '<div id="section-content">(.*?)</ul>')
    temps = plugintools.find_multiple_matches(match_temporadas, '<h3 class="season"(.*?)</li>')
    
    for entry in temps:
        capis = plugintools.find_multiple_matches(entry, '<td class="episode-title">(.*?)</td>')
        for entri in capis:
            url_cap = plugintools.find_single_match(entri, '<a href="([^"]+)')
            url_cap = 'http://www.seriesyonkis.sx'+url_cap
            plugintools.log("url_cap= "+url_cap)
            num_cap = plugintools.find_single_match(entri, '<strong>(.*?)</strong>')
            num_cap = num_cap.strip()
            plugintools.log("num_cap= "+num_cap)
            title_cap = plugintools.find_single_match(entri, '</strong>(.*?)</a>')
            title_cap = title_cap.strip()
            plugintools.log("title_cap= "+title_cap)
            title_capi = '[COLOR orange][B]'+num_cap+'[/B][COLOR white]'+title_cap+'[/COLOR]'.strip()
            title_fixed = num_cap + title_cap
            title_fixed = title_fixed.strip()
            plugintools.add_item(action="enlaces_capi", title=title_capi, url = url_cap, thumbnail = cover , plot = datamovie["Plot"], info_labels = datamovie , fanart = fanart, folder = True, page = show, extra = title_fixed , isPlayable = False)
コード例 #13
0
def seriesblanco0(params):
    plugintools.log("[%s %s] SeriesBlanco0 %s" % (addonName, addonVersion, repr(params)))

    show = plugintools.get_setting("series_id")
    if show == "":
        show = "tvshows"
        plugintools.modo_vista(show)
        plugintools.log("show= " + show)

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

    thumbnail = params.get("thumbnail")
    if thumbnail == "":
        thumbnail = "http://seriesblanco.com/imags_estilos/logoblanconavidad2.png"
    fanart = "http://socialgeek.co/wp-content/uploads/2013/06/series-TV-Collage-television-10056729-2560-1600.jpg"

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

    seasons = plugintools.find_multiple_matches(data, "<h2 style='cursor: hand; cursor: pointer;'><u>(.*?)</table>")
    for entry in seasons:
        # plugintools.log("entry= "+entry)
        title_temp = plugintools.find_single_match(entry, "(.*?)</u></h2>")
        chapter = plugintools.find_multiple_matches(entry, "<tr><td>(.*?)</td>")
        for entri in chapter:
            # plugintools.log("entri= "+entri)
            url_chapter = plugintools.find_single_match(entri, "<a href='([^']+)")
            url_chapter = "http://www.seriesblanco.com" + url_chapter
            title_chapter = plugintools.find_single_match(entri, "'>(.*?)</a>")
            plugintools.log("title_chapter=" + title_chapter)
            plugintools.log("url_chapter=" + url_chapter)
            if title_chapter.find("x00") < 0:
                plugintools.add_item(
                    action="seriesblanco1",
                    title=title_chapter,
                    url=url_chapter,
                    thumbnail=thumbnail,
                    info_labels=datamovie,
                    extra=show,
                    page=show,
                    plot=sinopsis,
                    fanart=fanart,
                    folder=True,
                    isPlayable=False,
                )
コード例 #14
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 )
コード例 #15
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 )
コード例 #16
0
def goear_def(url):
    plugintools.log("[%s %s] Goear " % (addonName, addonVersion))

    params = plugintools.get_params()
    thumbnail = params.get("thumbnail")
    title = params.get("title")
    plugintools.add_item(action="", title='[COLOR royalblue][B]'+title+'[/B][/COLOR]', url=url, thumbnail = thumbnail , fanart = fanart , folder = False, isPlayable = True)

    if url.startswith("goear_sg") == True:
        id_playlist = url.replace("goear_sg:", "").replace('"',"").strip()
        url = 'http://www.goear.com/action/sound/get/'+id_playlist
        plugintools.log("url= "+url)
        plugintools.play_resolved_url(url)
    elif url.startswith("goear_pl") == True:
        id_playlist = url.replace("goear_pl:", "").replace('"',"").strip()
        url = 'http://www.goear.com/apps/android/playlist_songs_json.php?v='+id_playlist
        plugintools.log("url= "+url)
        referer = 'http://www.goear.com/'
        data = gethttp_referer_headers(url,referer)

        songs = plugintools.find_multiple_matches(data, '{(.*?)}')
        i = 1
        for entry in songs:
            plugintools.log("entry= "+entry)
            id_song = plugintools.find_single_match(entry, '"id":"([^"]+)')
            plugintools.log("id_song= "+id_song)
            title_song = plugintools.find_single_match(entry, '"title":"([^"]+)')
            plugintools.log("title_song= "+title_song)
            songtime = plugintools.find_single_match(entry, '"songtime":"([^"]+)')
            plugintools.log("songtime= "+songtime)
            url='http://www.goear.com/action/sound/get/'+id_song
            plugintools.log("url= "+url)
            plugintools.add_item(action="play", title='[COLOR lightyellow]'+str(i)+' '+title_song+'[/COLOR][COLOR orange] ('+songtime+')[/COLOR]', url=url, thumbnail = thumbnail , fanart = fanart , folder = False, isPlayable = True)
            i = i + 1
コード例 #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 )
コード例 #18
0
ファイル: default.py プロジェクト: noba3/KoTos
def movies_updates(params):
    plugintools.log("movie4k.movies_updates " + repr(params))

    #plugintools.set_view(plugintools.LIST)

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

    pattern = '<TR id="coverPreview[^<]+'
    pattern += '<TD width="550" id="tdmovies"[^<]+'
    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.movies_updates title=" + title + ", url=" +
                        url + ", thumbnail=" + thumbnail)

        plugintools.add_item(action="single_movie",
                             title=title,
                             url=url,
                             thumbnail=thumbnail,
                             plot=plot,
                             fanart=thumbnail,
                             folder=True)
コード例 #19
0
ファイル: default.py プロジェクト: noba3/KoTos
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)
コード例 #20
0
ファイル: dailymotion.py プロジェクト: codixor/maximumTv
def dailym_getvideo(url):
    plugintools.log("beta.1.dailymotion_videos " + url)

    # Fetch video list from Dailymotion feed
    data = plugintools.read(url)
    #plugintools.log("data= "+data)

    # Extract items from feed
    pattern = ""
    matches = plugintools.find_multiple_matches(data, '{"(.*?)}')

    pattern = '{"(.*?)},{'
    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, 'title":"(.*?)"')
        title = title.replace("\u00e9", "é")
        title = title.replace("\u00e8", "è")
        title = title.replace("\u00ea", "ê")
        title = title.replace("\u00e0", "à")
        video_id = plugintools.find_single_match(entry, 'id":"(.*?)",')
        if video_id:
            plugintools.log("video_id= " + video_id)
            return video_id
コード例 #21
0
ファイル: torrentz.py プロジェクト: corvorepack/REPOULTRA
def torrentz_links(params):
    plugintools.log("[movie.ultra.7k Torrentz links]" + repr(params))

    url = params.get("url")
    referer = 'http://www.torrentz.eu/'
    data = gethttp_referer_headers(url, referer)
    plugintools.log("data= " + data)
    matches = plugintools.find_single_match(
        data, 'Sponsored Link(.*?)<div class="votebox">')
    plugintools.log("matches= " + matches)
    results = plugintools.find_multiple_matches(matches,
                                                '<dl><dt>(.*?)</span>')
    plugintools.add_item(action="",
                         title='[COLOR gold][B]Descargar de... [/B][/COLOR]',
                         url="",
                         thumbnail=thumbnail,
                         fanart=fanart,
                         folder=True,
                         isPlayable=False)
    for entry in results:
        plugintools.log("entry= " + entry)
        url_to_get = plugintools.find_single_match(entry, u'<a href="([^"]+)')
        url_to_get = url_to_get.replace("?", "ñ").replace(
            "%C3%B1", "ñ").replace("espa\xc3\xb1ol", "español").replace(
                "Espa%25C3%25B1ol",
                "Español").replace("espa?ol", "español").replace(
                    "espa\xc3\x91ol",
                    "español").replace("ESPA%25C3%2591OL", "ESPAÑOL")
        plugintools.log("url_to_get= " + url_to_get)
        try:
            server_result = entry.split(">")
            num_items = len(server_result) - 1
            server_result = server_result[num_items]
            if server_result == "":
                if entry.find("kickass") >= 0:
                    server_result = "kickass.to"
                elif entry.find("katproxy") >= 0:
                    server_result = "katproxy.com"
                elif entry.find("monova") >= 0:
                    server_result = "monova.org"
                elif entry.find("limetorrents") >= 0:
                    server_result = "limetorrents"
                elif entry.find("torlock") >= 0:
                    server_result = "torlock.com"
                elif entry.find("bitsnoop") >= 0:
                    server_result = "bitsnoop.com"
                elif entry.find("torrents.net") >= 0:
                    server_result = "torrents.net"
        except:
            pass

        plugintools.log("server_result= " + server_result)
        if url_to_get != "":
            plugintools.add_item(action="torrentz_getmagnet",
                                 title=server_result,
                                 url=url_to_get,
                                 thumbnail=thumbnail,
                                 fanart=fanart,
                                 folder=True,
                                 isPlayable=False)
コード例 #22
0
ファイル: vipracing.py プロジェクト: corvorepack/REPOULTRA
def menu2_vipracing(params):
    #plugintools.log("[tv.ultra.7k-0.3.0].menu2_vipracing "+repr(params))

    menu2 = plugintools.find_single_match(
        body, '<map name="Map2" id="Map2">(.*?)</map>')
    #plugintools.log("menu2= "+menu2)
    matches = plugintools.find_multiple_matches(menu2, 'href=\"(.*?)\"')

    for entry in matches:
        referer = 'http://vipracing.tv/'
        #plugintools.log("Canal: "+entry)

        try:
            # <script type="text/javascript" src="http://www.gameso.tv/embed.php?id=max22a2&width=653&height=410&autoplay=true"></script>
            canal = gethttp_referer_headers(entry, referer)
            url = plugintools.find_single_match(
                canal, 'http://www.direct2watch.com/embed/(.*?)\"')
            url = url.strip()
            ch = plugintools.find_single_match(url, '(.*?)\&')
            width = plugintools.find_single_match(url, 'width=(.*?)\&')
            height = plugintools.find_single_match(url, 'height=(.*?)\&')
            url_vipracing = 'rtmp://watch1.direct2watch.com:1935/direct2watch/ pageUrl=http://www.direct2watch.com/embedplayer.php?width=' + width + '&height=' + height + '&channel=' + ch + '&autoplay=true swfUrl=http://www.direct2watch.com/player/player_embed_iguide.swf referer=' + entry
            plugintools.log("URL direct2watch: " + url_vipracing)
            server = server_vipracing(url_vipracing)
            plugintools.add_item(
                action="launch_rtmp",
                title="[COLOR white]Canal " + str(i) +
                '[/COLOR][COLOR green] [' + server + '][/COLOR]',
                url=url_vipracing,
                thumbnail=
                'https://dl.dropbox.com/s/91wbjnwwwpubxjo/Vipracing.jpg',
                fanart=
                'https://dl.dropbox.com/sh/i4ccoqhgk7k1t2v/AAChTJOeg7LsgPDxxos5NSyva/fondo tv.jpg',
                folder=False,
                isPlayable=True)
            i = i + 1
            if url == "":
                url = plugintools.find_single_match(
                    canal, 'src=\"http://www.gameso.tv/(.*?[^"]+)')
                plugintools.log("Somago encontrado: " + url)
                ch = plugintools.find_single_match(url, '(.*?)\&')
                width = plugintools.find_single_match(url, 'width=(.*?)\&')
                height = plugintools.find_single_match(url, 'height=(.*?)\&')
                url_vipracing = 'rtmp://go.gameso.tv/fasts playpath=' + playpath + ' swfUrl=http://www.gameso.tv/player/player_embed.swf pageUrl=' + url + ' token=#ed%h0#w18723jdsahjkDHFbydmo'
                plugintools.log("URL somago: " + url_vipracing)
                server = server_vipracing(url_vipracing)
                plugintools.add_item(
                    action="launch_rtmp",
                    title="[COLOR white]Canal " + str(i) +
                    '[/COLOR][COLOR green] [' + server + '][/COLOR]',
                    url=url_vipracing,
                    thumbnail=
                    'https://dl.dropbox.com/s/91wbjnwwwpubxjo/Vipracing.jpg',
                    fanart=
                    'https://dl.dropbox.com/sh/i4ccoqhgk7k1t2v/AAChTJOeg7LsgPDxxos5NSyva/fondo tv.jpg',
                    folder=False,
                    isPlayable=True)
                i = i + 1
        except:
            pass
コード例 #23
0
ファイル: vipracing.py プロジェクト: corvorepack/REPOULTRA
def vipr_channels(params):
    thumbnail = 'https://dl.dropbox.com/s/91wbjnwwwpubxjo/Vipracing.jpg'
    fanart = 'https://dl.dropbox.com/sh/i4ccoqhgk7k1t2v/AAChTJOeg7LsgPDxxos5NSyva/fondo tv.jpg'
    url = params.get("url")
    referer = 'http://www.vipracing.org'
    data = gethttp_referer_headers(url, referer)
    match = plugintools.find_single_match(data, 'var channels = (.*?)}}')
    plugintools.log("match= " + match)
    option = plugintools.find_multiple_matches(match,
                                               '"(name|shortcut)":"([^"]+)')
    tit = {}
    for i in range(0, len(option), 2):
        name = option[i][1].replace("\u00f3n",
                                    "on").replace('-', '').replace('\\', '')
        shortcut = option[i + 1][1]
        if name not in tit:
            tit.update({name: 'http://www.vipracing.tv/channel/' + shortcut})
    try:
        from collections import OrderedDict
        tit = OrderedDict(sorted(tit.items()))
    except:
        tit = dict(sorted(tit.items()))
        #possible solution for spmc?!?
    for k, v in tit.iteritems():
        plugintools.add_item(action='geturl_vipracing',
                             title=k,
                             url=v,
                             thumbnail=thumbnail,
                             fanart=fanart,
                             isPlayable=False,
                             folder=False)
コード例 #24
0
def isohunt1_bum(params):
    plugintools.log('[%s %s] [BUM+] Isohunt results... %s' % (addonName, addonVersion, repr(params)))

    thumbnail = 'http://www.userlogos.org/files/logos/dfordesmond/isohunt%201.png'
    fanart = 'http://2.bp.blogspot.com/_NP40rzexJsc/TMGWrixybJI/AAAAAAAAHCU/ij1--_DQEZo/s1600/Keep_Seeding____by_Carudo.jpg' 
    show = 'list'
    plugintools.modo_vista(show)

    #plugintools.add_item(action="", title= '[COLOR blue][B]Iso[/COLOR][COLOR lightblue][I]Hunt[/I][/COLOR]   [/B][COLOR lightyellow][I]By Juarrox[/I][/COLOR]', url = "", thumbnail = thumbnail , fanart = fanart, folder = False, isPlayable = False)    
    url = params.get("url")
    referer = 'https://isohunt.to/'

    data = gethttp_referer_headers(url,referer)  #Todo: Añadir modo de vista (show)
    #plugintools.log("data= "+data)
    matches = plugintools.find_multiple_matches(data, '<tr data-key="(.*?)</td></tr>')    
    for entry in matches:
        plugintools.log("entry= "+entry)
        page_url = plugintools.find_single_match(entry, '<a href="([^"]+)')
        page_url = 'https://isohunt.to'+page_url
        title_url = plugintools.find_single_match(entry, '<span>(.*?)</span>')
        plugintools.log("title_url= "+title_url)
        plugintools.log("page_url= "+page_url)
        size = plugintools.find_single_match(entry, '<td class="size-row">(.*?)</td>')
        plugintools.log("size= "+size)
        seeds = plugintools.find_single_match(entry, '<td class=" sy">(.*?)</td>')
        leechs = '?'
        plugintools.log("seeds= "+seeds)
        category = plugintools.find_single_match(entry, 'title="([^"]+)')
        plugintools.log("category= "+category)
        if entry.find("Verified Torrent") >= 0:
            verified = '[COLOR lightgreen][I][Verified][/I][/COLOR]'
            plugintools.log("verified yes")
            plugintools.add_item(action="isohunt2_bum", title= '[COLOR gold][I]['+seeds+'/'+leechs+'][/I][/COLOR] [COLOR white] '+title_url+' [/COLOR] [COLOR lightyellow][I]['+size + '] [Isohunt][/I][/COLOR]', url = page_url , thumbnail = thumbnail, fanart = fanart, folder = False, isPlayable = True)        
コード例 #25
0
ファイル: dailymotion.py プロジェクト: Jackox/tvmx
def dailym_pl(params):
    plugintools.log("dailym_pl " + repr(params))

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

    dailym_vid = plugintools.find_multiple_matches(data, "{(.*?)}")

    for entry in dailym_vid:
        plugintools.log("entry= " + entry)
        title = plugintools.find_single_match(entry, '"title":"(.*?)",')
        title = title.replace('"', "")
        title = title.replace("\*", "")
        video_id = plugintools.find_single_match(entry, '"id":"(.*?)",')
        thumbnail = "https://api.dailymotion.com/thumbnail/video/" + video_id + ""
        if thumbnail == "":
            thumbnail = "http://image-parcours.copainsdavant.com/image/750/1925508253/4094834.jpg"
        url = "plugin://plugin.video.dailymotion_com/?url=" + video_id + "&mode=playVideo"
        print "url", url
        plugintools.add_item(
            action="play",
            title=title,
            url=url,
            folder=False,
            fanart="http://image-parcours.copainsdavant.com/image/750/1925508253/4094834.jpg",
            thumbnail=thumbnail,
            isPlayable=True,
        )
コード例 #26
0
def peppapig_playlists(params):
    plugintools.log("soritvch.peppapig_playlists " + repr(params))
    data = plugintools.read(params.get("url"))
    plugintools.log("data=" + data)
    pattern = '<h3 class="yt-lockup-title "><a href="(.*?)</h3>'
    plugintools.log("_________matches_________")
    matches = plugintools.find_multiple_matches(data, pattern)

    for entry in matches:
        plugintools.log("=====================================")
        plugintools.log("entry=" + entry)
        video_id = plugintools.find_single_match(entry, 'v=(.*?)" class')
        plugintools.log("video_id=" + video_id)
        title = plugintools.find_single_match(entry, 'dir="ltr">(.*?)</a>')
        title2 = plugintools.find_single_match(entry, '"> -(.*?).</span>')
        title = title + "[COLOR yellow]-" + title2 + "[/COLOR]"
        title = title.replace('&quot;', '"')
        title = title.strip()
        #plot = plugintools.find_single_match(entry,"<summa[^>]+>([^<]+)</summa")
        plot = ""
        #thumbnail = plugintools.find_single_match(entry,"<media\:thumbnail url='([^']+)'")
        thumbnail = "http://img.youtube.com/vi/" + video_id + "/0.jpg"

        url = "plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid=" + video_id
        #plugintools.play_resolved_url( url )
        #if title.find("Pig") != -1:
        plugintools.add_item(action="play",
                             title=title,
                             plot=plot,
                             url=url,
                             thumbnail=thumbnail,
                             isPlayable=False,
                             folder=False)
コード例 #27
0
ファイル: ourmatch.py プロジェクト: corvorepack/REPOULTRA
def ourmatchpartido(params):
    url = params.get("url")
    extra = params.get("extra")
    r = requests.get(url)
    data = r.content

    logo = plugintools.find_single_match(
        data, '<meta property="og:image" content="(.*?)"/>')

    titulo_pantalla(extra, logo, fanart)

    bloque_videos = plugintools.find_single_match(
        data, '<div class="video-tabs-labels">(.*?)<div class="second-row">')
    lista_videos = plugintools.find_multiple_matches(bloque_videos,
                                                     '<li(.*?)</li>')
    plugintools.log(">>>NUMERO DE ENLACES:" + str(len(lista_videos)))
    for video in lista_videos:
        chorrazo = plugintools.find_single_match(
            video, 'data-script-content="(.*?)"')
        titulo = plugintools.find_single_match(
            video, '<a href="#">(.*?)</a>').replace(" <br> ", "").replace(
                "( ", "(").replace(" )", ")")
        titulo1 = titulo[:titulo.find(" (")]
        titulo2 = titulo[titulo.find(" (") + 1:]
        plugintools.log(">>>VIDEO:" + titulo + " --- " + chorrazo)
        plugintools.add_item(action="",
                             title=h2(titulo1) + " " + titulo2,
                             url="",
                             thumbnail=logo,
                             fanart=fanart,
                             folder=False,
                             isPlayable=True)
コード例 #28
0
ファイル: dailymotion.py プロジェクト: codixor/maximumTv
def dailym_pl(params):
    plugintools.log("dailym_pl " + repr(params))

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

    dailym_vid = plugintools.find_multiple_matches(data, '{(.*?)}')

    for entry in dailym_vid:
        plugintools.log("entry= " + entry)
        title = plugintools.find_single_match(entry, '"title":"(.*?)",')
        title = title.replace('"', "")
        title = title.replace('\*', "")
        video_id = plugintools.find_single_match(entry, '"id":"(.*?)",')
        thumbnail = "https://api.dailymotion.com/thumbnail/video/" + video_id + ""
        if thumbnail == "":
            thumbnail = 'http://image-parcours.copainsdavant.com/image/750/1925508253/4094834.jpg'
        url = "plugin://plugin.video.dailymotion_com/?url=" + video_id + "&mode=playVideo"
        print 'url', url
        plugintools.add_item(
            action="play",
            title=title,
            url=url,
            folder=False,
            fanart=
            'http://image-parcours.copainsdavant.com/image/750/1925508253/4094834.jpg',
            thumbnail=thumbnail,
            isPlayable=True)
コード例 #29
0
def youtube_playlists(url):
    plugintools.log('[%s %s].youtube_playlists %s' %
                    (addonName, addonVersion, repr(params)))

    data = plugintools.read(url)

    pattern = ""
    matches = plugintools.find_multiple_matches(data, "<entry(.*?)</entry>")

    for entry in matches:
        plugintools.log("entry=" + entry)

        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='([^']+)'")
        url = plugintools.find_single_match(
            entry,
            "<content type\='application/atom\+xml\;type\=feed' src='([^']+)'/>"
        )
        fanart = art + 'youtube.png'

        plugintools.add_item(action="youtube_videos",
                             title=title,
                             plot=plot,
                             url=url,
                             thumbnail=thumbnail,
                             fanart=fanart,
                             folder=True)
        plugintools.log("fanart= " + fanart)
コード例 #30
0
def extrac_epis(url):

    r = requests.get(url)  #,headers=headers)
    data = r.content
    info_epis = plugintools.find_multiple_matches(
        data, 'number":"(.*?)","title":"(.*?)"')
    return info_epis
コード例 #31
0
def bitsnoop1_bum(params):
    plugintools.log("PalcoTV BitSnoop Results " + repr(params))
    plugintools.log('[%s %s].bitsnoop1_bum %s' %
                    (addonName, addonVersion, repr(params)))

    thumbnail = 'http://upload.wikimedia.org/wikipedia/commons/9/97/Bitsnoop.com_logo.png'
    fanart = 'http://wallpoper.com/images/00/41/86/68/piracy_00418668.jpg'
    show = 'biglist'
    plugintools.modo_vista(show)

    #plugintools.add_item(action="", title= '[COLOR green][B]Bit[/COLOR][COLOR gold][I]Snoop[/I][/COLOR]   [/B][COLOR lightyellow][I]By Juarrox[/I][/COLOR]', url = "", thumbnail = thumbnail , fanart = fanart, folder = False, isPlayable = False)
    url = params.get("url")
    referer = 'https://bitsnoop.com/'

    data = gethttp_referer_headers(url,
                                   referer)  #Todo: Añadir modo de vista (show)
    results = plugintools.find_single_match(
        data, '<ol id="torrents" start="1">(.*?)</ol>')
    matches = plugintools.find_multiple_matches(
        results, '<span class="icon cat_(.*?)</div></td>')
    i = 0
    for entry in matches:
        plugintools.log("entry= " + entry)
        i = i + 1
        print i
        page_url = plugintools.find_single_match(entry, 'a href="([^"]+)')
        title_url = plugintools.find_single_match(entry, 'a href="(.*?)</a>')
        title_url = title_url.replace(page_url, "").replace(
            "<span class=srchHL>", "").replace('">', "").replace(
                "<b class=srchHL>",
                "[COLOR lightyellow][B]").replace("</b>",
                                                  "[/COLOR][/B]").strip()
        page_url = 'http://bitsnoop.com' + page_url
        plugintools.log("title_url= " + title_url)
        plugintools.log("page_url= " + page_url)
        seeders = plugintools.find_single_match(
            entry, 'title="Seeders">(.*?)</span>')
        plugintools.log("seeders= " + seeders)
        leechers = plugintools.find_single_match(
            entry, 'title="Leechers">(.*?)</span>')
        size = plugintools.find_single_match(
            entry,
            '<tr><td align="right" valign="middle" nowrap="nowrap">(.*?)<div class="nfiles">'
        )
        plugintools.log("size= " + size)
        plugintools.log("leechers= " + leechers)
        if seeders == "":  # Verificamos el caso en que no haya datos de seeders/leechers
            seeders = "0"
        if leechers == "":
            leechers = "0"
        stats = '[COLOR gold][I][' + seeders + '/' + leechers + '][/I][/COLOR]'
        plugintools.add_item(action="bitsnoop2_bum",
                             title=stats + '  ' + title_url +
                             ' [COLOR lightgreen][I][' + size +
                             '] [BitSnoop][/I][/COLOR]',
                             url=page_url,
                             thumbnail=thumbnail,
                             fanart=fanart,
                             folder=False,
                             isPlayable=False)
コード例 #32
0
def seriesadicto_linker_epis(params):
    plugintools.log('[%s %s] Linker SeriesBlanco %s' %
                    (addonName, addonVersion, repr(params)))

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

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

    logo = referer + plugintools.find_single_match(
        data, '<img style="width: 240px; height: 360px;" src="([^"]+)"')
    if logo == "": logo = thumbnail
    title = plugintools.find_single_match(data, '<h1>(.*?)</h1>').strip()
    num_epis = plugintools.find_single_match(
        data,
        '<link rel="canonical" href="http://seriesadicto.com/capitulo/.*?/(.*?)/(.*?)/'
    )
    num_epis = num_epis[0] + 'x' + num_epis[1]
    if num_epis == "": num_epis = title

    plugintools.addPeli(action="",
                        url="",
                        title=sc2 + "[B]" + title + "[/B]" + ec2,
                        thumbnail=thumbnail,
                        fanart=fanart,
                        folder=False,
                        isPlayable=False)

    bloq_link = plugintools.find_single_match(data, '<tbody>(.*?)</table>')
    link = plugintools.find_multiple_matches(bloq_link,
                                             '<tr class="(.*?)</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
        url_server = plugintools.find_single_match(item, '<a href="([^"]+)"')
        server = video_analyzer(url_server)
        titlefull = sc + 'Capitulo ' + num_epis + ec + " " + sc2 + lang + ec2 + " " + sc5 + '[I][' + server.title(
        ) + '][/I]' + ec5
        plugintools.addPeli(action=server,
                            url=url_server,
                            title=titlefull,
                            thumbnail=logo,
                            fanart=fanart,
                            folder=False,
                            isPlayable=True)


############################################# By PalcoTv Team ####################################################
コード例 #33
0
ファイル: default.py プロジェクト: noba3/KoTos
def xxx_movies_updates(params):
    plugintools.log("movie4k.xxx_movies_updates " + repr(params))

    #plugintools.set_view(plugintools.LIST)

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

    pattern = '<div style="float. left.">'
    pattern += '<a href="([^"]+)"><img src="([^"]+)" alt="([^"]+)"'
    matches = plugintools.find_multiple_matches(body, pattern)

    for scrapedurl, scrapedthumbnail, scrapedtitle in matches:

        url = urlparse.urljoin(params.get("url"), scrapedurl)
        title = scrapedtitle.strip()
        thumbnail = urlparse.urljoin(params.get("url"), scrapedthumbnail)
        plot = ""
        plugintools.log("movie4k.xxx_movies_updates title=" + title +
                        ", url=" + url + ", thumbnail=" + thumbnail)

        plugintools.add_item(action="single_movie",
                             title=title,
                             url=url,
                             thumbnail=thumbnail,
                             plot=plot,
                             fanart=thumbnail,
                             folder=True)
コード例 #34
0
def seriesflv_linker_servers(params):
    plugintools.log('[%s %s] Linker SeriesFlv %s' % (addonName, addonVersion, repr(params)))

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

    url = params.get("url")
    title_capit = params.get("extra")
    data = cloudflare.request(url)
   
    bloq_cover = plugintools.find_single_match(data,'<div class="portada">(.*?)</div>')
    corver = plugintools.find_single_match(bloq_cover,'src="([^"]+)')
    bloq_server = plugintools.find_single_match(data,'<div id="enlaces">(.*?)</table>')
    server = plugintools.find_multiple_matches(bloq_server, '<img width="20"(.*?)</tr>')
    
    for item in server:       
        lang = plugintools.find_single_match(item,'src="http://www.seriesflv.net/images/lang/(.*?).png"')
        if lang =='es': lang = sc2+'[I][ESP][/I]'+ec2
        elif lang =='la': lang = sc2+'[I][LAT][/I]'+ec2
        elif lang =='en': lang = sc2+'[I][ENG][/I]'+ec2
        elif lang =='sub': lang= sc2+'[I][SUB][/I]'+ec2 
        else: lang = sc2+'[I][N/D][/I]'+ec2
        server_name = plugintools.find_single_match(item,'class="e_server"><img width="16" src="([^"]+)"')
        server_name = server_name.split("domain=")
        server_name = server_name[-1]
        url_redir = plugintools.find_single_match(item,'<td width="84"><a href="([^"]+)"')
        url = getlinkflv(url_redir)#,cookie_ses)
        server = video_analyzer(server_name)
        titlefull = sc+str(title_capit)+ec+' '+str(lang)+'  '+sc5+'[I]['+str(server)+'][/I]'+ec5
        plugintools.addPeli(action=server,url=url,title=titlefull,thumbnail=thumbnail,fanart=fanart,folder=False,isPlayable=True)
コード例 #35
0
ファイル: default.py プロジェクト: noba3/KoTos
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)
コード例 #36
0
def youtube_playlists(params):
    plugintools.log("soritvch.youtube_playlists " + repr(params))

    # Fetch video list from YouTube feed
    data = plugintools.read(params.get("url"))
    plugintools.log("data=" + data)

    # 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='([^']+)'")
        url = plugintools.find_single_match(
            entry,
            "<content type\='application/atom\+xml\;type\=feed' src='([^']+)'/>"
        )

        # Appends a new item to the xbmc item list
        plugintools.add_item(action="youtube_videos",
                             title=title,
                             plot=plot,
                             url=url,
                             thumbnail=thumbnail,
                             folder=True)
コード例 #37
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 )
コード例 #38
0
def Lidl_playlists(params):
    plugintools.log("Lidl_playlists")
    data = plugintools.read(params.get("url"))
    pattern = '<article class="teaser(.*?)class="lazyload"'
    #plugintools.log("pattern="+pattern)
    matches = plugintools.find_multiple_matches(data, pattern)
    for i in matches:
        #plugintools.log("matches = "+i)
        title = plugintools.find_single_match(i, '<img alt="(.*?)"')
        title = replace_html(title)
        #plugintools.log("title = " + title)
        thumbnail = "https://www.lidl.es" + plugintools.find_single_match(
            i, 'src="(.*?)"')
        url = "https://www.lidl.es" + plugintools.find_single_match(
            i, 'href="(.*?)"')
        tplot = plugintools.read(url)
        plot = plugintools.find_single_match(
            tplot, 'textbody--links-brand-primary">(.*?)</div>').strip()
        plot = replace_html(plot)
        plugintools.add_item(action="Lidl_recetas_playlists",
                             title=title,
                             thumbnail=thumbnail,
                             url=url,
                             plot=plot,
                             isPlayable=False,
                             folder=True)
コード例 #39
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 )
コード例 #40
0
def get_program(horas, eventos, url):
    plugintools.log("[tv.ultra.7k-0.3.1].get_program "+url)

    epg_channel = []

    body = gethttp_noref(url)
    arena1 = plugintools.find_multiple_matches(body, '<td class=\'text-center strong \'>(.*?)</td>')
    event = plugintools.find_multiple_matches(body, '<td class=\'\'>(.*?)</td></tr>')
    evento_ahora = plugintools.find_single_match(body, '<td class=\'bg-warning\'>(.*?)</td></tr>')
    next_matches = plugintools.find_single_match(body, evento_ahora+'(.*?)</div>')
    evento_luego = plugintools.find_single_match(next_matches, '<td class=\'\'>(.*?)</td></tr>')
    hora_luego = plugintools.find_single_match(next_matches, '<td class=\'text-center strong \'>(.*?)</td>')
    hora_ahora = plugintools.find_single_match(body, 'class=\'text-center strong bg-warning\'>(.*?)</td><td class=\'bg-warning\'>'+evento_ahora)

    epg_channel = hora_ahora,evento_ahora,hora_luego,evento_luego
    return epg_channel    
コード例 #41
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 )
コード例 #42
0
def torrentone(params):
    plugintools.log("[PalcoTV-0.3.0].Playlist Sport Channels Torrent1( "+repr(params))
    plugintools.add_item(action="", title = '[B][I][COLOR lightyellow]1torrent.tv Acestream Sports Playlist[/B][/I][/COLOR]', url = "", thumbnail = 'http://1torrent.tv/images/header_logo.png' , fanart = 'http://hdwallpappers.com/images/wallpapers/Allianz-Arena-Stadium-wallpaper.jpg' , folder = True, isPlayable = False)    

    url = params.get("url")
    thumbnail = params.get("thumbnail")
    fanart = params.get("fanart")
    title = params.get("title")
    plugintools.log("title= "+title)
    data = plugintools.read(url)
    plugintools.log("data= "+data)
    match = plugintools.find_single_match(data, 'tcon_6(.*?)</a></div></div></div></div>')
    plugintools.log("match sports= "+match)
    matches = plugintools.find_multiple_matches(match, '<a href="(.*?)</a>(.*?)</a>')

    for winy, xiny in matches:
        plugintools.log("winy= "+winy)
        plugintools.log("xiny= "+xiny)
        winy = winy.split("><")
        url = 'http://1torrent.tv' + winy[0]
        url = url.replace('"', "")
        thumbnail = 'http://1torrent.tv/images/header_logo.png'
        title = xiny.split(">")
        title = title[3]
        plugintools.log("title= "+title)
        plugintools.log("url= "+url)
        plugintools.log("thumbnail= "+thumbnail)
        plugintools.add_item(action="gethash_torrentone" , title = title, url = url , thumbnail = thumbnail , fanart = 'http://hdwallpappers.com/images/wallpapers/Allianz-Arena-Stadium-wallpaper.jpg' , isPlayable = True, folder = False)
コード例 #43
0
def program_capis(params):
    plugintools.log("[Goku-0.0.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)
コード例 #44
0
ファイル: default.py プロジェクト: amiosamy/my-plugins
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 )
コード例 #45
0
def tumi(params):
    plugintools.log("[Movies-Online[0.0.1].Tumi "+repr(params))

    data = plugintools.read(params.get("url"))
    
    if "Video is processing now" in data:
        xbmc.executebuiltin("Notification(%s,%s,%i,%s)" % ('Movies-Online', "El archivo está en proceso", 3 , art+'icon.png'))       
    else:
        # Vamos a buscar el ID de la página embebida
        matches = plugintools.find_multiple_matches(data, 'add_my_acc=(.*?)\"')
        for entry in matches:
            print 'match',entry
            # http://tumi.tv/embed-i9l4mr7jph1a.html
            url = 'http://tumi.tv/embed-' + entry + '.html'
            
            # Petición HTTP de esa 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"])
            request_headers.append(["Referer",params.get("url")])
            body,response_headers = plugintools.read_body_and_headers(url, headers=request_headers)
            plugintools.log("body= "+body)
            video_url= plugintools.find_single_match(body, 'file\: \"(.*?)\"')
            plugintools.log("video_url= "+video_url)
            plugintools.add_item(action="play", title= "hola" , url = video_url , folder = False , isPlayable = True)
            plugintools.play_resolved_url(video_url)
コード例 #46
0
def monova1_bum(params):
    plugintools.log('[%s %s].monova1_bum %s' %
                    (addonName, addonVersion, repr(params)))

    thumbnail = 'http://upload.wikimedia.org/wikipedia/en/f/f4/Monova.jpg'
    fanart = 'http://www.gadgethelpline.com/wp-content/uploads/2013/10/Digital-Piracy.png'
    show = 'biglist'
    plugintools.modo_vista(show)

    #plugintools.add_item(action="", title= '[COLOR blue][B]M[/COLOR][COLOR lightblue][I]onova.org[/I][/COLOR]   [/B][COLOR lightyellow][I]By Juarrox[/I][/COLOR]', url = "", thumbnail = thumbnail , fanart = fanart, folder = False, isPlayable = False)
    url = params.get("url")
    referer = 'https://monova.org/'

    data = gethttp_referer_headers(url,
                                   referer)  #Todo: Añadir modo de vista (show)
    plugintools.log("data= " + data)
    block_matches = plugintools.find_single_match(
        data, '<table id="resultsTable"(.*?)<div id="hh"></div>')
    plugintools.log("block_matches= " + block_matches)
    matches = plugintools.find_multiple_matches(
        block_matches, '<div class="torrentname(.*?)</div></td></tr>')
    for entry in matches:
        plugintools.log("entry= " + entry)
        if entry.find(
                "Direct Download"
        ) >= 0:  # Descartamos resultados publicitarios 'Direct Download' que descargan un .exe
            plugintools.log("Direct Download = Yes")
        else:
            plugintools.log("Direct Download = No")
            page_url = plugintools.find_single_match(entry, 'a href="([^"]+)')
            title_url = plugintools.find_single_match(entry, 'title="([^"]+)')
            size_url = plugintools.find_single_match(
                entry, '<div class="td-div-right pt1">(.*?)</div>')
            seeds = plugintools.find_single_match(
                entry, '<td class="d">(.*?)<td align="right" id="encoded-')
            seeds = seeds.replace("</td>", "")
            seeds = seeds.split('<td class="d">')
            #seeds = seeds.replace('<td align="right" id="encoded-10"', "")
            #seeds = seeds.replace('<td id="encoded-10" align="right"', "")
            try:
                print 'seeds', seeds
                if len(seeds) >= 2:
                    semillas = '[COLOR gold][I][' + seeds[0] + '/' + seeds[
                        1] + '][/I][/COLOR]'
                    plugintools.log("semillas= " + semillas)
            except:
                pass

            plugintools.log("page_url= " + page_url)
            plugintools.log("title_url= " + title_url)
            plugintools.log("size_url= " + size_url)
            plugintools.add_item(action="monova2_bum",
                                 title=semillas + '  ' + title_url +
                                 ' [COLOR lightgreen][I][ ' + size_url +
                                 '][/I][/COLOR] ',
                                 url=page_url,
                                 thumbnail=thumbnail,
                                 fanart=fanart,
                                 folder=True,
                                 isPlayable=False)
コード例 #47
0
ファイル: default.py プロジェクト: salimkov/my-plugins
def main_list(params):
    plugintools.log("VolterraChannel.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 )
コード例 #48
0
ファイル: torrentz.py プロジェクト: corvorepack/REPOULTRA
def torrentz_getmagnet(params):
    plugintools.log("movie.ultra.7k torrentz_getmagnet " + repr(params))

    url = params.get("url")
    if url.find("kickass") >= 0:
        referer = "http://www.kickass.to"
    elif url.find("katproxy") >= 0:
        referer = "http://www.katproxy.com"
    elif url.find("monova") >= 0:
        referer = "http://www.monova.org"
    elif url.find("limetorrents") >= 0:
        referer = "http://www.limetorrents"
    elif url.find("torlock") >= 0:
        referer = "http://www.torlock.com"
    elif url.find("bitsnoop") >= 0:
        referer = "http://www.bitsnoop.com"
    elif url.find("torrents.net") >= 0:
        referer = "http://www.torrents.net"
    else:
        referer = 'http://www.torrentz.eu/'
    data = gethttp_referer_headers(url, referer)
    plugintools.log("data= " + data)

    magnet = plugintools.find_multiple_matches(data, 'magnet:?(.*?)"')
    for entry in magnet:
        entry = 'magnet:' + entry
        if entry.find("xt=urn:btih:") >= 0:
            plugintools.add_item(action="launch_torrent",
                                 title=params.get("title"),
                                 url=entry,
                                 folder=False,
                                 isPlayable=False)
コード例 #49
0
ファイル: multilink.py プロジェクト: Jackox/tvmx
def youtube_videos(url):
    plugintools.log('[%s %s].youtube_videos %s' % (addonName, addonVersion, url))	
    
    # Fetch video list from YouTube feed
    data = plugintools.read(url)
    plugintools.log("data= "+data)
    
    # 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>")
        title = title.replace("I Love Handball | ","")
        plot = plugintools.find_single_match(entry,"<summa[^>]+>([^<]+)</summa")
        thumbnail = plugintools.find_single_match(entry,"<media\:thumbnail url='([^']+)'")
        fanart = art+'youtube.png'
        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 , fanart=fanart , isPlayable=True, folder=False )
コード例 #50
0
ファイル: default.py プロジェクト: c0ns0le/YCBuilds
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 )
コード例 #51
0
def youtube_videos(params):
    plugintools.log("soritvch.youtube_videos " + repr(params))

    # Fetch video list from YouTube feed
    data = plugintools.read(params.get("url"))
    plugintools.log("data=" + data)

    # 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>")
        title = title.replace("Disney Junior España | ", "")
        plot = plugintools.find_single_match(entry,
                                             "<summa[^>]+>([^<]+)</summa")
        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)
コード例 #52
0
ファイル: default.py プロジェクト: c0ns0le/YCBuilds
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 )
コード例 #53
0
ファイル: jkanime.py プロジェクト: corvorepack/REPOULTRA
def jkanime_videopeli(params):
    
    url = params.get("url")
    r = requests.get(url)
    data = r.content
    
    bloq_info = plugintools.find_single_match(data,'<div class="cont_top"></div>(.*?)<div id="footer">')
    logo = plugintools.find_single_match(bloq_info,'<img title=".*?src="([^"]+)"')
    if logo =="": logo = thumbnail 
    title = plugintools.find_single_match(bloq_info,'<div  class="sinopsis_title title21">([^<]+)</div>').upper().strip()
    estado = plugintools.find_single_match(bloq_info,'<div><span class="labl">Estado:</span>.*?">([^<]+)</span>').strip()
    if estado =="": estado = 'N/D'
    genrfull = plugintools.find_multiple_matches(bloq_info,'http://jkanime.net/genero/(.*?)/')
    genr = jkanime_genr(genrfull)
    year = plugintools.find_single_match(bloq_info,'<div><span class="labl">Emitido:</span>.*?">(.*?)</span>').strip().replace('<br/>','')
    if year =="": year = 'N/D'
    duration = plugintools.find_single_match(bloq_info,'<div><span class="labl">Duracion:</span>.*?">([^<]+)</span>').strip().replace('<br/>','')
    if duration =="": duration = 'N/D'
    url_vid = plugintools.find_single_match(bloq_info,'<div class="listbox".*?<a href="([^"]+)"')
    sinopsis = plugintools.find_single_match(bloq_info,'<div class="sinoptext">\s+<p>(.*?)</p>').strip().replace('<br/>','')

    titlefull = sc5+'[B]'+title+'[/B]'+ec5+sc+'  Estado: '+ec+sc3+'[I]('+estado+')[/I]'+ec3

    datamovie = {
    'genre': sc3+'[B]Género: [/B]'+ec3+sc+str(genr)+', '+ec,
    'duration': sc3+'[B]Duración: [/B]'+ec3+sc+str(duration)+', '+ec,
    'year': sc3+'[B]Fecha de Inicio: [/B]'+ec3+sc+str(year)+'[CR]'+ec,
    'sinopsis': sc3+'[B]Sinopsis: [/B]'+ec3+sc+str(sinopsis)+ec}
    datamovie["plot"] = datamovie["genre"]+datamovie["duration"]+datamovie["year"]+datamovie["sinopsis"]

    datamovie_pass = genr+'|'+duration+'|'+year+'|'+sinopsis
    params["url"] = url_vid; params["extra"] = datamovie_pass; params["thumbnail"] = logo; params["title"] = titlefull #Cogiendo los parametros necesarios
    jkanime_resolverlink(params)
コード例 #54
0
def latuerka_menu(params):
    plugintools.log("[PalcoTV] La Tuerka Parser( " + repr(params))
    plugintools.add_item(
        action="",
        title='[B][I][COLOR lightyellow]LaTuerka Videos[/B][/I][/COLOR]',
        url="",
        folder=True,
        isPlayable=False)

    url = params.get("url")
    data = plugintools.read(url)
    #plugintools.log("data= "+data)
    menu = plugintools.find_single_match(data,
                                         '<ul class="menu-tuerka">(.*?)</ul>')
    #plugintools.log("menu_latuerka= "+menu)
    items_menu = plugintools.find_multiple_matches(menu, '<a href=([^<]+)</a>')

    for entry in items_menu:
        #plugintools.log("item= "+entry)
        entry = entry.split(">")
        url_program = entry[0]
        title_program = entry[1]
        url_program = url_program.replace('"', "")
        url_program = 'http://www.publico.es' + url_program
        plugintools.log("title_program= " + title_program)
        plugintools.log("url_program= " + url_program)
        plugintools.add_item(action="program_capis",
                             title=title_program,
                             url=url_program,
                             thumbnail='http://www.latuerka.net/img/logo.png',
                             fanart='http://www.latuerka.net/img/bg.jpg',
                             folder=True,
                             isPlayable=False)
コード例 #55
0
def dailym_getvideo(url):
    plugintools.log("palcoTV.dailymotion_videos "+url)

    # Fetch video list from Dailymotion feed
    data = plugintools.read(url)
    #plugintools.log("data= "+data)
    
    # Extract items from feed
    pattern = ""
    matches = plugintools.find_multiple_matches(data,'{"(.*?)}')

    pattern = '{"(.*?)},{'
    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,'title":"(.*?)"')
        title = title.replace("\u00e9" , "é")
        title = title.replace("\u00e8" , "è")
        title = title.replace("\u00ea" , "ê")
        title = title.replace("\u00e0" , "à")
        video_id = plugintools.find_single_match(entry,'id":"(.*?)",')
        if video_id:
            plugintools.log("video_id= "+video_id)
            return video_id
コード例 #56
0
ファイル: scrape.py プロジェクト: corvorepack/REPOULTRA
def lsstv(params):
    thumbnail = params.get("thumbnail")
    fanart = params.get("fanart")
    data = plugintools.read(
        "http://www.livesportstreams.tv/sidebar.php?top=1&type=1&l=es")
    grups = '<span\sid="span_link_sidebar.*?(\(.*?\)).*?<\/span>'
    grups = plugintools.find_multiple_matches(data, grups)
    grups = list(set(grups))
    grup = []
    for i in range(1, len(grups)):
        a = grups[i].replace("1, ", "").split("'")
        grup += ([a[1], a[7], a[9]])
    j = 0
    for j in range(len(grup)):
        if j % 3 == 0:
            sport = grup[j]
        elif j % 3 == 1:
            link = "http://www.livesportstreams.tv/events.php?top=1&type=1&l=es&" + grup[
                j]
            plugintools.add_item(action="lsstv1",
                                 title=sport,
                                 url=link,
                                 thumbnail=thumbnail,
                                 isPlayable=False,
                                 folder=True)
            #print "sport="+grup[j];j+=1;print "link="+grup[j];j+=1;print "nrevnt="+grup[j];j+=1;
        else:
            sport = sport + ' (' + grup[j] + 'partidos)'
コード例 #57
0
def YOUTUBE_CHANNELS(url):
    find_url=url.find('?')+1
    keep_url=url[:find_url]
    
    iconimage=""
    req = urllib2.Request(url)
    req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
    response = urllib2.urlopen(req)
    link=response.read()
    response.close()

    # Extract items from feed
    pattern = ""
    matches = plugintools.find_multiple_matches(link,"<entry>(.*?)</entry>")
    
    for entry in matches:
        
        # Not the better way to parse XML, but clean and easy
        title = plugintools.find_single_match(entry,"<titl[^>]+>([^<]+)</title>").replace("&amp;","&")
        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\=([^\&]+)\&").replace("&amp;","&")
        play_url = "plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid="+video_id

        plugintools.add_item( action="play" , title=title , plot=plot , url=play_url ,thumbnail=thumbnail , folder=True )
    
    # Calculates next page URL from actual URL
    start_index = int( plugintools.find_single_match( link ,"start-index=(\d+)") )
    max_results = int( plugintools.find_single_match( link ,"max-results=(\d+)") )
    next_page_url = keep_url+"start-index=%d&max-results=%d" % ( start_index+max_results , max_results)

    addDir(">> Next page",next_page_url,13,"")
コード例 #58
0
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            
コード例 #59
0
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)
コード例 #60
0
def tumi(params):
    plugintools.log("[PalcoTV[0.3.0].Tumi " + repr(params))

    data = plugintools.read(params.get("url"))

    if "Video is processing now" in data:
        xbmc.executebuiltin(
            "Notification(%s,%s,%i,%s)" %
            ('PalcoTV', "El archivo está en proceso", 3, art + 'icon.png'))
    else:
        # Vamos a buscar el ID de la página embebida
        matches = plugintools.find_multiple_matches(data, 'add_my_acc=(.*?)\"')
        for entry in matches:
            print 'match', entry
            # http://tumi.tv/embed-i9l4mr7jph1a.html
            url = 'http://tumi.tv/embed-' + entry + '.html'

            # Petición HTTP de esa 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"
            ])
            request_headers.append(["Referer", params.get("url")])
            body, response_headers = plugintools.read_body_and_headers(
                url, headers=request_headers)
            plugintools.log("body= " + body)
            video_url = plugintools.find_single_match(body, 'file\: \"(.*?)\"')
            plugintools.log("video_url= " + video_url)
            plugintools.add_item(action="play",
                                 title="hola",
                                 url=video_url,
                                 folder=False,
                                 isPlayable=True)
            plugintools.play_resolved_url(video_url)