# -*- coding: utf-8 -*-
# ------------------------------------------------------------
# Ringraziamo Icarus crew
# Canale mondolunatico
# ------------------------------------------------------------
import os
import re
import time
import urllib
import urlparse
from core import httptools
from platformcode import config
from platformcode import logger
from core import scrapertools
from core import servertools
from core.item import Item
from core import tmdb
__channel__ = "mondolunatico"
host = "http://mondolunatico.org"
captcha_url = '%s/pass/CaptchaSecurityImages.php?width=100&height=40&characters=5' % host
PERPAGE = 25
def mainlist(item):
logger.info("kod.mondolunatico mainlist")
itemlist = [Item(channel=item.channel,
title="[COLOR azure]Novità [/COLOR]",
extra="movie",
action="peliculas",
url=host,
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
Item(channel=item.channel,
title="[COLOR azure]Categorie[/COLOR]",
extra="movie",
action="categorias",
url=host,
thumbnail="http://xbmc-repo-ackbarr.googlecode.com/svn/trunk/dev/skin.cirrus%20extended%20v2/extras/moviegenres/All%20Movies%20by%20Genre.png"),
Item(channel=item.channel,
title="[COLOR yellow]Cerca...[/COLOR]",
extra="movie",
action="search",
thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search")]
#Item(channel=item.channel,
# title="[COLOR azure]Serie TV[/COLOR]",
# extra="tvshow",
# action="serietv",
# url="%s/serietv/lista-alfabetica/" % host,
# thumbnail="http://i.imgur.com/rO0ggX2.png"),
#Item(channel=item.channel,
# title="[COLOR yellow]Cerca Serie TV...[/COLOR]",
# extra="tvshow",
# action="search",
# thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search"),]
return itemlist
def categorias(item):
logger.info("kod.mondolunatico categorias")
itemlist = []
data = httptools.downloadpage(item.url).data
# Narrow search by selecting only the combo
bloque = scrapertools.find_single_match(data, '