Página 20 de 95

Re: Italian channels issues and development

Publicado: 03 Ago 2015, 20:36
por labtv
It's not clear the double github thing.. There are 2 users that compile 2 different githubs and this's clear.
But do you update the oldest one with the newest files or not?
In a few words.. Zanzibar and dentaku's files match or are different?

Re: Italian channels issues and development

Publicado: 03 Ago 2015, 20:53
por zanzibar1982
In my repo ReadMe it'a all written.
Mine is an appendix to the original repo edited by dentaku65.
When I apply new changes, I upload them on my repo.
which has the peculiarity to be packed so that you just
have to copy the entire folder from zip into your addon folder,
overwrite existing data and reboot kodi.
Then I push the same files to dentaku65's repo, which has a structure
made for more experts, so that you can take only what you need.

Also the channelselector.py files are different, mine is truncated of some options I don't use,
dentaku's one is more loyal to the original pelisalacarta.

but you can use my files with dentaku's channelselector.py if you need those
options back.

Re: Italian channels issues and development

Publicado: 04 Ago 2015, 15:05
por MikeW.
DrZ3r0 escribió:Hi,
I commit bugfix for openload on windows.
I have restored akstream.
Thanks MikeW for testing our work, I try to fix errors.
Hi, thank for correption, i have try it now, now ok both backin both HD

Another little question, i don't know if is it only a my problem...
I did not notice before if the section "serie Tv" on cineblog work correctly before.
Today if i try to open this (or also in i try a search on "Serie Tv), kodi begin run but it don't stop never (message "attendere" that turns without end)
I had to kill kodi to terminate.
This both on Ubuntu (Kodi 15 Isengard), both on Windows 7 (Kodi 14.2 Helix)

Ps:really it is not important because there is guardaserie that is better, i point out it only because i notice it.

Re: Italian channels issues and development

Publicado: 04 Ago 2015, 15:08
por zanzibar1982

Re: Italian channels issues and development

Publicado: 04 Ago 2015, 19:43
por labtv
Another thing that I can't get is plots.
How do I see them?

Re: Italian channels issues and development

Publicado: 04 Ago 2015, 21:50
por zanzibar1982
@labtv

If you use Confluence skin, set kodi view to either "Info media" 1,2, or 3.

Anyways, not all of the channels have plots, as sometimes

the script has to go look for them pre-loading the next web page,

and that slows down overall experience. So we do not put them everywhere.

@DrZ3r0

You are doing an awesome work.

Re: Italian channels issues and development

Publicado: 04 Ago 2015, 23:50
por zanzibar1982
@DrZ3r0

in attachment the sheet for the new channel you were talking about. :)

Hope it helps

EDIT: Added plots, first time I can use dentaku's strings!

I guess BeautifulSoup can translate the ’ stuff

EDIT 2: Maybe it's more useful like that for someone:

Código: Seleccionar todo

# -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Canal para piratestreaming
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os, sys

from core import logger
from core import config
from core import scrapertools
from core.item import Item
from servers import servertools

__channel__ = "altadefinizione01"
__category__ = "F,S,A"
__type__ = "generic"
__title__ = "AltaDefinizione01"
__language__ = "IT"

sito="http://www.altadefinizione01.com/"

DEBUG = config.get_setting("debug")

def isGeneric():
    return True

def mainlist(item):
    logger.info("pelisalacarta.altadefinizione01 mainlist")
    itemlist = []
    itemlist.append( Item(channel=__channel__, title="[COLOR azure]Ultimi film inseriti[/COLOR]", action="peliculas", url=sito,thumbnail="http://dc584.4shared.com/img/XImgcB94/s7/13feaf0b538/saquinho_de_pipoca_01"))
    itemlist.append( Item(channel=__channel__, title="[COLOR azure]Categorie film[/COLOR]", action="categorias", url=sito, thumbnail="http://xbmc-repo-ackbarr.googlecode.com/svn/trunk/dev/skin.cirrus%20extended%20v2/extras/moviegenres/All%20Movies%20by%20Genre.png"))
    #itemlist.append( Item(channel=__channel__, title="[COLOR azure]Serie TV[/COLOR]" , action="peliculas", url=sito, thumbnail="http://xbmc-repo-ackbarr.googlecode.com/svn/trunk/dev/skin.cirrus%20extended%20v2/extras/moviegenres/New%20TV%20Shows.png"))
    #itemlist.append( Item(channel=__channel__, title="[COLOR azure]Anime Cartoon Italiani[/COLOR]", action="peliculas", url=sito, thumbnail="http://orig09.deviantart.net/df5a/f/2014/169/2/a/fist_of_the_north_star_folder_icon_by_minacsky_saya-d7mq8c8.png"))
    itemlist.append( Item(channel=__channel__, title="[COLOR yellow]Cerca...[/COLOR]", action="search", thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search"))
    return itemlist

def peliculas(item):
    logger.info("pelisalacarta.altadefinizione01 peliculas")
    itemlist = []

    # Descarga la pagina
    data = scrapertools.cache_page(item.url)

    # Extrae las entradas (carpetas)
    patron  = '<div class="cover boxcaption">\s*'
    patron += '<h2> <a href="([^>"]+)">(.*?)</a> </h2>.*?<img.*?src="(.*?)"'
    matches = re.compile(patron,re.DOTALL).findall(data)
    scrapertools.printMatches(matches)

    for scrapedurl,scrapedtitle,scrapedthumbnail in matches:
        response = urllib2.urlopen(scrapedurl)
        html = response.read()
        start = html.find("<div class=\"aciklama\">")
        end = html.find(">Fonte Trama</a>", start)
        scrapedplot = html[start:end]
        #scrapedplot = re.sub(r'<.*?>', '', scrapedplot)
        scrapedtitle=scrapertools.decodeHtmlentities(scrapedtitle.replace("Streaming",""))
        if scrapedplot.startswith("<div class"):
           scrapedplot = scrapedplot[30:]
        if (DEBUG): logger.info("title=["+scrapedtitle+"], url=["+scrapedurl+"], thumbnail=["+scrapedthumbnail+"]")
        itemlist.append( Item(channel=__channel__, action="findvideos", title="[COLOR azure]" + scrapedtitle + "[/COLOR]", url=scrapedurl , viewmode="movie_with_plot", thumbnail=scrapedthumbnail , plot=scrapedplot , folder=True) )

    # Extrae el paginador
    patronvideos  = '...</span><a class="nextpostslink" rel="next" href="([^"]+)">&raquo;</a>'
    matches = re.compile(patronvideos,re.DOTALL).findall(data)
    scrapertools.printMatches(matches)

    if len(matches)>0:
        scrapedurl = urlparse.urljoin(item.url,matches[0])
        itemlist.append( Item(channel=__channel__, action="peliculas", title="[COLOR orange]Successivo >>[/COLOR]" , url=scrapedurl , thumbnail="http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png", folder=True) )

    return itemlist

def categorias(item):
    logger.info("pelisalacarta.altadefinizione01 categorias")
    itemlist = []
    
    data = scrapertools.cache_page(item.url)
    logger.info(data)

    # Narrow search by selecting only the combo
    bloque = scrapertools.get_match(data,'<ul class="kategori_list">(.*?)</ul>')
    
    # The categories are the options for the combo  
    patron = '<li><a href="([^"]+)">([^<]+)</a></li>'
    matches = re.compile(patron,re.DOTALL).findall(bloque)
    scrapertools.printMatches(matches)

    for url,titulo in matches:
        scrapedtitle = titulo
        scrapedurl = urlparse.urljoin(item.url,url)
        scrapedthumbnail = ""
        scrapedplot = ""
        if (DEBUG): logger.info("title=["+scrapedtitle+"], url=["+scrapedurl+"], thumbnail=["+scrapedthumbnail+"]")
        itemlist.append( Item(channel=__channel__, action="peliculas" , title="[COLOR azure]" + scrapedtitle + "[/COLOR]", url=scrapedurl, thumbnail=scrapedthumbnail, plot=scrapedplot))

    return itemlist

def search(item,texto):
    logger.info("[altadefinizione01.py] "+item.url+" search "+texto)
    item.url = "http://www.altadefinizione01.com/index.php/?s="+texto
    try:
        return peliculas(item)
    # Se captura la excepción, para no interrumpir al buscador global si un canal falla
    except:
        import sys
        for line in sys.exc_info():
            logger.error( "%s" % line )
        return []

def test():
    from servers import servertools
    
    # mainlist
    mainlist_items = mainlist(Item())
    # Da por bueno el canal si alguno de los videos de "Novedades" devuelve mirrors
    novedades_items = peliculas(mainlist_items[0])
    bien = False
    for novedades_item in novedades_items:
        mirrors = servertools.find_video_items( item=novedades_item )
        if len(mirrors)>0:
            bien = True
            break

    return bien

Re: Italian channels issues and development

Publicado: 05 Ago 2015, 10:01
por MikeW.
Good morning to all
Since i'm not able to give help with python, at least i try to give my little contribution to testing developments, i hope it be helpful ;)

I think i have noticed a bug in global search.
For example, if i search the movie "the house of the devil" in global search only digiting the word "house devil" i have zero result, but really the movie is avaiable, in fact with the same two words in search directly under cineblog and in italiafilm i have the movie on the result.
(I noticed i have the file of repo of yesterday morning, i don't have yet the last files of yesterday evening with the correption on serie tv cb01)

Another question, if i put some movies in "preferiti", from the list of "preferiti" when i push the key for info on a movie, kodi crash and fall all time. (perhaps depend from kodi isengard 15? i have not ever noticed it with kodi 14.2 Helix)

Ps: Zanzibar, i read the guide you are linking in repo to learn write a new canal... I have to take a one month holiday from work to have the time necessary to start to understand something :D :D
(ten years ago i was able to write some lines in html, today i forgot more of that, but python it seems to me most much more difficult, perhaps only because the guide is not in italian)
So congratulations again guys for your work and patience, it must be necessary big passion.

Re: Italian channels issues and development

Publicado: 05 Ago 2015, 10:35
por zanzibar1982
the global search comes from here
viewtopic.php?f=14&t=6584&p=24867&hilit ... ado#p24867
I only translated in italian and added to the repo... so I don't know how
much I can help. But I confirm the results of your search.

What I can tell you about is that the way the buscador general works is

to search 1) in all .py files in /channels folder that 2) have a "search" item in the script.

So it does not pass the queries directly through google, and that might be the reason

of the issue.

I usually try to input the most complete title while searching.

Regarding the favourites (preferiti), are you using dentaku65's channelselector.py?

Regarding the how-to's and learning:

I have been on this forum for about 5-6 weeks. At the beginning, I did not even know

what to ask, and looking back I almost feel ashamed of some of my queries.

But here I found (and translated, see here viewtopic.php?f=22&t=6821&p=25268&hilit=pastebin#p25268) a 10-steps guide in english by main author Jesus, dated 2009;

I think it was before he did the big huge one tutorial in spanish you can find here.

Since I'm here I tried to keep track of what I was learning through the sleepless nights

spent trying and trying, with no knowledge of python or html.

I am just a pizza chef, mate.

You basically open with a text editor channelselector.py file, find the lines where the channels are,

and edit a new one. Then you copy the simplest channel you can find in /channels

and re-name it. then you change the urls to the site it must refer to.

With your browser, go to the home of your chosen site to port and press Ctrl+U.

Identify there the html "boxes" that contain each info regarding 1)movie page link,

2) movie poster, 3) movie title.

Then looking at other working sites .py sheets understand yourself the inputs

you need to extract a "natural expression" that refers to the three elements in each

movie box.

Etcetera etcetera.

Dude, it does not take a spaceship for that, imho.

But I understand that if you don't have the time to be constant, which is the main

resource you need to learn (along with patience and will), it's not that simple.

Thank you for apreciating and troubleshooting!

Re: Italian channels issues and development

Publicado: 05 Ago 2015, 13:52
por dentaku65
New channel added LiberoITA
https://github.com/dentaku65/pelisalacartait
Just News (Novità) and Search, no categories, no plot... too few elements in the site code for scraping... at least for me.

by