.(.*?)(.*?)<.*?label">(.*?)")
+ if not next_page:
+ next_page = scrapertools.find_single_match(data, '\d ')
+
+ 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, '(.*?)
')
+ patron = '(.*?)'
+ elif item.extra == 'year':
+ bloque = scrapertools.find_single_match(data, '(.*?)
')
+ patron = ' (.*?)'
+ elif item.extra == 'orderalf':
+ bloque = scrapertools.find_single_match(data, '(.*)')
+ patron = '(.*?)'
+
+ 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 = '(.*?)<.*?"mlnh-5">.<(.*?) (.*?)<.*?"mlnh-5">.<(.*?) ")
+ if not next_page:
+ next_page = scrapertools.find_single_match(data, '.*?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 = ''
+ matches = scrapertools.find_multiple_matches(data, patron)
+ #logger.info("altadefinizione01_clubMATCHES: %s " % matches)
+ for scrapedurl in matches:
+ logger.info("altadefinizione01_club scrapedurl log: %s" % scrapedurl)
+ #if 'vodexor' and 'megadrive' not in scrapedurl:
+ #data = httptools.downloadpage(scrapedurl, headers=headers).data
+ 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.language = lang_orders[4]
+ 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
From 1123114298ffbad13d7e487b0578d0e016399276 Mon Sep 17 00:00:00 2001
From: greko17 <50103632+greko17@users.noreply.github.com>
Date: Tue, 30 Apr 2019 23:41:12 +0200
Subject: [PATCH 05/62] Add files via upload
---
altadefinizione01_link.json | 94 +++++++++++
altadefinizione01_link.py | 317 ++++++++++++++++++++++++++++++++++++
2 files changed, 411 insertions(+)
create mode 100644 altadefinizione01_link.json
create mode 100644 altadefinizione01_link.py
diff --git a/altadefinizione01_link.json b/altadefinizione01_link.json
new file mode 100644
index 00000000..c43a2939
--- /dev/null
+++ b/altadefinizione01_link.json
@@ -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"
+ ]
+ }
+ ]
+}
diff --git a/altadefinizione01_link.py b/altadefinizione01_link.py
new file mode 100644
index 00000000..bf4a7398
--- /dev/null
+++ b/altadefinizione01_link.py
@@ -0,0 +1,317 @@
+# -*- coding: utf-8 -*-
+# -*- Channel Altadefinizione01L Film - Serie -*-
+# -*- Creato per Alfa-addon -*-
+# -*- e adattato for KOD -*-
+# -*- By Greko -*-
+# -*- change 30/04/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
+
+# ======== 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','HD']#'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">(.*?)'
+ 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), #scrapedtitle + ' %s' % 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, idioma_busqueda='it')
+
+ # Paginazione
+ next_page = scrapertools.find_single_match(data, "")
+ if not next_page:
+ next_page = scrapertools.find_single_match(data, '\d ')
+
+ 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, '(.*?)
')
+ elif item.extra == 'year':
+ bloque = scrapertools.find_single_match(data, '(.*?)
')
+ elif item.extra == 'quality':
+ bloque = scrapertools.find_single_match(data, '(.*?)
')
+ 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">(.*?)')
+ patron = '(.*?)<'
+ matches = scrapertools.find_multiple_matches(bloque, patron)
+
+ if item.extra == 'lucky':
+ bloque = scrapertools.find_single_match(data, 'FILM RANDOM.*?class="listSubCat">(.*?)')
+ patron = '(.*?)<'
+ 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 = ''
+ matches = scrapertools.find_multiple_matches(data, patron)
+ #logger.info("altadefinizione01_linkMATCHES: %s " % matches)
+ for scrapedurl in matches:
+ #if 'vodexor' and 'megadrive' not in scrapedurl:
+ #data = httptools.downloadpage(scrapedurl, headers=headers).data
+ 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.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)
+
+ # 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
From dd4f89d891fe37058c67a4a21c67df7726e955c3 Mon Sep 17 00:00:00 2001
From: greko17 <50103632+greko17@users.noreply.github.com>
Date: Tue, 30 Apr 2019 23:43:43 +0200
Subject: [PATCH 06/62] Delete altadefinizione01_link.json
ops!
---
altadefinizione01_link.json | 94 -------------------------------------
1 file changed, 94 deletions(-)
delete mode 100644 altadefinizione01_link.json
diff --git a/altadefinizione01_link.json b/altadefinizione01_link.json
deleted file mode 100644
index c43a2939..00000000
--- a/altadefinizione01_link.json
+++ /dev/null
@@ -1,94 +0,0 @@
-{
- "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"
- ]
- }
- ]
-}
From 7462caa9eff9b29ad3fed202cd7934e66f2caeb7 Mon Sep 17 00:00:00 2001
From: greko17 <50103632+greko17@users.noreply.github.com>
Date: Tue, 30 Apr 2019 23:44:08 +0200
Subject: [PATCH 07/62] Delete altadefinizione01_link.py
ariops!
---
altadefinizione01_link.py | 317 --------------------------------------
1 file changed, 317 deletions(-)
delete mode 100644 altadefinizione01_link.py
diff --git a/altadefinizione01_link.py b/altadefinizione01_link.py
deleted file mode 100644
index bf4a7398..00000000
--- a/altadefinizione01_link.py
+++ /dev/null
@@ -1,317 +0,0 @@
-# -*- coding: utf-8 -*-
-# -*- Channel Altadefinizione01L Film - Serie -*-
-# -*- Creato per Alfa-addon -*-
-# -*- e adattato for KOD -*-
-# -*- By Greko -*-
-# -*- change 30/04/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
-
-# ======== 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','HD']#'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">(.*?)'
- 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), #scrapedtitle + ' %s' % 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, idioma_busqueda='it')
-
- # Paginazione
- next_page = scrapertools.find_single_match(data, "")
- if not next_page:
- next_page = scrapertools.find_single_match(data, '\d ')
-
- 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, '(.*?)
')
- elif item.extra == 'year':
- bloque = scrapertools.find_single_match(data, '(.*?)
')
- elif item.extra == 'quality':
- bloque = scrapertools.find_single_match(data, '(.*?)
')
- 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">(.*?)')
- patron = '(.*?)<'
- matches = scrapertools.find_multiple_matches(bloque, patron)
-
- if item.extra == 'lucky':
- bloque = scrapertools.find_single_match(data, 'FILM RANDOM.*?class="listSubCat">(.*?)')
- patron = '(.*?)<'
- 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 = ''
- matches = scrapertools.find_multiple_matches(data, patron)
- #logger.info("altadefinizione01_linkMATCHES: %s " % matches)
- for scrapedurl in matches:
- #if 'vodexor' and 'megadrive' not in scrapedurl:
- #data = httptools.downloadpage(scrapedurl, headers=headers).data
- 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.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)
-
- # 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
From 20d86c5678ed0bf9d1bf579a18f77a70c6084b89 Mon Sep 17 00:00:00 2001
From: greko17 <50103632+greko17@users.noreply.github.com>
Date: Tue, 30 Apr 2019 23:45:22 +0200
Subject: [PATCH 08/62] Add files via upload
aggiunti i server in lista_servers
---
channels/altadefinizione01_link.json | 8 ++++++++
channels/altadefinizione01_link.py | 6 +++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/channels/altadefinizione01_link.json b/channels/altadefinizione01_link.json
index 55dc2a9c..c43a2939 100644
--- a/channels/altadefinizione01_link.json
+++ b/channels/altadefinizione01_link.json
@@ -29,6 +29,14 @@
"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",
diff --git a/channels/altadefinizione01_link.py b/channels/altadefinizione01_link.py
index a30ce9f2..bf4a7398 100644
--- a/channels/altadefinizione01_link.py
+++ b/channels/altadefinizione01_link.py
@@ -47,10 +47,10 @@ headers = [['User-Agent', 'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/
['Referer', host]]#,['Accept-Language','it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3']]
-IDIOMAS = {'Italiano': 'ITA'}
+IDIOMAS = {'Italiano': 'IT'}
list_language = IDIOMAS.values()
-list_servers = []#'openload', 'streamcherry', 'youtube','rapidvideo', 'streamango']
-list_quality = []#'default']
+list_servers = ['openload', 'streamcherry','rapidvideo', 'streamango', 'supervideo']
+list_quality = ['default','HD']#'default']
# =========== home menu ===================
From 2c76ae793fc509c38f44d0e30f5196be8eda6f71 Mon Sep 17 00:00:00 2001
From: greko17 <50103632+greko17@users.noreply.github.com>
Date: Wed, 1 May 2019 10:22:55 +0200
Subject: [PATCH 09/62] Update eurostreaming.py
aggiunto autoplay nella home menu
---
channels/eurostreaming.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/channels/eurostreaming.py b/channels/eurostreaming.py
index 94fad807..d9360c51 100644
--- a/channels/eurostreaming.py
+++ b/channels/eurostreaming.py
@@ -68,6 +68,8 @@ def mainlist(item):
itemlist = []
title = ''
+ autoplay.init(item.channel, list_servers, list_quality)
+
itemlist = [
Item(channel=__channel__, title="Serie TV",
contentTitle = __channel__, action="serietv",
@@ -101,7 +103,9 @@ def mainlist(item):
thumbnail= get_thumb(title, auto = True)
),
]
-
+
+ autoplay.show_option(item.channel, itemlist)
+
return itemlist
# ======== def in ordine di menu ===========================
From f308e2e2c38751793ebb7af76f0a602d43b1c567 Mon Sep 17 00:00:00 2001
From: greko17 <50103632+greko17@users.noreply.github.com>
Date: Thu, 2 May 2019 16:53:55 +0200
Subject: [PATCH 10/62] Altadefinizione 2
Ci sono problemi con la ricerca dei server. Prende o solo openload o quello e un altro
---
channels/altadefinizione_2.json | 93 ++++++++++
channels/altadefinizione_2.py | 318 ++++++++++++++++++++++++++++++++
2 files changed, 411 insertions(+)
create mode 100644 channels/altadefinizione_2.json
create mode 100644 channels/altadefinizione_2.py
diff --git a/channels/altadefinizione_2.json b/channels/altadefinizione_2.json
new file mode 100644
index 00000000..9f05d4ac
--- /dev/null
+++ b/channels/altadefinizione_2.json
@@ -0,0 +1,93 @@
+{
+ "id": "altadefinizione_2",
+ "name": "Altadefinizione 2",
+ "active": true,
+ "adult": false,
+ "language": ["ita"],
+ "fanart": "",
+ "thumbnail": "",
+ "banner": "",
+ "categories": [
+ "movie",
+ "tvshow"
+ ],
+ "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à - Film",
+ "default": false,
+ "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": false,
+ "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"
+ ]
+ }
+ ]
+}
diff --git a/channels/altadefinizione_2.py b/channels/altadefinizione_2.py
new file mode 100644
index 00000000..cc928cf9
--- /dev/null
+++ b/channels/altadefinizione_2.py
@@ -0,0 +1,318 @@
+# -*- coding: utf-8 -*-
+# -*- Created for KOD -*-
+# -*- By Greko -*-
+# -*-
+
+#import base64
+import re
+#import urlparse
+# gli import sopra sono da includere all'occorrenza
+
+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__ = "altadefinizione_2" #stesso di id nel file json
+
+host = "https://www2.altadefinizione.im/"
+
+# ======== 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'}
+list_language = IDIOMAS.values()
+list_servers = ['verystream','vidoza','openload','thevideo','streamcherry','rapidvideo','vidcloud'] # per l'autoplay
+list_quality = ['360p','480p','720p','1080p','hd','4k'] # per l'autoplay
+
+
+# =========== home menu ===================
+""""
+Queste sono le voci del menu che si vedranno
+entrati nel canale
+Togliere aggiungere a seconda del sito
+"""
+
+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="%sal-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 peliculas log: %s" % (__channel__, item))
+ itemlist = []
+ # scarico la pagina
+ data = httptools.downloadpage(item.url, headers=headers).data
+ #blocco = '(.*?)
- (.*?)
- (.*?)
- (.*?)
- (.*?)
- (.*?)
- (.*?)
- (.*?)
- (.*?)