diff --git a/channels/altadefinizione01_link.json b/channels/altadefinizione01_link.json index a60ab421..579853b4 100644 --- a/channels/altadefinizione01_link.json +++ b/channels/altadefinizione01_link.json @@ -10,7 +10,8 @@ "fix" : "reimpostato url e modificato file per KOD", "change_date": "2019-30-04", "categories": [ - "movie" + "movie", + "vosi" ], "settings": [ { @@ -30,7 +31,7 @@ "visible": true }, { - "id": "include_in_newest_film", + "id": "include_in_newest_peliculas", "type": "bool", "label": "Includi in Novità", "default": true, @@ -79,7 +80,8 @@ "visible": true, "lvalues": [ "Non filtrare", - "IT" + "ITA", + "vosi" ] }, { diff --git a/channels/altadefinizione01_link.py b/channels/altadefinizione01_link.py index a779c9bc..b46e87b6 100644 --- a/channels/altadefinizione01_link.py +++ b/channels/altadefinizione01_link.py @@ -1,9 +1,6 @@ # -*- coding: utf-8 -*- # -*- Channel Altadefinizione01L Film - Serie -*- -# -*- Creato per Alfa-addon -*- -# -*- e adattato for KOD -*- # -*- By Greko -*- -# -*- last change: 26/05/2019 import channelselector from specials import autoplay @@ -18,10 +15,7 @@ __channel__ = "altadefinizione01_link" list_servers = ['supervideo', 'streamcherry','rapidvideo', 'streamango', 'openload'] list_quality = ['default'] -#host = config.get_setting("channel_host", __channel__) -host = config.get_channel_url(__channel__) -checklinks = config.get_setting('checklinks', __channel__) -checklinks_number = config.get_setting('checklinks_number', __channel__) +host = config.get_setting("channel_host", __channel__) headers = [['Referer', host]] # =========== home menu =================== @@ -156,7 +150,5 @@ def findvideos(item): # Requerido para AutoPlay autoplay.start(itemlist, item) - - support.videolibrary(itemlist, item, 'color kod') return itemlist diff --git a/channels/cinemalibero.json b/channels/cinemalibero.json index 18dfce52..0124d1ad 100644 --- a/channels/cinemalibero.json +++ b/channels/cinemalibero.json @@ -8,6 +8,14 @@ "banner": "https://www.cinemalibero.center/wp-content/themes/Cinemalibero%202.0/images/logo02.png", "categories": ["tvshow", "movie","anime"], "settings": [ + { + "id": "channel_host", + "type": "text", + "label": "Host del canale", + "default": "https://www.cinemalibero.fun/", + "enabled": true, + "visible": true + }, { "id": "include_in_global_search", "type": "bool", diff --git a/channels/cinemalibero.py b/channels/cinemalibero.py index f652a95c..22f07591 100644 --- a/channels/cinemalibero.py +++ b/channels/cinemalibero.py @@ -11,6 +11,7 @@ from lib import unshortenit from platformcode import config from platformcode import logger from specials import autoplay +import channelselector # Necessario per Autoplay IDIOMAS = {'Italiano': 'IT'} @@ -24,10 +25,9 @@ checklinks_number = config.get_setting('checklinks_number', 'cinemalibero') __channel__ = "cinemalibero" host = config.get_channel_url(__channel__) + headers = [['Referer', host]] - - def mainlist(item): logger.info('[cinemalibero.py] mainlist') @@ -44,6 +44,15 @@ def mainlist(item): support.menu(itemlist, 'Sport bold', 'video', host+'/category/sport/') autoplay.show_option(item.channel, itemlist) # Necessario per Autoplay (Menu Configurazione) + + itemlist.append( + Item(channel='setting', + action="channel_config", + title=support.typo("Configurazione Canale color lime"), + config=item.channel, + folder=False, + thumbnail=channelselector.get_thumb('setting_0.png')) + ) return itemlist diff --git a/channels/eurostreaming.json b/channels/eurostreaming.json index 07ad271e..c78f0e87 100644 --- a/channels/eurostreaming.json +++ b/channels/eurostreaming.json @@ -6,8 +6,16 @@ "language": ["ita"], "thumbnail": "https://eurostreaming.cafe/wp-content/uploads/2017/08/logocafe.png", "bannermenu": "https://eurostreaming.cafe/wp-content/uploads/2017/08/logocafe.png", - "categories": ["tvshow","anime"], + "categories": ["tvshow","anime","vosi"], "settings": [ + { + "id": "channel_host", + "type": "text", + "label": "Host del canale", + "default": "https://eurostreaming.cafe/", + "enabled": true, + "visible": true + }, { "id": "include_in_global_search", "type": "bool", @@ -16,14 +24,6 @@ "enabled": true, "visible": true }, - { - "id": "modo_grafico", - "type": "bool", - "label": "Cerca informazioni extra", - "default": true, - "enabled": true, - "visible": true - }, { "id": "include_in_newest_series", "type": "bool", @@ -39,23 +39,6 @@ "default": true, "enabled": true, "visible": true - }, - { - "id": "checklinks", - "type": "bool", - "label": "Verifica se i link esistono", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "checklinks_number", - "type": "list", - "label": "Numero de link da verificare", - "default": 1, - "enabled": true, - "visible": "eq(-1,true)", - "lvalues": [ "5", "10", "15", "20" ] }, { "id": "filter_languages", @@ -66,25 +49,9 @@ "visible": true, "lvalues": [ "Non filtrare", - "Italiano", + "ITA", "vosi" ] - }, - { - "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/eurostreaming.py b/channels/eurostreaming.py index afabfa3a..f209b064 100644 --- a/channels/eurostreaming.py +++ b/channels/eurostreaming.py @@ -1,57 +1,71 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------ # Canale per Eurostreaming -# adattamento di Cineblog01 # by Greko # ------------------------------------------------------------ """ Riscritto per poter usufruire del modulo support. Problemi noti: - Alcun regex possono migliorare + Le regex non prendono tutto... server versystream : 'http://vcrypt.net/very/' # VeryS non decodifica il link :http://vcrypt.net/fastshield/ - server nowvideo.club da implementare nella cartella servers, altri server nei meandri del sito?! + alcuni server tra cui nowvideo.club non sono implementati nella cartella servers Alcune sezioni di anime-cartoni non vanno, alcune hanno solo la lista degli episodi, ma non hanno link altre cambiano la struttura La sezione novità non fa apparire il titolo degli episodi + + In episodios è stata aggiunta la possibilità di configurare la videoteca + """ -import re - -from core import scrapertoolsV2, httptools, tmdb, support +import channelselector +from specials import autoplay, filtertools +from core import scrapertoolsV2, httptools, servertools, tmdb, support from core.item import Item from platformcode import logger, config -from specials import autoplay __channel__ = "eurostreaming" host = config.get_channel_url(__channel__) headers = ['Referer', host] -IDIOMAS = {'Italiano': 'IT'} -list_language = IDIOMAS.values() list_servers = ['verystream', 'wstream', 'speedvideo', 'flashx', 'nowvideo', 'streamango', 'deltabit', 'openload'] list_quality = ['default'] -checklinks = config.get_setting('checklinks', 'eurostreaming') -checklinks_number = config.get_setting('checklinks_number', 'eurostreaming') +__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'eurostreaming') +__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'eurostreaming') + +IDIOMAS = {'Italiano': 'ITA', 'Sub-ITA':'vosi'} +list_language = IDIOMAS.values() def mainlist(item): + #import web_pdb; web_pdb.set_trace() support.log() itemlist = [] - support.menu(itemlist, 'Serie TV', 'serietv', host, 'tvshow') # mettere sempre episode per serietv, anime!! - support.menu(itemlist, 'Serie TV Archivio submenu', 'serietv', host + "category/serie-tv-archive/", 'tvshow') - support.menu(itemlist, 'Ultimi Aggiornamenti submenu', 'serietv', host + 'aggiornamento-episodi/', 'tvshow', args='True') - support.menu(itemlist, 'Anime / Cartoni', 'serietv', host + 'category/anime-cartoni-animati/', 'tvshow') - support.menu(itemlist, 'Cerca...', 'search', host, 'tvshow') + support.menu(itemlist, 'Serie TV', 'serietv', host, contentType = 'episode') # mettere sempre episode per serietv, anime!! + support.menu(itemlist, 'Serie TV Archivio submenu', 'serietv', host + "category/serie-tv-archive/", contentType = 'episode') + support.menu(itemlist, 'Ultimi Aggiornamenti submenu', 'serietv', host + 'aggiornamento-episodi/', args='True', contentType = 'episode') + support.menu(itemlist, 'Anime / Cartoni', 'serietv', host + 'category/anime-cartoni-animati/', contentType = 'episode') + support.menu(itemlist, 'Cerca...', 'search', host, contentType = 'episode') +## itemlist = filtertools.show_option(itemlist, item.channel, list_language, list_quality) # richiesto per autoplay autoplay.init(item.channel, list_servers, list_quality) autoplay.show_option(item.channel, itemlist) + itemlist.append( + Item(channel='setting', + action="channel_config", + title=support.typo("Configurazione Canale color lime"), + config=item.channel, + folder=False, + thumbnail=channelselector.get_thumb('setting_0.png')) + ) + return itemlist - -def serietv(item): +def serietv(item): + #import web_pdb; web_pdb.set_trace() + # lista serie tv support.log() itemlist = [] if item.args: @@ -65,69 +79,76 @@ def serietv(item): patronNext='a class="next page-numbers" href="?([^>"]+)">Avanti »' itemlist = support.scrape(item, patron_block='', patron=patron, listGroups=listGroups, - patronNext=patronNext, - action='episodios') + patronNext=patronNext, action='episodios') return itemlist + def episodios(item): - support.log() +## import web_pdb; web_pdb.set_trace() + support.log("episodios") itemlist = [] - + # Carica la pagina data = httptools.downloadpage(item.url).data #======== if 'clicca qui per aprire' in data.lower(): - item.url = scrapertoolsV2.find_single_match(data, '"go_to":"(.*?)"') + item.url = scrapertoolsV2.find_single_match(data, '"go_to":"([^"]+)"') item.url = item.url.replace("\\","") # Carica la pagina data = httptools.downloadpage(item.url).data elif 'clicca qui' in data.lower(): - item.url = scrapertoolsV2.find_single_match(data, '

') + item.url = scrapertoolsV2.find_single_match(data, '

') # Carica la pagina data = httptools.downloadpage(item.url).data #========= + patron = r'(?:<\/span>\w+ STAGIONE\s\d+ (?:\()?(ITA|SUB ITA)(?:\))?<\/div>'\ + '\s*") + if post_data != "": + from lib import jsunpack + data = jsunpack.unpack(post_data) + + block = scrapertools.find_single_match(data, 'sources:\s*\[[^\]]+\]') + if block: data = block + + media_urls = scrapertools.find_multiple_matches(data, '(http.*?\.mp4)') + _headers = urllib.urlencode(dict(headers)) + + for media_url in media_urls: + #logger.info("nowvideo data page_url2 ='%s'" % media_url) + video_urls.append([" mp4 [nowvideo] ", media_url + '|' + _headers]) + + for video_url in media_urls: + logger.info("[nowvideo.py] %s - %s" % (video_url[0], video_url[1])) + + return video_urls + + +def find_videos(data): + encontrados = set() + devuelve = [] + + patronvideos = r"nowvideo.club/(?:play|videos)?([a-z0-9A-Z]+)" + logger.info("[nowvideo.py] find_videos #" + patronvideos + "#") + matches = re.compile(patronvideos, re.DOTALL).findall(data) + + for match in matches: + titulo = "[nowvideo]" + url = 'http://nowvideo.club/%s' % match + + if url not in encontrados: + logger.info(" url=" + url) + devuelve.append([titulo, url, 'nowvideo']) + encontrados.add(url) + else: + logger.info(" url duplicada=" + url) + + return devuelve diff --git a/servers/speedvideo.json b/servers/speedvideo.json index 4e6a0772..5ef92e2c 100644 --- a/servers/speedvideo.json +++ b/servers/speedvideo.json @@ -42,4 +42,4 @@ "visible": false } ] -} \ No newline at end of file +} diff --git a/servers/speedvideo.py b/servers/speedvideo.py index b96fe7fe..c4af3763 100644 --- a/servers/speedvideo.py +++ b/servers/speedvideo.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +## from core import httptools, scrapertools from platformcode import config, logger - def test_video_exists(page_url): logger.info("(page_url='%s')" % page_url) @@ -14,23 +14,25 @@ def test_video_exists(page_url): return True, "" - -def get_video_url(page_url, - premium=False, - user="", - password="", - video_password=""): +def get_video_url(page_url, premium=False, user="", password="", video_password=""): logger.info("url=" + page_url) video_urls = [] - + data = httptools.downloadpage(page_url).data media_urls = scrapertools.find_multiple_matches(data, r"file:[^']'([^']+)',\s*label:[^\"]\"([^\"]+)\"") - + logger.info("speed video - media urls: %s " % media_urls) for media_url, label in media_urls: media_url = httptools.downloadpage(media_url, only_headers=True, follow_redirects=False).headers.get("location", "") if media_url: video_urls.append([label + " " + media_url.rsplit('.', 1)[1] + ' [speedvideo]', media_url]) - + logger.info("speed video - media urls: %s " % video_urls) return video_urls + + +##, +## { +## "pattern": "speedvideo.net/([A-Z0-9a-z]+)", +## "url": "https:\/\/speedvideo.net\/\\1" +## } diff --git a/servers/turbovid.json b/servers/turbovid.json new file mode 100644 index 00000000..b5c53581 --- /dev/null +++ b/servers/turbovid.json @@ -0,0 +1,42 @@ +{ + "active": true, + "find_videos": { + "ignore_urls": [], + "patterns": [ + { + "pattern": "turbovid.me/([A-z0-9]+)", + "url": "http://turbovid.me/\\1" + } + ] + }, + "free": true, + "id": "turbovid", + "name": "turbovid", + "settings": [ + { + "default": false, + "enabled": true, + "id": "black_list", + "label": "@60654", + "type": "bool", + "visible": true + }, + { + "default": 0, + "enabled": true, + "id": "favorites_servers_list", + "label": "@60655", + "lvalues": [ + "No", + "1", + "2", + "3", + "4", + "5" + ], + "type": "list", + "visible": false + } + ], + "thumbnail": "http://turbovid.me/img/logo.png" +} diff --git a/servers/turbovid.py b/servers/turbovid.py new file mode 100644 index 00000000..387a6d10 --- /dev/null +++ b/servers/turbovid.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- + +import urllib +import time +from core import httptools +from core import scrapertools +from platformcode import logger + + +def test_video_exists(page_url): + logger.info("(page_url='%s')" % page_url) + data = httptools.downloadpage(page_url).data + if "Not Found" in data or "File Does not Exist" in data: + return False, "[turbovid.me] El fichero no existe o ha sido borrado" + return True, "" + + +def get_video_url(page_url, premium=False, user="", password="", video_password="", server='turbovid'): + + logger.info("(turbovid page_url='%s')" % page_url) + video_urls = [] + data = httptools.downloadpage(page_url).data + data = data.replace('"', "'") + page_url_post = scrapertools.find_single_match(data, "") + imhuman = "&imhuman=" + scrapertools.find_single_match(data, "name='imhuman' value='([^']+)'").replace(" ", "+") + post = urllib.urlencode({k: v for k, v in scrapertools.find_multiple_matches(data, "name='([^']+)' value='([^']*)'")}) + imhuman + + time.sleep(6) + data = httptools.downloadpage(page_url_post, post=post).data + logger.info("(data page_url='%s')" % data) + sources = scrapertools.find_single_match(data, 'sources: \[([^\]]+)\]') + + for media_url in scrapertools.find_multiple_matches(sources, '"([^"]+)"'): + media_url = media_url.replace('https:', 'http:') + ext = scrapertools.get_filename_from_url(media_url)[-4:] + video_urls.append(["%s [turbovid]" % (ext), media_url]) + return video_urls diff --git a/servers/wstream.json b/servers/wstream.json index a001f45b..ec73269c 100644 --- a/servers/wstream.json +++ b/servers/wstream.json @@ -9,7 +9,11 @@ { "pattern": "wstream.video/(?:embed-|videos/|video/)?([a-z0-9A-Z]+)", "url": "http:\/\/wstream.video\/\\1" - } + }, + { + "pattern": "wstream.video/(?:embed-|videos/|video/)?([a-z0-9A-Z]+)", + "url": "http:\/\/wstream.video\/video\/\\1" + } ], "ignore_urls": [ ] }, @@ -39,4 +43,4 @@ "visible": false } ] -} \ No newline at end of file +}