Aggiunta canali (#14)
* Altadefinizione01 L speriamo...io me la cavo! * eurostreaming Sostituiscono gli attuali che hanno i seguenti problemi: 1. Non aprono tutte le serie, in quanto nella pagina del sito si deve cliccare su una voce per aprire la lista degli episodi 2. Quando si aggiungono una serie nella videoteca e si hanno episodi in italiano e sottotitolati, vengono aggiunti correttamente i titoli in italiano ma i video sono sottotitolati. * Update unify.py Proposta per italianizzare le thumb! * Add files via upload * Add files via upload * Delete altadefinizione01_link.json ops! * Delete altadefinizione01_link.py ariops! * Add files via upload aggiunti i server in lista_servers * Update eurostreaming.py aggiunto autoplay nella home menu * Altadefinizione 2 Ci sono problemi con la ricerca dei server. Prende o solo openload o quello e un altro * Update altadefinizione_2.json tolta la parte serie tv * Aggiornamento canale Tolte le voci su TMDB che indicavano la lingua italiana e fatto pulizia di alcuni commenti * Delete altadefinizione_2.json da modificare * Delete altadefinizione_2.py da modificare * Cambio url * fix vari tra cui l'inserimento in videoteca dei giusti video: o ita o sub-ita
This commit is contained in:
92
channels/altadefinizione01_club.json
Normal file
92
channels/altadefinizione01_club.json
Normal file
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"id": "altadefinizione01_club",
|
||||
"name": "Altadefinizione01 C",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["ita"],
|
||||
"fanart": "https://www.altadefinizione01.vision/templates/Darktemplate/images/logo.png",
|
||||
"thumbnail": "https://www.altadefinizione01.vision/templates/Darktemplate/images/logo.png",
|
||||
"banner": "https://www.altadefinizione01.vision/templates/Darktemplate/images/logo.png",
|
||||
"categories": [
|
||||
"movie"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "modo_grafico",
|
||||
"type": "bool",
|
||||
"label": "Buscar información extra",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_film",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_italiano",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Italiano",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Includi ricerca globale",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "comprueba_enlaces",
|
||||
"type": "bool",
|
||||
"label": "Verifica se i link esistono",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "comprueba_enlaces_num",
|
||||
"type": "list",
|
||||
"label": "Numero de link da verificare",
|
||||
"default": 1,
|
||||
"enabled": true,
|
||||
"visible": "eq(-1,true)",
|
||||
"lvalues": [ "5", "10", "15", "20" ]
|
||||
},
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostra link in lingua...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"Non filtrare",
|
||||
"IT"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "perfil",
|
||||
"type": "list",
|
||||
"label": "profilo dei colori",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"Sin color",
|
||||
"Perfil 5",
|
||||
"Perfil 4",
|
||||
"Perfil 3",
|
||||
"Perfil 2",
|
||||
"Perfil 1"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
370
channels/altadefinizione01_club.py
Normal file
370
channels/altadefinizione01_club.py
Normal file
@@ -0,0 +1,370 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- Channel Altadefinizione01C Film -*-
|
||||
# -*- Created for IcarusbyGreko -*-
|
||||
# -*- By Greko -*-
|
||||
# -*- last change: 3/05/2019
|
||||
|
||||
from channelselector import get_thumb
|
||||
from channels import autoplay
|
||||
from channels import filtertools
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core.item import Item
|
||||
from core import channeltools
|
||||
from core import tmdb
|
||||
from platformcode import config, logger
|
||||
|
||||
__channel__ = "altadefinizione01_club"
|
||||
|
||||
#host = "https://www.altadefinizione01.club/" # host da cambiare
|
||||
#host = "https://www.altadefinizione01.team/" #aggiornato al 22 marzo 2019
|
||||
host = "https://www.altadefinizione01.vision/" #aggiornato al 30-04-209
|
||||
# ======== def per utility INIZIO =============================
|
||||
try:
|
||||
__modo_grafico__ = config.get_setting('modo_grafico', __channel__)
|
||||
__perfil__ = int(config.get_setting('perfil', __channel__))
|
||||
except:
|
||||
__modo_grafico__ = True
|
||||
__perfil__ = 0
|
||||
|
||||
# Fijar perfil de color
|
||||
perfil = [['0xFFFFE6CC', '0xFFFFCE9C', '0xFF994D00', '0xFFFE2E2E', '0xFFFFD700'],
|
||||
['0xFFA5F6AF', '0xFF5FDA6D', '0xFF11811E', '0xFFFE2E2E', '0xFFFFD700'],
|
||||
['0xFF58D3F7', '0xFF2E9AFE', '0xFF2E64FE', '0xFFFE2E2E', '0xFFFFD700']]
|
||||
|
||||
if __perfil__ < 3:
|
||||
color1, color2, color3, color4, color5 = perfil[__perfil__]
|
||||
else:
|
||||
color1 = color2 = color3 = color4 = color5 = ""
|
||||
|
||||
__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', __channel__)
|
||||
__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', __channel__)
|
||||
|
||||
headers = [['User-Agent', 'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'],
|
||||
['Referer', host]]
|
||||
|
||||
#parameters = channeltools.get_channel_parameters(__channel__)
|
||||
#fanart_host = parameters['fanart']
|
||||
#thumbnail_host = parameters['thumbnail']
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['verystream','openload','rapidvideo','streamango'] # per l'autoplay
|
||||
list_quality = ['default'] #'rapidvideo', 'streamango', 'openload', 'streamcherry'] # per l'autoplay
|
||||
|
||||
|
||||
# =========== home menu ===================
|
||||
|
||||
def mainlist(item):
|
||||
"""
|
||||
Creo il menu principale del canale
|
||||
:param item:
|
||||
:return: itemlist []
|
||||
"""
|
||||
logger.info("%s mainlist log: %s" % (__channel__, item))
|
||||
itemlist = []
|
||||
title = ''
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist = [
|
||||
# new upload
|
||||
Item(channel=__channel__, title="Ultimi Arrivi", action="peliculas",
|
||||
url="%s" % host, text_color=color4, extra="film",
|
||||
infoLabels={'plot': item.category},
|
||||
thumbnail=get_thumb(title, auto = True)
|
||||
),
|
||||
# x to Cinema
|
||||
Item(channel=__channel__, title="Al Cinema", action="peliculas",
|
||||
url="%scinema/" % host, text_color=color4, extra="film",
|
||||
infoLabels={'plot': item.category},
|
||||
thumbnail = get_thumb(title, auto = True)
|
||||
),
|
||||
# x Sub-ita
|
||||
Item(channel=__channel__, title="Sottotitolati", action="peliculas",
|
||||
url="%ssub-ita/" % host, text_color=color4, extra="film",
|
||||
infoLabels={'plot': item.category},
|
||||
thumbnail = get_thumb(title, auto = True)
|
||||
),
|
||||
# x Category
|
||||
Item(channel=__channel__, title="Generi", action="categorie",
|
||||
url="%s" % host, text_color=color4, extra="genres",
|
||||
viewcontent='movies',
|
||||
infoLabels={'plot': item.category},
|
||||
thumbnail = get_thumb(title, auto = True)
|
||||
),
|
||||
# x year
|
||||
Item(channel=__channel__, title="Anno", action="categorie",
|
||||
url="%s" % host, text_color=color4, extra="year",
|
||||
infoLabels={'plot': item.category},
|
||||
thumbnail = get_thumb(title, auto = True)
|
||||
),
|
||||
# x lettera
|
||||
Item(channel=__channel__, title="Lettera", action="categorie",
|
||||
url="%scatalog/a/" % host, text_color=color4, extra="orderalf",
|
||||
infoLabels={'plot': item.category},
|
||||
thumbnail = get_thumb(title, auto = True)
|
||||
),
|
||||
# Search
|
||||
Item(channel=__channel__, title="Cerca Film...", action="search",
|
||||
text_color=color4, extra="",
|
||||
infoLabels={'plot': item.category},
|
||||
thumbnail = get_thumb(title, auto = True)
|
||||
),
|
||||
]
|
||||
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
|
||||
# ======== def in ordine di menu ===========================
|
||||
# =========== def per vedere la lista dei film =============
|
||||
|
||||
def peliculas(item):
|
||||
logger.info("%s mainlist peliculas log: %s" % (__channel__, item))
|
||||
itemlist = []
|
||||
# scarico la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
# da qui fare le opportuni modifiche
|
||||
if item.extra != 'orderalf':
|
||||
if item.extra == 'film' or item.extra == 'year':
|
||||
bloque = scrapertools.find_single_match(data, '<div class="cover boxcaption">(.*?)<div id="right_bar">')
|
||||
elif item.extra == "search":
|
||||
bloque = scrapertools.find_single_match(data, '<div class="cover boxcaption">(.*?)</a>')
|
||||
else: #item.extra == 'cat':
|
||||
bloque = scrapertools.find_single_match(data, '<div class="cover boxcaption">(.*?)<div class="page_nav">')
|
||||
patron = '<h2>.<a href="(.*?)".*?src="(.*?)".*?class="trdublaj">(.*?)<div class="ml-item-hiden".*?class="h4">(.*?)<.*?label">(.*?)</span'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for scrapedurl, scrapedimg, scrapedqualang, scrapedtitle, scrapedyear in matches:
|
||||
|
||||
if 'sub ita' in scrapedqualang.lower():
|
||||
scrapedlang = 'Sub-Ita'
|
||||
else:
|
||||
scrapedlang = 'ITA'
|
||||
itemlist.append(Item(
|
||||
channel=item.channel,
|
||||
action="findvideos_film",
|
||||
contentTitle=scrapedtitle,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
infoLabels={'year': scrapedyear},
|
||||
contenType="movie",
|
||||
thumbnail=host+scrapedimg,
|
||||
title= "%s [%s]" % (scrapedtitle, scrapedlang),
|
||||
text_color=color5,
|
||||
language=scrapedlang
|
||||
))
|
||||
|
||||
# se il sito permette l'estrazione dell'anno del film aggiungere la riga seguente
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
# Paginazione
|
||||
next_page = scrapertools.find_single_match(data, "<link rel='next' href='(.*?)' />")
|
||||
if not next_page:
|
||||
next_page = scrapertools.find_single_match(data, '<span>\d</span> <a href="([^"]+)">')
|
||||
|
||||
if next_page != "":
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="peliculas",
|
||||
title=config.get_localized_string(30992),
|
||||
url=next_page,
|
||||
extra=item.extra,
|
||||
text_color=color4,
|
||||
#thumbnail="http://icons.iconarchive.com/icons/ahmadhania/spherical/128/forward-icon.png"
|
||||
thumbnail= get_thumb('nextpage', auto = True)
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
# =========== def pagina categorie ======================================
|
||||
|
||||
def categorie(item):
|
||||
logger.info("%s mainlist categorie log: %s" % (__channel__, item))
|
||||
itemlist = []
|
||||
# scarico la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
# da qui fare le opportuni modifiche
|
||||
if item.extra == 'genres':
|
||||
bloque = scrapertools.find_single_match(data, '<ul class="kategori_list">(.*?)</ul>')
|
||||
patron = '<li><a href="/(.*?)">(.*?)</a>'
|
||||
elif item.extra == 'year':
|
||||
bloque = scrapertools.find_single_match(data, '<ul class="anno_list">(.*?)</ul>')
|
||||
patron = '<li><a href="/(.*?)">(.*?)</a>'
|
||||
elif item.extra == 'orderalf':
|
||||
bloque = scrapertools.find_single_match(data, '<div class="movies-letter">(.*)<div class="clearfix">')
|
||||
patron = '<a title=.*?href="(.*?)"><span>(.*?)</span>'
|
||||
|
||||
matches = scrapertools.find_multiple_matches(bloque, patron)
|
||||
|
||||
for scrapurl, scraptitle in sorted(matches):
|
||||
|
||||
if "01" in scraptitle:
|
||||
continue
|
||||
else:
|
||||
scrapurl = host+scrapurl
|
||||
|
||||
if item.extra != 'orderalf':
|
||||
action = "peliculas"
|
||||
else:
|
||||
action = 'orderalf'
|
||||
itemlist.append(Item(
|
||||
channel=item.channel,
|
||||
action= action,
|
||||
title = scraptitle,
|
||||
url= scrapurl,
|
||||
text_color=color4,
|
||||
thumbnail = get_thumb(scraptitle, auto = True),
|
||||
extra = item.extra,
|
||||
#Folder = True,
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
# =========== def pagina lista alfabetica ===============================
|
||||
|
||||
def orderalf(item):
|
||||
logger.info("%s mainlist orderalf log: %s" % (__channel__, item))
|
||||
itemlist = []
|
||||
# scarico la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
# da qui fare le opportuni modifiche
|
||||
patron = '<td class="mlnh-thumb"><a href="(.*?)".title="(.*?)".*?src="(.*?)".*?mlnh-3">(.*?)<.*?"mlnh-5">.<(.*?)<td' #scrapertools.find_single_match(data, '<td class="mlnh-thumb"><a href="(.*?)".title="(.*?)".*?src="(.*?)".*?mlnh-3">(.*?)<.*?"mlnh-5">.<(.*?)<td')
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for scrapedurl, scrapedtitle, scrapedimg, scrapedyear, scrapedqualang in matches:
|
||||
|
||||
if 'sub ita' in scrapedqualang.lower():
|
||||
scrapedlang = 'Sub-ita'
|
||||
else:
|
||||
scrapedlang = 'ITA'
|
||||
itemlist.append(Item(
|
||||
channel=item.channel,
|
||||
action="findvideos_film",
|
||||
contentTitle=scrapedtitle,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
infoLabels={'year': scrapedyear},
|
||||
contenType="movie",
|
||||
thumbnail=host+scrapedimg,
|
||||
#title=scrapedtitle + ' %s' % scrapedlang,
|
||||
title = "%s [%s]" % (scrapedtitle, scrapedlang),
|
||||
text_color=color5,
|
||||
language=scrapedlang,
|
||||
context="buscar_trailer"
|
||||
))
|
||||
|
||||
# se il sito permette l'estrazione dell'anno del film aggiungere la riga seguente
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
# Paginazione
|
||||
next_page = scrapertools.find_single_match(data, "<link rel='next' href='(.*?)' />")
|
||||
if not next_page:
|
||||
next_page = scrapertools.find_single_match(data, '<div class=\'wp-pagenavi\'>.*?href="(.*?)">')
|
||||
|
||||
if next_page != "":
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="orderalf",
|
||||
title=config.get_localized_string(30992),
|
||||
url=next_page,
|
||||
extra=item.extra,
|
||||
text_color=color4,
|
||||
thumbnail= get_thumb('nextpage', auto = True)
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
# =========== def pagina del film con i server per verderlo =============
|
||||
|
||||
def findvideos_film(item):
|
||||
logger.info("%s mainlist findvideos_film log: %s" % (__channel__, item))
|
||||
itemlist = []
|
||||
|
||||
# scarico la pagina
|
||||
#data = scrapertools.cache_page(item.url)
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
# da qui fare le opportuni modifiche
|
||||
patron = '<a href="#" data-link="(.*?)">'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
|
||||
for scrapedurl in matches:
|
||||
logger.info("altadefinizione01_club scrapedurl log: %s" % scrapedurl)
|
||||
try:
|
||||
itemlist = servertools.find_video_items(data=data)
|
||||
|
||||
for videoitem in itemlist:
|
||||
logger.info("Videoitemlist2: %s" % videoitem)
|
||||
videoitem.title = "%s [%s]" % (item.contentTitle, videoitem.title)#"[%s] %s" % (videoitem.server, item.title) #"[%s]" % (videoitem.title)
|
||||
videoitem.show = item.show
|
||||
videoitem.contentTitle = item.contentTitle
|
||||
videoitem.contentType = item.contentType
|
||||
videoitem.channel = item.channel
|
||||
videoitem.text_color = color5
|
||||
videoitem.year = item.infoLabels['year']
|
||||
videoitem.infoLabels['plot'] = item.infoLabels['plot']
|
||||
except AttributeError:
|
||||
logger.error("data doesn't contain expected URL")
|
||||
|
||||
# Controlla se i link sono validi
|
||||
if __comprueba_enlaces__:
|
||||
itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__)
|
||||
|
||||
# Requerido para FilterTools
|
||||
itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
|
||||
# Requerido para AutoPlay
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
# Opción "Añadir esta película a la biblioteca de KODI"
|
||||
if item.extra != "library":
|
||||
|
||||
itemlist.append(Item(channel=__channel__, title="Aggiungi alla Videoteca", text_color="green",
|
||||
action="add_pelicula_to_library", url=item.url,
|
||||
thumbnail= get_thumb('videolibrary', auto = True),
|
||||
contentTitle=item.contentTitle, infoLabels = item.infoLabels
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
# =========== def per cercare film/serietv =============
|
||||
#http://altadefinizione01.link/index.php?do=search&story=avatar&subaction=search
|
||||
def search(item, text):
|
||||
logger.info("%s mainlist search log: %s %s" % (__channel__, item, text))
|
||||
itemlist = []
|
||||
text = text.replace(" ", "+")
|
||||
item.url = host+"index.php?do=search&story=%s&subaction=search" % (text)
|
||||
item.extra = "search"
|
||||
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 Sono qua: %s" % (__channel__, line))
|
||||
return []
|
||||
|
||||
# =========== def per le novità nel menu principale =============
|
||||
|
||||
def newest(categoria):
|
||||
logger.info("%s mainlist newest log: %s %s %s" % (__channel__, categoria))
|
||||
itemlist = []
|
||||
item = Item()
|
||||
#item.extra = 'film'
|
||||
try:
|
||||
if categoria == "film":
|
||||
item.url = host
|
||||
item.action = "peliculas"
|
||||
itemlist = peliculas(item)
|
||||
if itemlist[-1].action == "peliculas":
|
||||
itemlist.pop()
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
94
channels/altadefinizione01_link.json
Normal file
94
channels/altadefinizione01_link.json
Normal file
@@ -0,0 +1,94 @@
|
||||
{
|
||||
"id": "altadefinizione01_link",
|
||||
"name": "Altadefinizione01 L",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["ita"],
|
||||
"fanart": "",
|
||||
"thumbnail": "",
|
||||
"banner": "http://altadefinizione01.link/templates/Dark/img/logonyy.png",
|
||||
"fix" : "reimpostato url e modificato file per KOD",
|
||||
"change_date": "2019-30-04",
|
||||
"categories": [
|
||||
"movie"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "modo_grafico",
|
||||
"type": "bool",
|
||||
"label": "Buscar información extra",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_film",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_italiano",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Italiano",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Includi ricerca globale",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "comprueba_enlaces",
|
||||
"type": "bool",
|
||||
"label": "Verifica se i link esistono",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "comprueba_enlaces_num",
|
||||
"type": "list",
|
||||
"label": "Numero de link da verificare",
|
||||
"default": 1,
|
||||
"enabled": true,
|
||||
"visible": "eq(-1,true)",
|
||||
"lvalues": [ "5", "10", "15", "20" ]
|
||||
},
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostra link in lingua...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"Non filtrare",
|
||||
"IT"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "perfil",
|
||||
"type": "list",
|
||||
"label": "profilo dei colori",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"Sin color",
|
||||
"Perfil 5",
|
||||
"Perfil 4",
|
||||
"Perfil 3",
|
||||
"Perfil 2",
|
||||
"Perfil 1"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
316
channels/altadefinizione01_link.py
Normal file
316
channels/altadefinizione01_link.py
Normal file
@@ -0,0 +1,316 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- Channel Altadefinizione01L Film - Serie -*-
|
||||
# -*- Creato per Alfa-addon -*-
|
||||
# -*- e adattato for KOD -*-
|
||||
# -*- By Greko -*-
|
||||
# -*- last change: 3/05/2019
|
||||
|
||||
from channelselector import get_thumb
|
||||
from channels import autoplay
|
||||
from channels import filtertools
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core.item import Item
|
||||
from core import channeltools
|
||||
from core import tmdb
|
||||
from platformcode import config, logger
|
||||
|
||||
__channel__ = "altadefinizione01_link"
|
||||
|
||||
#host = "https://altadefinizione01.link/" #riaggiornato al 29 aprile 2019
|
||||
#host = "http://altadefinizione01.art/" # aggiornato al 22 marzo 2019
|
||||
#host = "https://altadefinizione01.network/" #aggiornato al 22 marzo 2019
|
||||
#host = "http://altadefinizione01.date/" #aggiornato al 3 maggio 2019
|
||||
host = "https://altadefinizione01.voto/" #aggiornato al 3 maggio 2019
|
||||
|
||||
# ======== def per utility INIZIO =============================
|
||||
try:
|
||||
__modo_grafico__ = config.get_setting('modo_grafico', __channel__)
|
||||
__perfil__ = int(config.get_setting('perfil', __channel__))
|
||||
except:
|
||||
__modo_grafico__ = True
|
||||
__perfil__ = 0
|
||||
|
||||
# Fijar perfil de color
|
||||
perfil = [['0xFFFFE6CC', '0xFFFFCE9C', '0xFF994D00', '0xFFFE2E2E', '0xFFFFD700'],
|
||||
['0xFFA5F6AF', '0xFF5FDA6D', '0xFF11811E', '0xFFFE2E2E', '0xFFFFD700'],
|
||||
['0xFF58D3F7', '0xFF2E9AFE', '0xFF2E64FE', '0xFFFE2E2E', '0xFFFFD700']]
|
||||
|
||||
if __perfil__ < 3:
|
||||
color1, color2, color3, color4, color5 = perfil[__perfil__]
|
||||
else:
|
||||
color1 = color2 = color3 = color4 = color5 = ""
|
||||
|
||||
__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', __channel__)
|
||||
__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', __channel__)
|
||||
|
||||
headers = [['User-Agent', 'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'],
|
||||
['Referer', host]]#,['Accept-Language','it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3']]
|
||||
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['openload', 'streamcherry','rapidvideo', 'streamango', 'supervideo']
|
||||
list_quality = ['default']
|
||||
|
||||
# =========== home menu ===================
|
||||
|
||||
def mainlist(item):
|
||||
"""
|
||||
Creo il menu principale del canale
|
||||
:param item:
|
||||
:return: itemlist []
|
||||
"""
|
||||
logger.info("%s mainlist log: %s" % (__channel__, item))
|
||||
itemlist = []
|
||||
title = ''
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist = [
|
||||
# new upload
|
||||
Item(channel=__channel__, title="Ultimi Arrivi", action="peliculas",
|
||||
url="%s" % host, text_color=color4, extra="film", # color4 = red
|
||||
thumbnail=get_thumb(title, auto = True)
|
||||
),
|
||||
# x to Cinema
|
||||
Item(channel=__channel__, title="Al Cinema", action="peliculas",
|
||||
url="%sfilm-del-cinema" % host, text_color=color4, extra="",
|
||||
thumbnail=get_thumb(title, auto = True)
|
||||
),
|
||||
# Popolari
|
||||
Item(channel=__channel__, title="Popolari", action="peliculas",
|
||||
url="%spiu-visti.html" % host, text_color=color4, extra="",
|
||||
thumbnail=get_thumb(title, auto = True)
|
||||
),
|
||||
# x Sub-ita
|
||||
Item(channel=__channel__, title="Sottotitolati", action="peliculas",
|
||||
url="%sfilm-sub-ita/" % host, text_color=color4, extra="",
|
||||
thumbnail=get_thumb(title, auto = True)
|
||||
),
|
||||
# x mi sento fortunato - Prende solo film con player a pagamento
|
||||
Item(channel=__channel__, title="Mi Sento Fortunato", action="categorie",
|
||||
url="%s" % host, text_color=color4, extra="lucky",
|
||||
thumbnail=""),
|
||||
# x Category
|
||||
Item(channel=__channel__, title="Generi", action="categorie",
|
||||
url="%s" % host, text_color=color4, extra="genres",
|
||||
viewcontent='movies',
|
||||
thumbnail=get_thumb(title, auto = True)
|
||||
),
|
||||
# x year
|
||||
Item(channel=__channel__, title="Anno", action="categorie",
|
||||
url="%s" % host, text_color=color4, extra="year",
|
||||
thumbnail=get_thumb(title, auto = True)
|
||||
),
|
||||
# x quality
|
||||
Item(channel=__channel__, title="Qualità", action="categorie",
|
||||
url="%s" % host, text_color=color4, extra="quality",
|
||||
thumbnail=get_thumb(title, auto = True)
|
||||
),
|
||||
# Search
|
||||
Item(channel=__channel__, title="Cerca Film...", action="search",
|
||||
text_color=color4, extra="",
|
||||
thumbnail=get_thumb(title, auto = True)
|
||||
),
|
||||
]
|
||||
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
|
||||
# ======== def in ordine di menu ===========================
|
||||
|
||||
def peliculas(item):
|
||||
logger.info("%s mainlist peliculas log: %s" % (__channel__, item))
|
||||
itemlist = []
|
||||
# scarico la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
# da qui fare le opportuni modifiche
|
||||
patron = 'class="innerImage">.*?href="([^"]+)".*?src="([^"]+)".*?'\
|
||||
'class="ml-item-title">([^"]+)</.*?class="ml-item-label">'\
|
||||
'(.*?)<.*?class="ml-item-label">.*?class="ml-item-label">(.*?)</'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
|
||||
for scrapedurl, scrapedimg, scrapedtitle, scrapedyear, scrapedlang in matches:
|
||||
if 'italiano' in scrapedlang.lower():
|
||||
scrapedlang = 'ITA'
|
||||
else:
|
||||
scrapedlang = 'Sub-Ita'
|
||||
itemlist.append(Item(
|
||||
channel=item.channel,
|
||||
action="findvideos_film",
|
||||
contentTitle=scrapedtitle,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
infoLabels={'year': scrapedyear},
|
||||
contenType="movie",
|
||||
thumbnail=scrapedimg,
|
||||
title="%s [%s]" % (scrapedtitle, scrapedlang),
|
||||
text_color=color5,
|
||||
language=scrapedlang,
|
||||
context="buscar_trailer"
|
||||
))
|
||||
|
||||
# poiché c'è l'anno negli item prendiamo le info direttamente da tmdb, anche se a volte può non esserci l'informazione
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
# Paginazione
|
||||
next_page = scrapertools.find_single_match(data, "<link rel='next' href='(.*?)' />")
|
||||
if not next_page:
|
||||
next_page = scrapertools.find_single_match(data, '<span>\d</span> <a href="([^"]+)">')
|
||||
|
||||
if next_page != "":
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="peliculas",
|
||||
title=config.get_localized_string(30992),
|
||||
url=next_page,
|
||||
extra=item.extra,
|
||||
text_color=color4,
|
||||
thumbnail= get_thumb('nextpage', auto = True)
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
# =========== def pagina categorie ======================================
|
||||
|
||||
def categorie(item):
|
||||
logger.info("%s mainlist categorie log: %s" % (__channel__, item))
|
||||
itemlist = []
|
||||
# scarico la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
# da qui fare le opportuni modifiche
|
||||
if item.extra == 'genres':
|
||||
bloque = scrapertools.find_single_match(data, '<ul class="listSubCat" id="Film">(.*?)</ul>')
|
||||
elif item.extra == 'year':
|
||||
bloque = scrapertools.find_single_match(data, '<ul class="listSubCat" id="Anno">(.*?)</ul>')
|
||||
elif item.extra == 'quality':
|
||||
bloque = scrapertools.find_single_match(data, '<ul class="listSubCat" id="Qualita">(.*?)</ul>')
|
||||
elif item.extra == 'lucky': # sono i titoli random nella pagina, alcuni rimandano solo a server a pagamento
|
||||
bloque = scrapertools.find_single_match(data, 'FILM RANDOM.*?class="listSubCat">(.*?)</ul>')
|
||||
patron = '<li><a href="/(.*?)">(.*?)<'
|
||||
matches = scrapertools.find_multiple_matches(bloque, patron)
|
||||
|
||||
if item.extra == 'lucky':
|
||||
bloque = scrapertools.find_single_match(data, 'FILM RANDOM.*?class="listSubCat">(.*?)</ul>')
|
||||
patron = '<li><a href="(.*?)">(.*?)<'
|
||||
matches = scrapertools.find_multiple_matches(bloque, patron)
|
||||
|
||||
for scrapurl, scraptitle in sorted(matches):
|
||||
if item.extra != 'lucky':
|
||||
url = host+scrapurl
|
||||
action="peliculas"
|
||||
else:
|
||||
url = scrapurl
|
||||
action = "findvideos_film"
|
||||
itemlist.append(Item(
|
||||
channel=item.channel,
|
||||
action=action,
|
||||
title = scraptitle,
|
||||
url=url,
|
||||
#extra = '',
|
||||
text_color=color4,
|
||||
thumbnail=get_thumb(scraptitle, auto = True),
|
||||
Folder = True,
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
# =========== def pagina del film con i server per verderlo =============
|
||||
# da sistemare che ne da solo 1 come risultato
|
||||
|
||||
def findvideos_film(item):
|
||||
logger.info("%s mainlist findvideos_film log: %s" % (__channel__, item))
|
||||
itemlist = []
|
||||
# scarico la pagina
|
||||
#data = scrapertools.cache_page(item.url) #non funziona più?
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
# da qui fare le opportuni modifiche
|
||||
patron = '<li.*?<a href="#" data-target="(.*?)">'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
#logger.info("altadefinizione01_linkMATCHES: %s " % matches)
|
||||
for scrapedurl in matches:
|
||||
|
||||
try:
|
||||
itemlist = servertools.find_video_items(data=data)
|
||||
|
||||
for videoitem in itemlist:
|
||||
logger.info("Videoitemlist2: %s" % videoitem)
|
||||
videoitem.title = "%s [%s]" % (item.contentTitle, videoitem.title)#"[%s] %s" % (videoitem.server, item.title) #"[%s]" % (videoitem.title)
|
||||
videoitem.show = item.show
|
||||
videoitem.contentTitle = item.contentTitle
|
||||
videoitem.contentType = item.contentType
|
||||
videoitem.channel = item.channel
|
||||
videoitem.text_color = color5
|
||||
videoitem.year = item.infoLabels['year']
|
||||
videoitem.infoLabels['plot'] = item.infoLabels['plot']
|
||||
except AttributeError:
|
||||
logger.error("data doesn't contain expected URL")
|
||||
|
||||
# Controlla se i link sono validi
|
||||
if __comprueba_enlaces__:
|
||||
itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__)
|
||||
|
||||
# Requerido para FilterTools
|
||||
itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
|
||||
# Requerido para AutoPlay
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
# Opción "Añadir esta película a la biblioteca de KODI"
|
||||
if item.extra != "library":
|
||||
|
||||
itemlist.append(Item(channel=__channel__, title="Aggiungi alla Videoteca", text_color="green",
|
||||
action="add_pelicula_to_library", url=item.url,
|
||||
thumbnail= get_thumb('videolibrary', auto = True),
|
||||
contentTitle=item.contentTitle, infoLabels = item.infoLabels
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
# =========== def per cercare film/serietv =============
|
||||
#host+/index.php?do=search&story=avatar&subaction=search
|
||||
def search(item, text):
|
||||
logger.info("%s mainlist search log: %s %s" % (__channel__, item, text))
|
||||
itemlist = []
|
||||
text = text.replace(" ", "+")
|
||||
item.url = host+"/index.php?do=search&story=%s&subaction=search" % (text)
|
||||
#item.extra = "search"
|
||||
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.info("%s mainlist search log: %s" % (__channel__, line))
|
||||
return []
|
||||
|
||||
# =========== def per le novità nel menu principale =============
|
||||
|
||||
def newest(categoria):
|
||||
logger.info("%s mainlist search log: %s" % (__channel__, categoria))
|
||||
itemlist = []
|
||||
item = Item()
|
||||
#item.extra = 'film'
|
||||
try:
|
||||
if categoria == "film":
|
||||
item.url = host
|
||||
item.action = "peliculas"
|
||||
itemlist = peliculas(item)
|
||||
|
||||
if itemlist[-1].action == "peliculas":
|
||||
itemlist.pop()
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
@@ -1,44 +1,90 @@
|
||||
{
|
||||
"id": "eurostreaming",
|
||||
"name": "Eurostreaming",
|
||||
"language": ["ita"],
|
||||
"active": true,
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"thumbnail": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/eurostreaming.png",
|
||||
"banner": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/eurostreaming.png",
|
||||
"language": ["ita"],
|
||||
"thumbnail": "",
|
||||
"bannermenu": "",
|
||||
"categories": ["tvshow","anime"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Includi ricerca globale",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_series",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Serie TV",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_anime",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Anime",
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_italiano",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Italiano",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Includi ricerca globale",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "modo_grafico",
|
||||
"type": "bool",
|
||||
"label": "Buscar información extra",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_series",
|
||||
"type": "bool",
|
||||
"label": "Includi in novità - Serie TV",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_italiano",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Italiano",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "comprueba_enlaces",
|
||||
"type": "bool",
|
||||
"label": "Verifica se i link esistono",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "comprueba_enlaces_num",
|
||||
"type": "list",
|
||||
"label": "Numero de link da verificare",
|
||||
"default": 1,
|
||||
"enabled": true,
|
||||
"visible": "eq(-1,true)",
|
||||
"lvalues": [ "5", "10", "15", "20" ]
|
||||
},
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostra link in lingua...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"Non filtrare",
|
||||
"ITA",
|
||||
"SUB ITA"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "perfil",
|
||||
"type": "list",
|
||||
"label": "profilo dei colori",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"Sin color",
|
||||
"Perfil 5",
|
||||
"Perfil 4",
|
||||
"Perfil 3",
|
||||
"Perfil 2",
|
||||
"Perfil 1"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,65 +1,119 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Ringraziamo Icarus crew
|
||||
# Canale per eurostreaming
|
||||
# ------------------------------------------------------------
|
||||
import re, urlparse
|
||||
# -*- Created or modificated for Alfa-Addon -*-
|
||||
# -*- adpted for KOD -*-
|
||||
# -*- By Greko -*-
|
||||
|
||||
from channels import autoplay
|
||||
from core import scrapertools, httptools, servertools, tmdb, scrapertoolsV2
|
||||
from core.item import Item
|
||||
#import base64
|
||||
import re
|
||||
import urlparse
|
||||
# gli import sopra sono da includere all'occorrenza
|
||||
# per url con ad.fly
|
||||
from lib import unshortenit
|
||||
from platformcode import logger, config
|
||||
from channelselector import thumb
|
||||
|
||||
host = "https://eurostreaming.cafe"
|
||||
list_servers = ['verystream', 'openload', 'speedvideo', 'wstream', 'streamango' 'flashx', 'nowvideo']
|
||||
list_quality = ['default']
|
||||
from channelselector import get_thumb
|
||||
from channels import autoplay
|
||||
from channels import filtertools
|
||||
from core import httptools
|
||||
from core import scrapertoolsV2
|
||||
from core import servertools
|
||||
from core.item import Item
|
||||
from core import channeltools
|
||||
from core import tmdb
|
||||
from platformcode import config, logger
|
||||
|
||||
__channel__ = "eurostreaming" #stesso di id nel file json
|
||||
|
||||
#host = "https://eurostreaming.zone/"
|
||||
#host = "https://eurostreaming.black/"
|
||||
host = "https://eurostreaming.cafe/" #aggiornato al 30-04-2019
|
||||
|
||||
# ======== def per utility INIZIO =============================
|
||||
try:
|
||||
__modo_grafico__ = config.get_setting('modo_grafico', __channel__)
|
||||
__perfil__ = int(config.get_setting('perfil', __channel__))
|
||||
except:
|
||||
__modo_grafico__ = True
|
||||
__perfil__ = 0
|
||||
|
||||
# Fijar perfil de color
|
||||
perfil = [['0xFFFFE6CC', '0xFFFFCE9C', '0xFF994D00', '0xFFFE2E2E', '0xFFFFD700'],
|
||||
['0xFFA5F6AF', '0xFF5FDA6D', '0xFF11811E', '0xFFFE2E2E', '0xFFFFD700'],
|
||||
['0xFF58D3F7', '0xFF2E9AFE', '0xFF2E64FE', '0xFFFE2E2E', '0xFFFFD700']]
|
||||
|
||||
if __perfil__ < 3:
|
||||
color1, color2, color3, color4, color5 = perfil[__perfil__]
|
||||
else:
|
||||
color1 = color2 = color3 = color4 = color5 = ""
|
||||
|
||||
__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', __channel__)
|
||||
__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', __channel__)
|
||||
|
||||
headers = [['User-Agent', 'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'],
|
||||
['Referer', host]]#,['Accept-Language','it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3']]
|
||||
|
||||
parameters = channeltools.get_channel_parameters(__channel__)
|
||||
fanart_host = parameters['fanart']
|
||||
thumbnail_host = parameters['thumbnail']
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT', 'VOSI':'SUB ITA'}
|
||||
list_language = IDIOMAS.values()
|
||||
# per l'autoplay
|
||||
list_servers = ['openload', 'speedvideo', 'wstream', 'streamango' 'flashx', 'nowvideo']
|
||||
list_quality = ['default']
|
||||
|
||||
# =========== home menu ===================
|
||||
|
||||
def mainlist(item):
|
||||
logger.info("kod.eurostreaming mainlist")
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
logger.info("icarus.eurostreaming mainlist")
|
||||
itemlist = []
|
||||
title = ''
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist = [
|
||||
Item(
|
||||
channel=item.channel,
|
||||
title="[B]Serie TV[/B]",
|
||||
action="serietv",
|
||||
extra="tvshow",
|
||||
Item(channel=__channel__, title="Serie TV",
|
||||
contentTitle = __channel__, action="serietv",
|
||||
#extra="tvshow",
|
||||
text_color=color4,
|
||||
url="%s/category/serie-tv-archive/" % 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="[B]Anime / Cartoni[/B]",
|
||||
infoLabels={'plot': item.category},
|
||||
thumbnail = get_thumb(title, auto = True)
|
||||
),
|
||||
Item(channel=__channel__, title="Ultimi Aggiornamenti",
|
||||
contentTitle = __channel__, action="elenco_aggiornamenti_serietv",
|
||||
text_color=color4, url="%saggiornamento-episodi/" % host,
|
||||
#category = __channel__,
|
||||
extra="tvshow",
|
||||
infoLabels={'plot': item.category},
|
||||
thumbnail = get_thumb(title, auto = True)
|
||||
),
|
||||
Item(channel=__channel__,
|
||||
title="Anime / Cartoni",
|
||||
action="serietv",
|
||||
extra="tvshow",
|
||||
text_color=color4,
|
||||
url="%s/category/anime-cartoni-animati/" % host,
|
||||
thumbnail=
|
||||
"http://orig09.deviantart.net/df5a/f/2014/169/2/a/fist_of_the_north_star_folder_icon_by_minacsky_saya-d7mq8c8.png"
|
||||
),
|
||||
Item(
|
||||
channel=item.channel,
|
||||
title="[COLOR blue]Cerca...[/COLOR]",
|
||||
thumbnail= get_thumb(title, auto = True)
|
||||
),
|
||||
Item(channel=__channel__,
|
||||
title="[COLOR yellow]Cerca...[/COLOR]",
|
||||
action="search",
|
||||
extra="tvshow",
|
||||
thumbnail=
|
||||
"http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search")
|
||||
text_color=color4,
|
||||
thumbnail= get_thumb(title, auto = True)
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
itemlist = thumb(itemlist)
|
||||
|
||||
|
||||
return itemlist
|
||||
|
||||
# ======== def in ordine di menu ===========================
|
||||
|
||||
def serietv(item):
|
||||
logger.info("kod.eurostreaming peliculas")
|
||||
|
||||
logger.info("%s serietv log: %s" % (__channel__, item))
|
||||
itemlist = []
|
||||
|
||||
# Carica la pagina
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
@@ -68,29 +122,30 @@ def serietv(item):
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedtitle, scrapedthumbnail in matches:
|
||||
scrapedplot = ""
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle.replace("Streaming", ""))
|
||||
#scrapedplot = ""
|
||||
scrapedtitle = scrapertoolsV2.decodeHtmlentities(scrapedtitle)#.replace("Streaming", ""))
|
||||
if scrapedtitle.startswith("Link to "):
|
||||
scrapedtitle = scrapedtitle[8:]
|
||||
# num = scrapertools.find_single_match(scrapedurl, '(-\d+/)')
|
||||
# if num:
|
||||
# scrapedurl = scrapedurl.replace(num, "-episodi/")
|
||||
num = scrapertoolsV2.find_single_match(scrapedurl, '(-\d+/)')
|
||||
if num:
|
||||
scrapedurl = scrapedurl.replace(num, "-episodi/")
|
||||
itemlist.append(
|
||||
Item(
|
||||
channel=item.channel,
|
||||
Item(channel=item.channel,
|
||||
action="episodios",
|
||||
contentType="tvshow",
|
||||
#contentType="tvshow",
|
||||
contentSerieName = scrapedtitle,
|
||||
title=scrapedtitle,
|
||||
fulltitle=scrapedtitle,
|
||||
text_color="azure",
|
||||
#text_color="azure",
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail,
|
||||
plot=scrapedplot,
|
||||
show=scrapedtitle,
|
||||
#plot=scrapedplot,
|
||||
show=item.show,
|
||||
extra=item.extra,
|
||||
folder=True))
|
||||
folder=True
|
||||
))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
# locandine e trama e altro da tmdb se presente l'anno migliora la ricerca
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True, idioma_busqueda='it')
|
||||
|
||||
# Paginazione
|
||||
patronvideos = '<a class="next page-numbers" href="?([^>"]+)">Avanti »</a>'
|
||||
@@ -102,17 +157,125 @@ def serietv(item):
|
||||
Item(
|
||||
channel=item.channel,
|
||||
action="serietv",
|
||||
title="[COLOR blue]" + config.get_localized_string(30992) + "[/COLOR]",
|
||||
title="[COLOR lightgreen]" + config.get_localized_string(30992) + "[/COLOR]",
|
||||
url=scrapedurl,
|
||||
thumbnail=thumb(),
|
||||
thumbnail=
|
||||
"http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png",
|
||||
extra=item.extra,
|
||||
folder=True))
|
||||
|
||||
return itemlist
|
||||
|
||||
def episodios(item):
|
||||
#logger.info("%s episodios log: %s" % (__channel__, item))
|
||||
itemlist = []
|
||||
|
||||
if not(item.lang):
|
||||
lang_season = {'ITA':0, 'SUB ITA' :0}
|
||||
# Download pagina
|
||||
data = httptools.downloadpage(item.url).data
|
||||
#========
|
||||
if 'clicca qui per aprire' in data.lower():
|
||||
logger.info("%s CLICCA QUI PER APRIRE GLI EPISODI log: %s" % (__channel__, item))
|
||||
item.url = scrapertoolsV2.find_single_match(data, '"go_to":"(.*?)"')
|
||||
item.url = item.url.replace("\\","")
|
||||
# Carica la pagina
|
||||
data = httptools.downloadpage(item.url).data
|
||||
#logger.info("%s FINE CLICCA QUI PER APRIRE GLI EPISODI log: %s" % (__channel__, item))
|
||||
elif 'clicca qui</span>' in data.lower():
|
||||
logger.info("%s inizio CLICCA QUI</span> log: %s" % (__channel__, item))
|
||||
item.url = scrapertoolsV2.find_single_match(data, '<h2 style="text-align: center;"><a href="(.*?)">')
|
||||
data = httptools.downloadpage(item.url).data
|
||||
#logger.info("%s fine CLICCA QUI</span> log: %s" % (__channel__, item))
|
||||
#=========
|
||||
data = scrapertoolsV2.decodeHtmlentities(data)
|
||||
bloque = scrapertoolsV2.find_single_match(data, '<div class="su-accordion">(.*?)<div class="clear"></div>')
|
||||
patron = '<span class="su-spoiler-icon"></span>(.*?)</div>'
|
||||
matches = scrapertoolsV2.find_multiple_matches(bloque, patron)
|
||||
for scrapedseason in matches:
|
||||
#logger.info("%s scrapedseason log: %s" % (__channel__, scrapedseason))
|
||||
if "(SUB ITA)" in scrapedseason.upper():
|
||||
lang = "SUB ITA"
|
||||
lang_season['SUB ITA'] +=1
|
||||
else:
|
||||
lang = "ITA"
|
||||
lang_season['ITA'] +=1
|
||||
#logger.info("%s lang_dict log: %s" % (__channel__, lang_season))
|
||||
|
||||
for lang in sorted(lang_season):
|
||||
if lang_season[lang] > 0:
|
||||
itemlist.append(
|
||||
Item(channel = item.channel,
|
||||
action = "episodios",
|
||||
#contentType = "episode",
|
||||
contentSerieName = item.title,
|
||||
title = '%s (%s)' % (item.title, lang),
|
||||
url = item.url,
|
||||
fulltitle = item.title,
|
||||
data = data,
|
||||
lang = lang,
|
||||
show = item.show,
|
||||
folder = True,
|
||||
))
|
||||
|
||||
# locandine e trama e altro da tmdb se presente l'anno migliora la ricerca
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True, idioma_busqueda='it')
|
||||
|
||||
return itemlist
|
||||
|
||||
else:
|
||||
# qui ci vanno le puntate delle stagioni
|
||||
html = item.data
|
||||
logger.info("%s else log: [%s]" % (__channel__, item))
|
||||
|
||||
if item.lang == 'SUB ITA':
|
||||
item.lang = '\(SUB ITA\)'
|
||||
logger.info("%s item.lang log: %s" % (__channel__, item.lang))
|
||||
bloque = scrapertoolsV2.find_single_match(html, '<div class="su-accordion">(.*?)<div class="clear"></div>')
|
||||
patron = '<span class="su-spoiler-icon"></span>.*?'+item.lang+'</div>(.*?)</div>' # leggo tutte le stagioni
|
||||
#logger.info("%s patronpatron log: %s" % (__channel__, patron))
|
||||
matches = scrapertoolsV2.find_multiple_matches(bloque, patron)
|
||||
for scrapedseason in matches:
|
||||
#logger.info("%s scrapedseasonscrapedseason log: %s" % (__channel__, scrapedseason))
|
||||
scrapedseason = scrapedseason.replace('<strong>','').replace('</strong>','')
|
||||
patron = '(\d+)×(\d+)(.*?)<(.*?)<br />' # stagione - puntanta - titolo - gruppo link
|
||||
matches = scrapertoolsV2.find_multiple_matches(scrapedseason, patron)
|
||||
for scrapedseason, scrapedpuntata, scrapedtitolo, scrapedgroupurl in matches:
|
||||
#logger.info("%s finale log: %s" % (__channel__, patron))
|
||||
scrapedtitolo = scrapedtitolo.replace('–','')
|
||||
itemlist.append(Item(channel = item.channel,
|
||||
action = "findvideos",
|
||||
contentType = "episode",
|
||||
#contentSerieName = item.contentSerieName,
|
||||
contentTitle = scrapedtitolo,
|
||||
title = '%sx%s %s' % (scrapedseason, scrapedpuntata, scrapedtitolo),
|
||||
url = scrapedgroupurl,
|
||||
fulltitle = item.fulltitle,
|
||||
#show = item.show,
|
||||
#folder = True,
|
||||
))
|
||||
|
||||
logger.info("%s itemlistitemlist log: %s" % (__channel__, itemlist))
|
||||
|
||||
# Opción "Añadir esta película a la biblioteca de KODI"
|
||||
if item.extra != "library":
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos':
|
||||
itemlist.append(Item(channel=item.channel, title="%s" % config.get_localized_string(30161),
|
||||
text_color="green", extra="episodios",
|
||||
action="add_serie_to_library", url=item.url,
|
||||
thumbnail= get_thumb('videolibrary', auto = True),
|
||||
contentTitle=item.contentSerieName, lang = item.lang,
|
||||
show=item.show, data = html
|
||||
#, infoLabels = item.infoLabels
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
# =========== def ricerca =============
|
||||
def search(item, texto):
|
||||
logger.info("[eurostreaming.py] " + item.url + " search " + texto)
|
||||
item.url = "%s/?s=%s" % (host, texto)
|
||||
#logger.info("[eurostreaming.py] " + item.url + " search " + texto)
|
||||
logger.info("%s search log: %s" % (__channel__, item))
|
||||
item.url = "%s?s=%s" % (host, texto)
|
||||
try:
|
||||
return serietv(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
@@ -122,116 +285,122 @@ def search(item, texto):
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def episodios(item):
|
||||
def load_episodios(html, item, itemlist, lang_title):
|
||||
patron = '((?:.*?<a[^h]+href="[^"]+"[^>]+>[^<][^<]+<(?:b|\/)[^>]+>)+)'
|
||||
matches = re.compile(patron).findall(html)
|
||||
for data in matches:
|
||||
# Estrazione
|
||||
|
||||
scrapedtitle = data.split('<a ')[0]
|
||||
scrapedtitle = re.sub(r'<[^>]*>', '', scrapedtitle).strip()
|
||||
if scrapedtitle != 'Categorie':
|
||||
scrapedtitle = scrapedtitle.replace('×', 'x')
|
||||
scrapedtitle = scrapedtitle.replace('×', 'x')
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
contentType="episode",
|
||||
title="[COLOR azure]%s[/COLOR]" % (scrapedtitle + " (" + lang_title + ")"),
|
||||
url=data,
|
||||
thumbnail=item.thumbnail,
|
||||
extra=item.extra,
|
||||
fulltitle=scrapedtitle + " (" + lang_title + ")" + ' - ' + item.show,
|
||||
show=item.show))
|
||||
|
||||
logger.info("[eurostreaming.py] episodios")
|
||||
|
||||
# =========== def novità in ricerca globale =============
|
||||
def newest(categoria):
|
||||
logger.info("%s newest log: %s" % (__channel__, categoria))
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
|
||||
item.url = "%saggiornamento-episodi/" % host
|
||||
item.action = "elenco_aggiornamenti_serietv"
|
||||
itemlist = elenco_aggiornamenti_serietv(item)
|
||||
|
||||
# Download pagina
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = scrapertools.decodeHtmlentities(data)
|
||||
link = False
|
||||
if itemlist[-1].action == "elenco_aggiornamenti_serietv":
|
||||
itemlist.pop()
|
||||
|
||||
if scrapertoolsV2.find_single_match(data, '<div class="nano_cp_container"><span.*?CLICCA QUI'):
|
||||
item.url = scrapertoolsV2.find_single_match(data, '<script type="text\/javascript">.*?var nano_ajax_object =.*?"go_to":"(.*?)"').replace('\\', '')
|
||||
link = True
|
||||
else:
|
||||
match = scrapertoolsV2.find_single_match(data, '<h3 style="text-align: center;">.*?<a href="(.*?)">.{0,5}<span.*?CLICCA QUI.*?</a></h3>')
|
||||
if match != '':
|
||||
item.url = match
|
||||
link = True
|
||||
if link:
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = scrapertools.decodeHtmlentities(data)
|
||||
|
||||
data = scrapertoolsV2.find_single_match(data, '<div class="su-accordion">(.+?)<div class="clear">')
|
||||
|
||||
lang_titles = []
|
||||
starts = []
|
||||
patron = r"STAGIONE.*?ITA"
|
||||
matches = re.compile(patron, re.IGNORECASE).finditer(data)
|
||||
|
||||
for match in matches:
|
||||
season_title = match.group()
|
||||
|
||||
if season_title != '':
|
||||
lang_titles.append('SUB ITA' if 'SUB' in season_title.upper() else 'ITA')
|
||||
starts.append(match.end())
|
||||
|
||||
i = 1
|
||||
len_lang_titles = len(lang_titles)
|
||||
|
||||
while i <= len_lang_titles:
|
||||
inizio = starts[i - 1]
|
||||
fine = starts[i] if i < len_lang_titles else -1
|
||||
|
||||
html = data[inizio:fine]
|
||||
lang_title = lang_titles[i - 1]
|
||||
|
||||
load_episodios(html, item, itemlist, lang_title)
|
||||
|
||||
i += 1
|
||||
|
||||
if config.get_videolibrary_support() and len(itemlist) != 0:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR lightblue]%s[/COLOR]" % config.get_localized_string(30161),
|
||||
url=item.url,
|
||||
action="add_serie_to_library",
|
||||
extra="episodios",
|
||||
show=item.show))
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
# =========== def pagina aggiornamenti =============
|
||||
|
||||
# ======== Ultimi Aggiornamenti ===========================
|
||||
def elenco_aggiornamenti_serietv(item):
|
||||
"""
|
||||
def per la lista degli aggiornamenti
|
||||
"""
|
||||
logger.info("%s elenco_aggiornamenti_serietv log: %s" % (__channel__, item))
|
||||
itemlist = []
|
||||
|
||||
# Carica la pagina
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
# Estrae i contenuti
|
||||
#bloque = scrapertoolsV2.get_match(data, '<div class="entry">(.*?)<div class="clear"></div>')
|
||||
bloque = scrapertoolsV2.find_single_match(data, '<div class="entry">(.*?)<div class="clear"></div>')
|
||||
patron = '<span class="serieTitle".*?>(.*?)<.*?href="(.*?)".*?>(.*?)<'
|
||||
matches = scrapertoolsV2.find_multiple_matches(bloque, patron)
|
||||
|
||||
for scrapedtitle, scrapedurl, scrapedepisodies in matches:
|
||||
if "(SUB ITA)" in scrapedepisodies.upper():
|
||||
lang = "SUB ITA"
|
||||
scrapedepisodies = scrapedepisodies.replace('(SUB ITA)','')
|
||||
else:
|
||||
lang = "ITA"
|
||||
scrapedepisodies = scrapedepisodies.replace(lang,'')
|
||||
#num = scrapertoolsV2.find_single_match(scrapedepisodies, '(-\d+/)')
|
||||
#if num:
|
||||
# scrapedurl = scrapedurl.replace(num, "-episodi/")
|
||||
scrapedtitle = scrapedtitle.replace("–", "").replace('\xe2\x80\x93 ','').strip()
|
||||
scrapedepisodies = scrapedepisodies.replace('\xe2\x80\x93 ','').strip()
|
||||
itemlist.append(
|
||||
Item(
|
||||
channel=item.channel,
|
||||
action="episodios",
|
||||
contentType="tvshow",
|
||||
title = "%s" % scrapedtitle, # %s" % (scrapedtitle, scrapedepisodies),
|
||||
fulltitle = "%s %s" % (scrapedtitle, scrapedepisodies),
|
||||
text_color = color5,
|
||||
url = scrapedurl,
|
||||
#show = "%s %s" % (scrapedtitle, scrapedepisodies),
|
||||
extra=item.extra,
|
||||
#lang = lang,
|
||||
#data = data,
|
||||
folder=True))
|
||||
|
||||
# locandine e trama e altro da tmdb se presente l'anno migliora la ricerca
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True, idioma_busqueda='it')
|
||||
|
||||
return itemlist
|
||||
|
||||
# =========== def per trovare i video =============
|
||||
|
||||
def findvideos(item):
|
||||
logger.info("kod.eurostreaming findvideos")
|
||||
logger.info("%s findvideos log: %s" % (__channel__, item))
|
||||
itemlist = []
|
||||
|
||||
# Carica la pagina
|
||||
data = item.url
|
||||
|
||||
matches = re.findall(r'<a href="([^"]+)"[^>]*>[^<]+</a>', data, re.DOTALL)
|
||||
matches = re.findall(r'a href="([^"]+)"[^>]*>[^<]+</a>', data, re.DOTALL)
|
||||
|
||||
data = []
|
||||
for url in matches:
|
||||
url, c = unshortenit.unshorten(url)
|
||||
data.append(url)
|
||||
|
||||
itemlist = servertools.find_video_items(data=str(data))
|
||||
try:
|
||||
itemlist = servertools.find_video_items(data=str(data))
|
||||
|
||||
for videoitem in itemlist:
|
||||
videoitem.title = item.title + videoitem.title
|
||||
videoitem.fulltitle = item.fulltitle
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
videoitem.show = item.show
|
||||
videoitem.plot = item.plot
|
||||
videoitem.channel = item.channel
|
||||
videoitem.contentType = item.contentType
|
||||
for videoitem in itemlist:
|
||||
logger.info("Videoitemlist2: %s" % videoitem)
|
||||
videoitem.title = "%s [%s]" % (item.contentTitle, videoitem.title)#"[%s] %s" % (videoitem.server, item.title) #"[%s]" % (videoitem.title)
|
||||
videoitem.show = item.show
|
||||
videoitem.contentTitle = item.contentTitle
|
||||
videoitem.contentType = item.contentType
|
||||
videoitem.channel = item.channel
|
||||
videoitem.text_color = color5
|
||||
#videoitem.language = item.language
|
||||
videoitem.year = item.infoLabels['year']
|
||||
videoitem.infoLabels['plot'] = item.infoLabels['plot']
|
||||
except AttributeError:
|
||||
logger.error("data doesn't contain expected URL")
|
||||
|
||||
# Controlla se i link sono validi
|
||||
if __comprueba_enlaces__:
|
||||
itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__)
|
||||
|
||||
# Requerido para FilterTools
|
||||
itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
|
||||
# Requerido para AutoPlay
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -17,119 +17,152 @@ from core.item import Item
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
thumb_dict = {"movies": "https://s10.postimg.cc/fxtqzdog9/peliculas.png",
|
||||
"tvshows": "https://s10.postimg.cc/kxvslawe1/series.png",
|
||||
"all": "https://s10.postimg.cc/h1igpgw0p/todas.png",
|
||||
"genres": "https://s10.postimg.cc/6c4rx3x1l/generos.png",
|
||||
"search": "https://s10.postimg.cc/v985e2izd/buscar.png",
|
||||
"quality": "https://s10.postimg.cc/9bbojsbjd/calidad.png",
|
||||
"audio": "https://s10.postimg.cc/b34nern7d/audio.png",
|
||||
"newest": "https://s10.postimg.cc/g1s5tf1bt/novedades.png",
|
||||
"last": "https://s10.postimg.cc/i6ciuk0eh/ultimas.png",
|
||||
"hot": "https://s10.postimg.cc/yu40x8q2x/destacadas.png",
|
||||
"year": "https://s10.postimg.cc/atzrqg921/a_o.png",
|
||||
"alphabet": "https://s10.postimg.cc/4dy3ytmgp/a-z.png",
|
||||
"recomended": "https://s10.postimg.cc/7xk1oqccp/recomendadas.png",
|
||||
"more watched": "https://s10.postimg.cc/c6orr5neh/masvistas.png",
|
||||
"more voted": "https://s10.postimg.cc/lwns2d015/masvotadas.png",
|
||||
"favorites": "https://s10.postimg.cc/rtg147gih/favoritas.png",
|
||||
"colections": "https://s10.postimg.cc/ywnwjvytl/colecciones.png",
|
||||
"categories": "https://s10.postimg.cc/v0ako5lmh/categorias.png",
|
||||
"premieres": "https://s10.postimg.cc/sk8r9xdq1/estrenos.png",
|
||||
"documentaries": "https://s10.postimg.cc/68aygmmcp/documentales.png",
|
||||
"language": "https://s10.postimg.cc/6wci189ft/idioma.png",
|
||||
"new episodes": "https://s10.postimg.cc/fu4iwpnqh/nuevoscapitulos.png",
|
||||
"country": "https://s10.postimg.cc/yz0h81j15/pais.png",
|
||||
"adults": "https://s10.postimg.cc/s8raxc51l/adultos.png",
|
||||
"recents": "https://s10.postimg.cc/649u24kp5/recents.png",
|
||||
"updated" : "https://s10.postimg.cc/46m3h6h9l/updated.png",
|
||||
"actors": "https://i.postimg.cc/tC2HMhVV/actors.png",
|
||||
"cast": "https://i.postimg.cc/qvfP5Xvt/cast.png",
|
||||
"lat": "https://i.postimg.cc/Gt8fMH0J/lat.png",
|
||||
"vose": "https://i.postimg.cc/kgmnbd8h/vose.png",
|
||||
thumb_dict = {
|
||||
"numbers": "http://icons.iconarchive.com/icons/custom-icon-design/pretty-office-10/256/Numbers-icon.png",
|
||||
"a": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-A-black-icon.png",
|
||||
"accion": "https://s14.postimg.cc/sqy3q2aht/action.png",
|
||||
"actors": "https://i.postimg.cc/tC2HMhVV/actors.png",
|
||||
"adolescente" : "https://s10.postimg.cc/inq7u4p61/teens.png",
|
||||
"adultos": "https://s10.postimg.cc/s8raxc51l/adultos.png",
|
||||
"adults": "https://s10.postimg.cc/s8raxc51l/adultos.png",
|
||||
"alcinema": "http://icons.iconarchive.com/icons/chromatix/aerial/256/movie-icon.png", #"http://icons.iconarchive.com/icons/itzikgur/my-seven/256/Movies-Films-icon.png",
|
||||
"all": "https://s10.postimg.cc/h1igpgw0p/todas.png",
|
||||
"alphabet": "https://s10.postimg.cc/4dy3ytmgp/a-z.png",
|
||||
"animacion": "https://s14.postimg.cc/vl193mupd/animation.png",
|
||||
"anime" : "https://s10.postimg.cc/n9mc2ikzt/anime.png",
|
||||
"artes marciales" : "https://s10.postimg.cc/4u1v51tzt/martial_arts.png",
|
||||
"asiaticas" : "https://i.postimg.cc/Xq0HXD5d/asiaticas.png",
|
||||
"aventura": "https://s14.postimg.cc/ky7fy5he9/adventure.png",
|
||||
"audio": "https://s10.postimg.cc/b34nern7d/audio.png",
|
||||
"aventura": "http://icons.iconarchive.com/icons/sirubico/movie-genre/256/Adventure-2-icon.png",#"https://s14.postimg.cc/ky7fy5he9/adventure.png",
|
||||
"b": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-B-black-icon.png",
|
||||
"belico": "https://s14.postimg.cc/5e027lru9/war.png",
|
||||
"biografia" : "https://s10.postimg.cc/jq0ecjxnt/biographic.png",
|
||||
"c": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-C-black-icon.png",
|
||||
"carreras": "https://s14.postimg.cc/yt5qgdr69/races.png",
|
||||
"cast": "https://i.postimg.cc/qvfP5Xvt/cast.png",
|
||||
"categories": "https://s10.postimg.cc/v0ako5lmh/categorias.png",
|
||||
"ciencia ficcion": "https://s14.postimg.cc/8kulr2jy9/scifi.png",
|
||||
"cine negro" : "https://s10.postimg.cc/6ym862qgp/noir.png",
|
||||
"colections": "https://s10.postimg.cc/ywnwjvytl/colecciones.png",
|
||||
"comedia": "https://s14.postimg.cc/9ym8moog1/comedy.png",
|
||||
"cortometraje" : "https://s10.postimg.cc/qggvlxndl/shortfilm.png",
|
||||
"country": "https://s10.postimg.cc/yz0h81j15/pais.png",
|
||||
"crimen": "https://s14.postimg.cc/duzkipjq9/crime.png",
|
||||
"d": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-D-black-icon.png",
|
||||
"de la tv": "https://s10.postimg.cc/94gj0iwh5/image.png",
|
||||
"deporte": "https://s14.postimg.cc/x1crlnnap/sports.png",
|
||||
"destacadas": "https://s10.postimg.cc/yu40x8q2x/destacadas.png",
|
||||
"documental": "https://s10.postimg.cc/68aygmmcp/documentales.png",
|
||||
"documentaries": "https://s10.postimg.cc/68aygmmcp/documentales.png",
|
||||
"doramas":"https://s10.postimg.cc/h4dyr4nfd/doramas.png",
|
||||
"drama": "https://s14.postimg.cc/fzjxjtnxt/drama.png",
|
||||
"e": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-E-black-icon.png",
|
||||
"erotica" : "https://s10.postimg.cc/dcbb9bfx5/erotic.png",
|
||||
"espanolas" : "https://s10.postimg.cc/x1y6zikx5/spanish.png",
|
||||
"estrenos" : "https://s10.postimg.cc/sk8r9xdq1/estrenos.png",
|
||||
"extranjera": "https://s10.postimg.cc/f44a4eerd/foreign.png",
|
||||
"f": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-F-black-icon.png",
|
||||
"familiar": "https://s14.postimg.cc/jj5v9ndsx/family.png",
|
||||
"fantasia": "https://s14.postimg.cc/p7c60ksg1/fantasy.png",
|
||||
"fantastico" : "https://s10.postimg.cc/tedufx5eh/fantastic.png",
|
||||
"favorites": "https://s10.postimg.cc/rtg147gih/favoritas.png",
|
||||
"g": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-G-black-icon.png",
|
||||
"genres": "https://s10.postimg.cc/6c4rx3x1l/generos.png",
|
||||
"h": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-H-black-icon.png",
|
||||
"historica": "https://s10.postimg.cc/p1faxj6yh/historic.png",
|
||||
"horror" : "https://s10.postimg.cc/8exqo6yih/horror2.png",
|
||||
"hot": "https://s10.postimg.cc/yu40x8q2x/destacadas.png",
|
||||
"i": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-I-black-icon.png",
|
||||
"infantil": "https://s14.postimg.cc/4zyq842mp/childish.png",
|
||||
"intriga": "https://s14.postimg.cc/5qrgdimw1/intrigue.png",
|
||||
"j": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-J-black-icon.png",
|
||||
"k": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-K-black-icon.png",
|
||||
"l": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-L-black-icon.png",
|
||||
"language": "https://s10.postimg.cc/6wci189ft/idioma.png",
|
||||
"last": "https://s10.postimg.cc/i6ciuk0eh/ultimas.png",
|
||||
"lat": "https://i.postimg.cc/Gt8fMH0J/lat.png",
|
||||
"latino" : "https://s10.postimg.cc/swip0b86h/latin.png",
|
||||
"m": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-M-black-icon.png",
|
||||
"mexicanas" : "https://s10.postimg.cc/swip0b86h/latin.png",
|
||||
"misterio": "https://s14.postimg.cc/3m73cg8ep/mistery.png",
|
||||
"more voted": "https://s10.postimg.cc/lwns2d015/masvotadas.png",
|
||||
"more watched": "https://s10.postimg.cc/c6orr5neh/masvistas.png",
|
||||
"movies": "https://s10.postimg.cc/fxtqzdog9/peliculas.png",
|
||||
"musical": "https://s10.postimg.cc/hy7fhtecp/musical.png",
|
||||
"n": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-N-black-icon.png",
|
||||
"new episodes": "https://s10.postimg.cc/fu4iwpnqh/nuevoscapitulos.png",
|
||||
"newest": "http://icons.iconarchive.com/icons/laurent-baumann/creme/128/Location-News-icon.png", #"http://icons.iconarchive.com/icons/uiconstock/ios8-setting/128/news-icon.png",
|
||||
"nextpage": "http://icons.iconarchive.com/icons/custom-icon-design/pretty-office-5/256/navigate-right-icon.png", #"http://icons.iconarchive.com/icons/custom-icon-design/office/256/forward-icon.png", #"http://icons.iconarchive.com/icons/ahmadhania/spherical/128/forward-icon.png",
|
||||
"o": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-O-black-icon.png",
|
||||
"others": "http://icons.iconarchive.com/icons/limav/movie-genres-folder/128/Others-icon.png",
|
||||
"p": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-P-black-icon.png",
|
||||
"peleas" : "https://s10.postimg.cc/7a3ojbjwp/Fight.png",
|
||||
"policial" : "https://s10.postimg.cc/wsw0wbgbd/cops.png",
|
||||
"premieres": "https://s10.postimg.cc/sk8r9xdq1/estrenos.png",
|
||||
"q": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-Q-black-icon.png",
|
||||
"quality": "https://s10.postimg.cc/9bbojsbjd/calidad.png",
|
||||
"r": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-R-black-icon.png",
|
||||
"recents": "https://s10.postimg.cc/649u24kp5/recents.png",
|
||||
"recomendadas": "https://s10.postimg.cc/7xk1oqccp/recomendadas.png",
|
||||
"recomended": "https://s10.postimg.cc/7xk1oqccp/recomendadas.png",
|
||||
"religion" : "https://s10.postimg.cc/44j2skquh/religion.png",
|
||||
"romance" : "https://s10.postimg.cc/yn8vdll6x/romance.png",
|
||||
"romantica": "https://s14.postimg.cc/8xlzx7cht/romantic.png",
|
||||
"s": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-S-black-icon.png",
|
||||
"search": "http://icons.iconarchive.com/icons/jamespeng/movie/256/database-icon.png",
|
||||
"suspenso": "https://s10.postimg.cc/7peybxdfd/suspense.png",
|
||||
"t": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-T-black-icon.png",
|
||||
"telenovelas": "https://i.postimg.cc/QCXZkyDM/telenovelas.png",
|
||||
"terror": "https://s14.postimg.cc/thqtvl52p/horror.png",
|
||||
"thriller": "https://s14.postimg.cc/uwsekl8td/thriller.png",
|
||||
"western": "https://s10.postimg.cc/5wc1nokjt/western.png"
|
||||
"tvshows": "https://s10.postimg.cc/kxvslawe1/series.png",
|
||||
"u": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-U-black-icon.png",
|
||||
"ultimiarrivi" : "http://icons.iconarchive.com/icons/saki/snowish/128/Extras-internet-download-icon.png",
|
||||
"updated" : "https://s10.postimg.cc/46m3h6h9l/updated.png",
|
||||
"v": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-V-black-icon.png",
|
||||
"vose": "https://i.postimg.cc/kgmnbd8h/vose.png",
|
||||
"w": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-W-black-icon.png",
|
||||
"western": "https://s10.postimg.cc/5wc1nokjt/western.png",
|
||||
"x": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-X-black-icon.png",
|
||||
"y": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-Y-black-icon.png",
|
||||
"year": "https://s10.postimg.cc/atzrqg921/a_o.png",
|
||||
"z": "http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-Z-black-icon.png"
|
||||
}
|
||||
|
||||
def set_genre(string):
|
||||
#logger.info()
|
||||
|
||||
genres_dict = {'accion':['accion', 'action', 'accion y aventura', 'action & adventure'],
|
||||
'adultos':['adultos', 'adultos +', 'adulto'],
|
||||
'animacion':['animacion', 'animacion e infantil', 'dibujos animados'],
|
||||
'adolescente':['adolescente', 'adolescentes', 'adolescencia', 'adolecentes'],
|
||||
'aventura':['aventura', 'aventuras'],
|
||||
'belico':['belico', 'belica', 'belicas', 'guerra', 'belico guerra'],
|
||||
'biografia':['biografia', 'biografias', 'biografica', 'biograficas', 'biografico'],
|
||||
genres_dict = {'accion':['azione'],
|
||||
'adultos':['adulto','adulti'],
|
||||
'animacion':['animazione'],
|
||||
'adolescente':['adolescente', 'adolescenti'],
|
||||
'aventura':['avventura'],
|
||||
'belico':['guerra','guerriglia'],
|
||||
'biografia':['biografia', 'biografie', 'biografico'],
|
||||
'ciencia ficcion':['ciencia ficcion', 'cienciaficcion', 'sci fi', 'c ficcion'],
|
||||
'cine negro':['film noir', 'negro'],
|
||||
'comedia':['comedia', 'comedias'],
|
||||
'cortometraje':['cortometraje', 'corto', 'cortos'],
|
||||
'de la tv':['de la tv', 'television', 'tv'],
|
||||
'cine negro':['film noir'],
|
||||
'comedia':['commedia', 'commedie'],
|
||||
'cortometraje':['cortometraggio', 'corto', 'corti'],
|
||||
'de la tv':['della tv', 'televisione', 'tv'],
|
||||
'deporte':['deporte', 'deportes'],
|
||||
'destacadas':['destacada', 'destacadas'],
|
||||
'documental':['documental', 'documentales'],
|
||||
'documental':['documentario', 'documentari'],
|
||||
'erotica':['erotica', 'erotica +', 'eroticas', 'eroticas +', 'erotico', 'erotico +'],
|
||||
'estrenos':['estrenos', 'estrenos'],
|
||||
'extranjera':['extrajera', 'extrajeras', 'foreign'],
|
||||
'familiar':['familiar', 'familia'],
|
||||
'fantastico':['fantastico', 'fantastica', 'fantasticas'],
|
||||
'historica':['historica', 'historicas', 'historico', 'historia'],
|
||||
'infantil':['infantil', 'kids'],
|
||||
'musical':['musical', 'musicales', 'musica'],
|
||||
'policial':['policial', 'policiaco', 'policiaca'],
|
||||
'recomendadas':['recomedada', 'recomendadas'],
|
||||
'religion':['religion', 'religiosa', 'religiosas'],
|
||||
'romantica':['romantica', 'romanticas', 'romantico'],
|
||||
'familiar':['familiare', 'famiglia'],
|
||||
'fantastico':['fantastico', 'fantastica', 'fantastici'],
|
||||
'historica':['storico', 'storia'],
|
||||
'infantil':['bambini', 'infanzia'],
|
||||
'musical':['musicale', 'musical', 'musica'],
|
||||
'numbers': ['0','1','2','3','4','5','6','7','8','9'],
|
||||
'policial':['politico', 'politici', 'politica'],
|
||||
'recomendadas':['raccomandato', 'raccomandati'],
|
||||
'religion':['religione', 'religioso', 'religiosa','religiosi'],
|
||||
'romantica':['romantica', 'romantico', 'romantici'],
|
||||
'suspenso':['suspenso', 'suspense'],
|
||||
'thriller':['thriller', 'thrillers'],
|
||||
'western':['western', 'westerns', 'oeste western']
|
||||
'western':['western', 'westerns']
|
||||
}
|
||||
string = re.sub(r'peliculas de |pelicula de la |peli |cine ','', string)
|
||||
for genre, variants in genres_dict.items():
|
||||
|
||||
Reference in New Issue
Block a user