Ejemplo n.º 1
0
def info(item):
    logger.info()
    itemlist = []
    url = item.url
    id = item.extra
    if "serie" in item.url:
        try:
            rating_tmdba_tvdb = item.extra.split("|")[6]
            if item.extra.split("|")[6] == "":
                rating_tmdba_tvdb = "Sin puntuación"
        except:
            rating_tmdba_tvdb = "Sin puntuación"
    else:
        rating_tmdba_tvdb = item.extra.split("|")[3]
    rating_filma = item.extra.split("|")[4]
    print "eztoquee"
    print rating_filma
    print rating_tmdba_tvdb

    filma = "http://s6.postimg.org/6yhe5fgy9/filma.png"

    try:
        if "serie" in item.url:
            title = item.extra.split("|")[8]

        else:
            title = item.extra.split("|")[6]
        title = title.replace("%20", " ")
        title = "[COLOR yellow][B]" + title + "[/B][/COLOR]"
    except:
        title = item.title

    try:
        if "." in rating_tmdba_tvdb:
            check_rat_tmdba = scrapertools.get_match(rating_tmdba_tvdb,
                                                     '(\d+).')
        else:
            check_rat_tmdba = rating_tmdba_tvdb
        if int(check_rat_tmdba) >= 5 and int(check_rat_tmdba) < 8:
            rating = "[COLOR springgreen][B]" + rating_tmdba_tvdb + "[/B][/COLOR]"
        elif int(check_rat_tmdba) >= 8 or rating_tmdba_tvdb == 10:
            rating = "[COLOR yellow][B]" + rating_tmdba_tvdb + "[/B][/COLOR]"
        else:
            rating = "[COLOR crimson][B]" + rating_tmdba_tvdb + "[/B][/COLOR]"
            print "lolaymaue"
    except:
        rating = "[COLOR crimson][B]" + rating_tmdba_tvdb + "[/B][/COLOR]"
    if "10." in rating:
        rating = re.sub(r'10\.\d+', '10', rating)
    try:
        check_rat_filma = scrapertools.get_match(rating_filma, '(\d)')
        print "paco"
        print check_rat_filma
        if int(check_rat_filma) >= 5 and int(check_rat_filma) < 8:
            print "dios"
            print check_rat_filma
            rating_filma = "[COLOR springgreen][B]" + rating_filma + "[/B][/COLOR]"
        elif int(check_rat_filma) >= 8:

            print check_rat_filma
            rating_filma = "[COLOR yellow][B]" + rating_filma + "[/B][/COLOR]"
        else:
            rating_filma = "[COLOR crimson][B]" + rating_filma + "[/B][/COLOR]"
            print "rojo??"
            print check_rat_filma
    except:
        rating_filma = "[COLOR crimson][B]" + rating_filma + "[/B][/COLOR]"

    if not "serie" in item.url:
        url_plot = "http://api.themoviedb.org/3/movie/" + item.extra.split(
            "|"
        )[1] + "?api_key=2e2160006592024ba87ccdf78c28f49f&append_to_response=credits&language=es"
        data_plot = scrapertools.cache_page(url_plot)
        plot = scrapertools.find_single_match(data_plot, '"overview":"(.*?)",')
        tagline = scrapertools.find_single_match(data_plot,
                                                 '"tagline":(".*?")')
        if plot == "":
            plot = item.show.split("|")[2]

        plot = "[COLOR moccasin][B]" + plot + "[/B][/COLOR]"
        plot = re.sub(r"\\", "", plot)

    else:
        plot = item.show.split("|")[2]
        plot = "[COLOR moccasin][B]" + plot + "[/B][/COLOR]"
        plot = re.sub(r"\\", "", plot)

        if item.extra.split("|")[7] != "":
            tagline = item.extra.split("|")[7]
            # tagline= re.sub(r',','.',tagline)
        else:
            tagline = ""

    if "serie" in item.url:
        check2 = "serie"
        icon = "http://s6.postimg.org/hzcjag975/tvdb.png"
        foto = item.show.split("|")[1]
        if item.extra.split("|")[5] != "":
            critica = item.extra.split("|")[5]
        else:
            critica = "Esta serie no tiene críticas..."
        if not ".png" in item.extra.split("|")[0]:
            photo = "http://imgur.com/6uXGkrz.png"
        else:
            photo = item.extra.split("|")[0].replace(" ", "%20")
        try:
            tagline = "[COLOR aquamarine][B]" + tagline + "[/B][/COLOR]"
        except:
            tagline = ""

    else:
        critica = item.extra.split("|")[5]
        if "%20" in critica:
            critica = "No hay críticas"
        icon = "http://imgur.com/SenkyxF.png"
        photo = item.extra.split("|")[0].replace(" ", "%20")
        foto = item.show.split("|")[1]
        try:
            if tagline == "\"\"":
                tagline = " "
        except:
            tagline = " "
        tagline = "[COLOR aquamarine][B]" + tagline + "[/B][/COLOR]"
        check2 = "pelicula"

    # Tambien te puede interesar
    peliculas = []
    if "serie" in item.url:

        url_tpi = "http://api.themoviedb.org/3/tv/" + item.show.split(
            "|"
        )[5] + "/recommendations?api_key=2e2160006592024ba87ccdf78c28f49f&language=es"
        data_tpi = scrapertools.cachePage(url_tpi)
        tpi = scrapertools.find_multiple_matches(
            data_tpi,
            'id":(.*?),.*?"original_name":"(.*?)",.*?"poster_path":(.*?),')

    else:
        url_tpi = "http://api.themoviedb.org/3/movie/" + item.extra.split(
            "|"
        )[1] + "/recommendations?api_key=2e2160006592024ba87ccdf78c28f49f&language=es"
        data_tpi = scrapertools.cachePage(url_tpi)
        tpi = scrapertools.find_multiple_matches(
            data_tpi,
            'id":(.*?),.*?"original_title":"(.*?)",.*?"poster_path":(.*?),')

    for idp, peli, thumb in tpi:

        thumb = re.sub(r'"|}', '', thumb)
        if "null" in thumb:
            thumb = "http://s6.postimg.org/tw1vhymj5/noposter.png"
        else:
            thumb = "https://image.tmdb.org/t/p/original" + thumb
        peliculas.append([idp, peli, thumb])

    check2 = check2.replace("pelicula", "movie").replace("serie", "tvshow")
    infoLabels = {
        'title': title,
        'plot': plot,
        'thumbnail': photo,
        'fanart': foto,
        'tagline': tagline,
        'rating': rating
    }
    item_info = item.clone(info=infoLabels,
                           icon=icon,
                           extra=id,
                           rating=rating,
                           rating_filma=rating_filma,
                           critica=critica,
                           contentType=check2,
                           thumb_busqueda="http://imgur.com/kdfWEJ6.png")
    from channels import infoplus
    infoplus.start(item_info, peliculas)
Ejemplo n.º 2
0
def info(item):
    logger.info("pelisalacarta.pasateatorrent info")
    itemlist = []
    url=item.url
    id = item.extra
    
    if "serie" in item.url:
     try:
        rating_tmdba_tvdb=item.extra.split("|")[6]
        if item.extra.split("|")[6]== "":
            rating_tmdba_tvdb= "Sin puntuación"
     except:
          rating_tmdba_tvdb= "Sin puntuación"
    else:
        rating_tmdba_tvdb=item.extra.split("|")[3]
    rating_filma=item.extra.split("|")[4]
    print "eztoquee"
    print rating_filma
    print rating_tmdba_tvdb

    filma="http://s6.postimg.org/6yhe5fgy9/filma.png"

    try:
      if "serie" in item.url:
          title= item.extra.split("|")[8]
      
      else:
         title= item.extra.split("|")[6]
      title = title.replace("%20"," ")
      title = "[COLOR yellow][B]"+title+"[/B][/COLOR]"
    except:
      title = item.title

    try:
       if "." in rating_tmdba_tvdb:
          check_rat_tmdba= scrapertools.get_match(rating_tmdba_tvdb,'(\d+).')
       else:
          check_rat_tmdba=rating_tmdba_tvdb
       if int(check_rat_tmdba) >= 5 and int(check_rat_tmdba) < 8:
          rating = "[COLOR springgreen][B]"+rating_tmdba_tvdb+"[/B][/COLOR]"
       elif int(check_rat_tmdba) >= 8 or rating_tmdba_tvdb == 10:
            rating = "[COLOR yellow][B]"+rating_tmdba_tvdb+"[/B][/COLOR]"
       else:
           rating = "[COLOR crimson][B]"+rating_tmdba_tvdb+"[/B][/COLOR]"
           print "lolaymaue"
    except:
        rating = "[COLOR crimson][B]"+rating_tmdba_tvdb+"[/B][/COLOR]"
    if "10." in rating:
        rating = re.sub(r'10\.\d+','10',rating)
    try:
       check_rat_filma= scrapertools.get_match(rating_filma,'(\d)')
       print "paco"
       print check_rat_filma
       if int(check_rat_filma) >= 5 and int(check_rat_filma) < 8:
          print "dios"
          print check_rat_filma
          rating_filma = "[COLOR springgreen][B]"+rating_filma+"[/B][/COLOR]"
       elif int(check_rat_filma) >=8:
          
          print check_rat_filma
          rating_filma = "[COLOR yellow][B]"+rating_filma+"[/B][/COLOR]"
       else:
          rating_filma = "[COLOR crimson][B]"+rating_filma+"[/B][/COLOR]"
          print "rojo??"
          print check_rat_filma
    except:
          rating_filma = "[COLOR crimson][B]"+rating_filma+"[/B][/COLOR]"



    try:
      if not "serie" in item.url:
        url_plot = "http://api.themoviedb.org/3/movie/"+item.extra.split("|")[1]+"?api_key="+api_key+"&append_to_response=credits&language=es"
        data_plot= httptools.downloadpage(url_plot).data
        plot,tagline = scrapertools.find_single_match(data_plot, '"overview":"(.*?)",.*?"tagline":(".*?")')
        if plot== "":
            plot = item.show.split("|")[2]
        
        plot = "[COLOR moccasin][B]"+plot+"[/B][/COLOR]"
        plot= re.sub(r"\\","",plot)

      else:
        plot = item.show.split("|")[2]
        plot = "[COLOR moccasin][B]"+plot+"[/B][/COLOR]"
        plot= re.sub(r"\\","",plot)
        
        if item.extra.split("|")[7] != "":
           tagline = item.extra.split("|")[7]
           #tagline= re.sub(r',','.',tagline)
        else:
           tagline = ""
    except:
        title = "[COLOR red][B]LO SENTIMOS...[/B][/COLOR]"
        plot = "Esta pelicula no tiene informacion..."
        plot = plot.replace(plot,"[COLOR yellow][B]"+plot+"[/B][/COLOR]")
        photo="http://s6.postimg.org/nm3gk1xox/noinfosup2.png"
        foto ="http://s6.postimg.org/ub7pb76c1/noinfo.png"
        info =""
        rating=""
        rating_filam=""
        



    if "serie" in item.url:
        check2="serie"
        
        icon ="http://s6.postimg.org/hzcjag975/tvdb.png"
        foto= item.show.split("|")[1]
        if not "image.tmdb" in foto:
           foto =""
        if item.extra.split("|")[5] !="":
           critica =item.extra.split("|")[5]
        else:
           critica= "Esta serie no tiene críticas..."

        photo= item.extra.split("|")[0].replace(" ","%20")
        if not ".png" in photo:
           photo= ""
        try:
         tagline = "[COLOR aquamarine][B]"+tagline+"[/B][/COLOR]"
        except:
         tagline = ""

    else:
        
        critica =item.extra.split("|")[5]
        if "%20" in critica:
            critica= "No hay críticas"
        icon ="http://imgur.com/SenkyxF.png"
        
        photo= item.extra.split("|")[0].replace(" ","%20")
        foto = item.show.split("|")[1]


        try:
         if tagline == "\"\"":
            tagline = " "
        except:
            tagline= " "
        tagline = "[COLOR aquamarine][B]"+tagline+"[/B][/COLOR]"
        check2= "pelicula"
    #Tambien te puede interesar
    peliculas = []
    if "serie" in item.url:
      
      
      url_tpi="http://api.themoviedb.org/3/tv/"+item.show.split("|")[5]+"/recommendations?api_key="+api_key+"&language=es"
      data_tpi=httptools.downloadpage(url_tpi).data
      tpi=scrapertools.find_multiple_matches(data_tpi,'id":(.*?),.*?"original_name":"(.*?)",.*?"poster_path":(.*?),"popularity"')

    else:
      url_tpi="http://api.themoviedb.org/3/movie/"+item.extra.split("|")[1]+"/recommendations?api_key="+api_key+"&language=es"
      data_tpi=httptools.downloadpage(url_tpi).data
      tpi=scrapertools.find_multiple_matches(data_tpi,'id":(.*?),.*?"original_title":"(.*?)",.*?"poster_path":(.*?),"popularity"')

            
    for idp,peli,thumb in tpi:
            
        thumb =re.sub(r'"|}','',thumb)
        if "null" in thumb:
            thumb = "http://s6.postimg.org/tw1vhymj5/noposter.png"
        else:
            thumb ="https://image.tmdb.org/t/p/original"+thumb
        peliculas.append([idp,peli,thumb])
    


    check2 = check2.replace("pelicula", "movie").replace("serie", "tvshow")
    infoLabels = {'title': title, 'plot': plot, 'thumbnail': photo, 'fanart': foto, 'tagline': tagline, 'rating': rating}
    item_info = item.clone(info=infoLabels, icon=icon, extra=id, rating=rating, rating_filma=rating_filma, critica=critica, contentType=check2, thumb_busqueda="http://imgur.com/zKjAjzB.png")
    from channels import infoplus
    infoplus.start(item_info, peliculas)
Ejemplo n.º 3
0
def info(item):
    logger.info("pelisalacarta.torrentlocura info")
    itemlist = []
    url=item.url
    rating_tmdba_tvdb=item.extra.split("|")[0]
    if item.extra.split("|")[6]== "":
            rating_tmdba_tvdb= "Sin puntuación"
    rating_filma=item.extra.split("|")[1]
    filma="http://s6.postimg.org/6yhe5fgy9/filma.png"
    title= item.extra.split("|")[3]
    title = title.replace("%20"," ")
    try:
       if "." in rating_tmdba_tvdb:
          check_rat_tmdba= scrapertools.get_match(rating_tmdba_tvdb,'(\d+).')
       else:
          check_rat_tmdba=rating_tmdba_tvdb
       if int(check_rat_tmdba) >= 5 and int(check_rat_tmdba) < 8:
          rating = "[COLOR springgreen][B]"+rating_tmdba_tvdb+"[/B][/COLOR]"
       elif int(check_rat_tmdba) >= 8 or rating_tmdba_tvdb == 10:
            rating = "[COLOR yellow][B]"+rating_tmdba_tvdb+"[/B][/COLOR]"
       else:
           rating = "[COLOR crimson][B]"+rating_tmdba_tvdb+"[/B][/COLOR]"
           print "lolaymaue"
    except:
        rating = "[COLOR crimson][B]"+rating_tmdba_tvdb+"[/B][/COLOR]"
    if "10." in rating:
        rating = re.sub(r'10\.\d+','10',rating)
    try:
       check_rat_filma= scrapertools.get_match(rating_filma,'(\d)')
       print "paco"
       print check_rat_filma
       if int(check_rat_filma) >= 5 and int(check_rat_filma) < 8:
          print "dios"
          print check_rat_filma
          rating_filma = "[COLOR springgreen][B]"+rating_filma+"[/B][/COLOR]"
       elif int(check_rat_filma) >=8:
          
          print check_rat_filma
          rating_filma = "[COLOR yellow][B]"+rating_filma+"[/B][/COLOR]"
       else:
          rating_filma = "[COLOR crimson][B]"+rating_filma+"[/B][/COLOR]"
          print "rojo??"
          print check_rat_filma
    except:
          rating_filma = "[COLOR crimson][B]"+rating_filma+"[/B][/COLOR]"
    plot = item.extra.split("|")[6]
    plot = "[COLOR moccasin][B]"+plot+"[/B][/COLOR]"
    plot= re.sub(r"\\|<br />","",plot)
    if item.extra.split("|")[5] != "":
        tagline = item.extra.split("|")[5]
        if tagline == "\"\"":
            tagline = " "
        tagline = "[COLOR aquamarine][B]"+tagline+"[/B][/COLOR]"
    else:
        tagline = ""
    if item.contentType!="movie":
        icon ="http://s6.postimg.org/hzcjag975/tvdb.png"
    else:
        icon ="http://imgur.com/SenkyxF.png"
       
    foto= item.extra.split("|")[9]
    if not "tmdb" in foto:
       foto=""
    if item.extra.split("|")[7] !="":
        critica =item.extra.split("|")[7]
    else:
        critica= "Esta serie no tiene críticas..."
        
    photo= item.extra.split("|")[8].replace(" ","%20")
    if ".jpg" in photo:
        photo=""
    #Tambien te puede interesar
    peliculas = []
    if item.contentType !="movie":
      url_tpi="http://api.themoviedb.org/3/tv/"+item.extra.split("|")[2]+"/recommendations?api_key="+api_key+"&language=es"
      data_tpi=httptools.downloadpage(url_tpi).data
      tpi=scrapertools.find_multiple_matches(data_tpi,'id":(.*?),.*?"original_name":"(.*?)",.*?"poster_path":(.*?),"popularity"')
    else:
      url_tpi="http://api.themoviedb.org/3/movie/"+item.extra.split("|")[2]+"/recommendations?api_key="+api_key+"&language=es"
      data_tpi=httptools.downloadpage(url_tpi).data
      tpi=scrapertools.find_multiple_matches(data_tpi,'id":(.*?),.*?"original_title":"(.*?)",.*?"poster_path":(.*?),"popularity"')

    for idp,peli,thumb in tpi:
            
        thumb =re.sub(r'"|}','',thumb)
        if "null" in thumb:
            thumb = "http://s6.postimg.org/tw1vhymj5/noposter.png"
        else:
            thumb ="https://image.tmdb.org/t/p/original"+thumb
        peliculas.append([idp,peli,thumb])
    
    extra = ""+"|"+item.extra.split("|")[2]+"|"+item.extra.split("|")[2]+"|"+item.extra.split("|")[6]+"|"+""
    infoLabels = {'title': title, 'plot': plot, 'thumbnail': photo, 'fanart': foto, 'tagline': tagline, 'rating': rating}
    item_info = item.clone(info=infoLabels, icon=icon, extra=extra, rating=rating, rating_filma=rating_filma, critica=critica, contentType=item.contentType, thumb_busqueda="http://imgur.com/j0A9lnu.png")
    from channels import infoplus
    infoplus.start(item_info, peliculas)
Ejemplo n.º 4
0
def info(item):
    logger.info()
    itemlist = []
    url=item.url
    rating_tmdba_tvdb=item.extra.split("|")[0]
    if item.extra.split("|")[6]== "":
            rating_tmdba_tvdb= "Sin puntuación"
    rating_filma=item.extra.split("|")[1]
    filma="http://s6.postimg.org/6yhe5fgy9/filma.png"
    title= item.extra.split("|")[3]
    title = title.replace("%20"," ")
    try:
       if "." in rating_tmdba_tvdb:
          check_rat_tmdba= scrapertools.get_match(rating_tmdba_tvdb,'(\d+).')
       else:
          check_rat_tmdba=rating_tmdba_tvdb
       if int(check_rat_tmdba) >= 5 and int(check_rat_tmdba) < 8:
          rating = "[COLOR springgreen][B]"+rating_tmdba_tvdb+"[/B][/COLOR]"
       elif int(check_rat_tmdba) >= 8 or rating_tmdba_tvdb == 10:
            rating = "[COLOR yellow][B]"+rating_tmdba_tvdb+"[/B][/COLOR]"
       else:
           rating = "[COLOR crimson][B]"+rating_tmdba_tvdb+"[/B][/COLOR]"
           print "lolaymaue"
    except:
        rating = "[COLOR crimson][B]"+rating_tmdba_tvdb+"[/B][/COLOR]"
    if "10." in rating:
        rating = re.sub(r'10\.\d+','10',rating)
    try:
       check_rat_filma= scrapertools.get_match(rating_filma,'(\d)')
       print "paco"
       print check_rat_filma
       if int(check_rat_filma) >= 5 and int(check_rat_filma) < 8:
          print "dios"
          print check_rat_filma
          rating_filma = "[COLOR springgreen][B]"+rating_filma+"[/B][/COLOR]"
       elif int(check_rat_filma) >=8:
          
          print check_rat_filma
          rating_filma = "[COLOR yellow][B]"+rating_filma+"[/B][/COLOR]"
       else:
          rating_filma = "[COLOR crimson][B]"+rating_filma+"[/B][/COLOR]"
          print "rojo??"
          print check_rat_filma
    except:
          rating_filma = "[COLOR crimson][B]"+rating_filma+"[/B][/COLOR]"
    plot = item.extra.split("|")[6]
    plot = "[COLOR moccasin][B]"+plot+"[/B][/COLOR]"
    plot= re.sub(r"\\|<br />","",plot)
    if item.extra.split("|")[5] != "":
        tagline = item.extra.split("|")[5]
        if tagline == "\"\"":
            tagline = " "
        tagline = "[COLOR aquamarine][B]"+tagline+"[/B][/COLOR]"
    else:
        tagline = ""
    if item.contentType!="movie":
        icon ="http://s6.postimg.org/hzcjag975/tvdb.png"
    else:
        icon ="http://imgur.com/SenkyxF.png"
       
    foto= item.extra.split("|")[9]
    if not "tmdb" in foto:
       foto=""
    if item.extra.split("|")[7] !="":
        critica =item.extra.split("|")[7]
    else:
        critica= "Esta serie no tiene críticas..."
        
    photo= item.extra.split("|")[8].replace(" ","%20")
    if ".jpg" in photo:
        photo=""
    #Tambien te puede interesar
    peliculas = []
    if item.contentType !="movie":
      url_tpi="http://api.themoviedb.org/3/tv/"+item.extra.split("|")[2]+"/recommendations?api_key="+api_key+"&language=es"
      data_tpi=httptools.downloadpage(url_tpi).data
      tpi=scrapertools.find_multiple_matches(data_tpi,'id":(.*?),.*?"original_name":"(.*?)",.*?"poster_path":(.*?),"popularity"')
    else:
      url_tpi="http://api.themoviedb.org/3/movie/"+item.extra.split("|")[2]+"/recommendations?api_key="+api_key+"&language=es"
      data_tpi= httptools.downloadpage(url_tpi).data
      tpi=scrapertools.find_multiple_matches(data_tpi,'id":(.*?),.*?"original_title":"(.*?)",.*?"poster_path":(.*?),"popularity"')

    for idp,peli,thumb in tpi:
            
        thumb =re.sub(r'"|}','',thumb)
        if "null" in thumb:
            thumb = "http://s6.postimg.org/tw1vhymj5/noposter.png"
        else:
            thumb ="https://image.tmdb.org/t/p/original"+thumb
        peliculas.append([idp,peli,thumb])
    
    extra = ""+"|"+item.extra.split("|")[2]+"|"+item.extra.split("|")[2]+"|"+item.extra.split("|")[6]+"|"+""
    infoLabels = {'title': title, 'plot': plot, 'thumbnail': photo, 'fanart': foto, 'tagline': tagline, 'rating': rating}
    item_info = item.clone(info=infoLabels, icon=icon, extra=extra, rating=rating, rating_filma=rating_filma, critica=critica, contentType=item.contentType, thumb_busqueda="http://imgur.com/Q0BTHyO.png")
    from channels import infoplus
    infoplus.start(item_info, peliculas)