From a5938f4db07d5918bed077453a31ef32140f1ad7 Mon Sep 17 00:00:00 2001 From: alfa-addon Date: Tue, 8 Aug 2017 09:50:35 -0400 Subject: [PATCH 01/15] deleted --- plugin.video.alfa/channels/gvideo.json | 53 -------------------------- 1 file changed, 53 deletions(-) delete mode 100644 plugin.video.alfa/channels/gvideo.json diff --git a/plugin.video.alfa/channels/gvideo.json b/plugin.video.alfa/channels/gvideo.json deleted file mode 100644 index 1df66e72..00000000 --- a/plugin.video.alfa/channels/gvideo.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "active": true, - "changes": [ - { - "date": "18/07/2017", - "description": "Versión incial" - } - ], - "find_videos": { - "ignore_urls": [], - "patterns": [ - { - "pattern": "(?s)https://youtube.googleapis.com.*?docid=([^(?:&|\")]+)", - "url": "http://docs.google.com/get_video_info?docid=\\1" - }, - { - "pattern": "(?s)https://drive.google.com/file/d/(.*?)/preview", - "url": "http://docs.google.com/get_video_info?docid=\\1" - } - - ] - }, - "free": true, - "id": "gvideo", - "name": "gvideo", - "settings": [ - { - "default": false, - "enabled": true, - "id": "black_list", - "label": "Incluir en lista negra", - "type": "bool", - "visible": true - }, - { - "default": 0, - "enabled": true, - "id": "favorites_servers_list", - "label": "Incluir en lista de favoritos", - "lvalues": [ - "No", - "1", - "2", - "3", - "4", - "5" - ], - "type": "list", - "visible": false - } - ], - "version": 1 -} \ No newline at end of file From 6b84cfd5dc098ee664997f64bd17434ef51aef80 Mon Sep 17 00:00:00 2001 From: Intel1 Date: Tue, 8 Aug 2017 14:38:24 -0500 Subject: [PATCH 02/15] Delete ver-pelis.json --- plugin.video.alfa/channels/ver-pelis.json | 42 ----------------------- 1 file changed, 42 deletions(-) delete mode 100755 plugin.video.alfa/channels/ver-pelis.json diff --git a/plugin.video.alfa/channels/ver-pelis.json b/plugin.video.alfa/channels/ver-pelis.json deleted file mode 100755 index cfe43098..00000000 --- a/plugin.video.alfa/channels/ver-pelis.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "id": "ver-pelis", - "name": "Ver-pelis", - "active": true, - "adult": false, - "language": "es", - "thumbnail": "http://imgur.com/lmYQgOu.png", - "version": 1, - "changes": [ - { - "date": "26/04/2016", - "description": "Release" - }, - { - "date": "28/06/2017", - "description": "Corrección código y algunas mejoras" - } - ], - "categories": [ - "torrent", - "movie", - "tvshow" - ], - "settings": [ - { - "id": "modo_grafico", - "type": "bool", - "label": "Buscar información extra", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "include_in_global_search", - "type": "bool", - "label": "Incluir en busqueda global", - "default": true, - "enabled": true, - "visible": true - } - ] -} \ No newline at end of file From b082e9b904488f89ef9f9cef92670119cdd1f185 Mon Sep 17 00:00:00 2001 From: Intel1 Date: Tue, 8 Aug 2017 14:38:48 -0500 Subject: [PATCH 03/15] Delete ver-pelis.py --- plugin.video.alfa/channels/ver-pelis.py | 438 ------------------------ 1 file changed, 438 deletions(-) delete mode 100755 plugin.video.alfa/channels/ver-pelis.py diff --git a/plugin.video.alfa/channels/ver-pelis.py b/plugin.video.alfa/channels/ver-pelis.py deleted file mode 100755 index 48e74f0b..00000000 --- a/plugin.video.alfa/channels/ver-pelis.py +++ /dev/null @@ -1,438 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -import unicodedata -from threading import Thread - -from core import config -from core import httptools -from core import logger -from core import scrapertools -from core import servertools -from core import tmdb -from core.item import Item - -ACTION_SHOW_FULLSCREEN = 36 -ACTION_GESTURE_SWIPE_LEFT = 511 -ACTION_SELECT_ITEM = 7 -ACTION_PREVIOUS_MENU = 10 -ACTION_MOVE_LEFT = 1 -ACTION_MOVE_RIGHT = 2 -ACTION_MOVE_DOWN = 4 -ACTION_MOVE_UP = 3 -OPTION_PANEL = 6 -OPTIONS_OK = 5 - -__modo_grafico__ = config.get_setting('modo_grafico', "ver-pelis") - - -# Para la busqueda en bing evitando baneos - -def browser(url): - import mechanize - - # Utilizamos Browser mechanize para saltar problemas con la busqueda en bing - br = mechanize.Browser() - # Browser options - br.set_handle_equiv(False) - br.set_handle_gzip(True) - br.set_handle_redirect(True) - br.set_handle_referer(False) - br.set_handle_robots(False) - # Follows refresh 0 but not hangs on refresh > 0 - br.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time=1) - # Want debugging messages? - # br.set_debug_http(True) - # br.set_debug_redirects(True) - # br.set_debug_responses(True) - - # User-Agent (this is cheating, ok?) - # br.addheaders = [('User-agent', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/600.7.12 (KHTML, like Gecko) Version/7.1.7 Safari/537.85.16')] - # br.addheaders =[('Cookie','SRCHD=AF=QBRE; domain=.bing.com; expires=25 de febrero de 2018 13:00:28 GMT+1; MUIDB=3B942052D204686335322894D3086911; domain=www.bing.com;expires=24 de febrero de 2018 13:00:28 GMT+1')] - # Open some site, let's pick a random one, the first that pops in mind - r = br.open(url) - response = r.read() - print response - if "img,divreturn" in response: - r = br.open("http://ssl-proxy.my-addr.org/myaddrproxy.php/" + url) - print "prooooxy" - response = r.read() - - return response - - -api_key = "2e2160006592024ba87ccdf78c28f49f" -api_fankey = "dffe90fba4d02c199ae7a9e71330c987" - - -def mainlist(item): - logger.info() - itemlist = [] - i = 0 - global i - itemlist.append( - item.clone(title="[COLOR oldlace][B]Películas[/B][/COLOR]", action="scraper", url="http://ver-pelis.me/ver/", - thumbnail="http://imgur.com/36xALWc.png", fanart="http://imgur.com/53dhEU4.jpg", - contentType="movie")) - itemlist.append(item.clone(title="[COLOR oldlace][B]Películas en Español[/B][/COLOR]", action="scraper", - url="http://ver-pelis.me/ver/espanol/", thumbnail="http://imgur.com/36xALWc.png", - fanart="http://imgur.com/53dhEU4.jpg", contentType="movie")) - - itemlist.append(itemlist[-1].clone(title="[COLOR orangered][B]Buscar[/B][/COLOR]", action="search", - thumbnail="http://imgur.com/ebWyuGe.png", fanart="http://imgur.com/53dhEU4.jpg", - contentType="tvshow")) - - return itemlist - - -def search(item, texto): - logger.info() - texto = texto.replace(" ", "+") - item.url = "http://ver-pelis.me/ver/buscar?s=" + texto - item.extra = "search" - if texto != '': - return scraper(item) - - -def scraper(item): - logger.info() - itemlist = [] - url_next_page = "" - global i - data = httptools.downloadpage(item.url).data - data = re.sub(r"\n|\r|\t|\s{2}| ", "", data) - patron = scrapertools.find_multiple_matches(data, - '([^"]+)') - if len(patron) > 20: - if item.next_page != 20: - url_next_page = item.url - patron = patron[:20] - next_page = 20 - item.i = 0 - else: - patron = patron[item.i:][:20] - next_page = 20 - - url_next_page = item.url - - for url, thumb, title, cuality in patron: - title = re.sub(r"Imagen", "", title) - title = ''.join((c for c in unicodedata.normalize('NFD', unicode(title.decode('utf-8'))) if - unicodedata.category(c) != 'Mn')).encode("ascii", "ignore") - titulo = "[COLOR floralwhite]" + title + "[/COLOR]" + " " + "[COLOR crimson][B]" + cuality + "[/B][/COLOR]" - title = re.sub(r"!|\/.*", "", title).strip() - - if item.extra != "search": - item.i += 1 - new_item = item.clone(action="findvideos", title=titulo, url=url, thumbnail=thumb, fulltitle=title, - contentTitle=title, contentType="movie", library=True) - new_item.infoLabels['year'] = get_year(url) - itemlist.append(new_item) - - ## Paginación - if url_next_page: - itemlist.append(item.clone(title="[COLOR crimson]Siguiente >>[/COLOR]", url=url_next_page, next_page=next_page, - thumbnail="http://imgur.com/w3OMy2f.png", i=item.i)) - try: - from core import tmdb - tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__) - for item in itemlist: - if not "Siguiente >>" in item.title: - if "0." in str(item.infoLabels['rating']): - item.infoLabels['rating'] = "[COLOR indianred]Sin puntuacíon[/COLOR]" - else: - item.infoLabels['rating'] = "[COLOR orange]" + str(item.infoLabels['rating']) + "[/COLOR]" - item.title = item.title + " " + str(item.infoLabels['rating']) - except: - pass - - for item_tmdb in itemlist: - logger.info(str(item_tmdb.infoLabels['tmdb_id'])) - - return itemlist - - -def findvideos(item): - logger.info() - itemlist = [] - th = Thread(target=get_art(item)) - th.setDaemon(True) - th.start() - data = httptools.downloadpage(item.url).data - data_post = scrapertools.find_single_match(data, "type: 'POST'.*?id: (.*?),slug: '(.*?)'") - if data_post: - post = 'id=' + data_post[0] + '&slug=' + data_post[1] - data_info = httptools.downloadpage('http://ver-pelis.me/ajax/cargar_video.php', post=post).data - enlaces = scrapertools.find_multiple_matches(data_info, - " (\w+ \w+).*?([^']+)") - for server, id_enlace, name, number, idioma_calidad in enlaces: - - if "SUBTITULOS" in idioma_calidad and not "P" in idioma_calidad: - idioma_calidad = idioma_calidad.replace("SUBTITULOS", "VO") - idioma_calidad = idioma_calidad.replace("VO", "[COLOR orangered] VO[/COLOR]") - elif "SUBTITULOS" in idioma_calidad and "P" in idioma_calidad: - idioma_calidad = "[COLOR indianred] " + idioma_calidad + "[/COLOR]" - - elif "LATINO" in idioma_calidad: - idioma_calidad = idioma_calidad.replace("LATINO", "[COLOR red]LATINO[/COLOR]") - elif "Español" in idioma_calidad: - idioma_calidad = idioma_calidad.replace("Español", "[COLOR crimson]ESPAÑOL[/COLOR]") - if "HD" in idioma_calidad: - idioma_calidad = idioma_calidad.replace("HD", "[COLOR crimson] HD[/COLOR]") - elif "720" in idioma_calidad: - idioma_calidad = idioma_calidad.replace("720", "[COLOR firebrick] 720[/COLOR]") - elif "TS" in idioma_calidad: - idioma_calidad = idioma_calidad.replace("TS", "[COLOR brown] TS[/COLOR]") - - elif "CAM" in idioma_calidad: - idioma_calidad = idioma_calidad.replace("CAM", "[COLOR darkkakhi] CAM[/COLOR]") - - url = "http://ver-pelis.me/ajax/video.php?id=" + id_enlace + "&slug=" + name + "&quality=" + number - - if not "Ultra" in server: - server = "[COLOR cyan][B]" + server + "[/B][/COLOR]" - extra = "yes" - else: - server = "[COLOR yellow][B]" + server + "[/B][/COLOR]" - extra = "" - title = server.strip() + " " + idioma_calidad - itemlist.append(Item(channel=item.channel, action="play", title=title, url=url, fanart=item.fanart, - thumbnail=item.thumbnail, fulltitle=item.title, extra=extra, folder=True)) - if item.library and config.get_videolibrary_support() and len(itemlist) > 0: - infoLabels = {'tmdb_id': item.infoLabels['tmdb_id'], - 'title': item.infoLabels['title']} - itemlist.append(Item(channel=item.channel, title="Añadir esta película a la videoteca", - action="add_pelicula_to_library", url=item.url, infoLabels=infoLabels, - text_color="0xFFf7f7f7", - thumbnail='http://imgur.com/gPyN1Tf.png')) - else: - itemlist.append( - Item(channel=item.channel, action="", title="[COLOR red][B]Upps!..Archivo no encontrado...[/B][/COLOR]", - thumbnail=item.thumbnail)) - return itemlist - - -def play(item): - itemlist = [] - data = httptools.downloadpage(item.url).data - data = re.sub(r'\\', '', data) - item.url = scrapertools.find_single_match(data, 'src="([^"]+)"') - data = httptools.downloadpage(item.url).data - - if item.extra != "yes": - patron = '"label":(.*?),.*?"type":"(.*?)",.*?"file":"(.*?)"' - matches = re.compile(patron, re.DOTALL).findall(data) - if not matches: - patron = '"label":(.*?),.*?"file":"(.*?)"' - matches = re.compile(patron, re.DOTALL).findall(data) - - for dato_a, type, dato_b in matches: - if 'http' in dato_a: - url = dato_a - calidad = dato_b - else: - url = dato_b - calidad = dato_a - url = url.replace('\\', '') - type = type.replace('\\', '') - itemlist.append( - Item(channel=item.channel, url=url, action="play", title=item.fulltitle + " (" + dato_a + ")", - folder=False)) - else: - - url = scrapertools.find_single_match(data, 'window.location="([^"]+)"') - - videolist = servertools.find_video_items(data=url) - for video in videolist: - itemlist.append(Item(channel=item.channel, url=video.url, server=video.server, - title="[COLOR floralwhite][B]" + video.server + "[/B][/COLOR]", action="play", - folder=False)) - - return itemlist - - -def fanartv(item, id_tvdb, id, images={}): - headers = [['Content-Type', 'application/json']] - from core import jsontools - if item.contentType == "movie": - url = "http://webservice.fanart.tv/v3/movies/%s?api_key=cab16e262d72fea6a6843d679aa10300" \ - % id - else: - url = "http://webservice.fanart.tv/v3/tv/%s?api_key=cab16e262d72fea6a6843d679aa10300" % id_tvdb - try: - data = jsontools.load(scrapertools.downloadpage(url, headers=headers)) - if data and not "error message" in data: - for key, value in data.items(): - if key not in ["name", "tmdb_id", "imdb_id", "thetvdb_id"]: - images[key] = value - else: - images = [] - - except: - images = [] - return images - - -def get_art(item): - logger.info() - id = item.infoLabels['tmdb_id'] - check_fanart = item.infoLabels['fanart'] - if item.contentType != "movie": - tipo_ps = "tv" - else: - tipo_ps = "movie" - if not id: - year = item.extra - otmdb = tmdb.Tmdb(texto_buscado=item.fulltitle, year=year, tipo=tipo_ps) - id = otmdb.result.get("id") - if id == None: - otmdb = tmdb.Tmdb(texto_buscado=item.fulltitle, tipo=tipo_ps) - id = otmdb.result.get("id") - if id == None: - if item.contentType == "movie": - urlbing_imdb = "http://www.bing.com/search?q=%s+%s+tv+series+site:imdb.com" % ( - item.fulltitle.replace(' ', '+'), year) - - data = browser(urlbing_imdb) - data = re.sub(r"\n|\r|\t|\s{2}| |http://ssl-proxy.my-addr.org/myaddrproxy.php/", "", data) - subdata_imdb = scrapertools.find_single_match(data, - '
  • (.*?)h="ID.*?.*?TV Series') - else: - urlbing_imdb = "http://www.bing.com/search?q=%s+%s+site:imdb.com" % ( - item.fulltitle.replace(' ', '+'), year) - data = browser(urlbing_imdb) - data = re.sub(r"\n|\r|\t|\s{2}| |http://ssl-proxy.my-addr.org/myaddrproxy.php/", "", data) - subdata_imdb = scrapertools.find_single_match(data, '
  • (.*?)h="ID.*?') - try: - imdb_id = scrapertools.get_match(subdata_imdb, '(.*?)h="ID.*?.*?TV Series') - else: - urlbing_imdb = "http://www.bing.com/search?q=%s+%s+site:imdb.com" % ( - title.replace(' ', '+'), year) - data = browser(urlbing_imdb) - data = re.sub(r"\n|\r|\t|\s{2}| |http://ssl-proxy.my-addr.org/myaddrproxy.php/", "", - data) - subdata_imdb = scrapertools.find_single_match(data, - '
  • (.*?)h="ID.*?') - try: - imdb_id = scrapertools.get_match(subdata_imdb, - '= 4: - if imagenes[0] != check_fanart: - item.fanart = imagenes[0] - else: - item.fanart = imagenes[1] - if imagenes[1] != check_fanart and imagenes[1] != item.fanart and imagenes[2] != check_fanart: - item.extra = imagenes[1] + "|" + imagenes[2] - else: - if imagenes[1] != check_fanart and imagenes[1] != item.fanart: - item.extra = imagenes[1] + "|" + imagenes[3] - elif imagenes[2] != check_fanart: - item.extra = imagenes[2] + "|" + imagenes[3] - else: - item.extra = imagenes[3] + "|" + imagenes[3] - elif len(imagenes) == 3: - if imagenes[0] != check_fanart: - item.fanart = imagenes[0] - else: - item.fanart = imagenes[1] - if imagenes[1] != check_fanart and imagenes[1] != item.fanart and imagenes[2] != check_fanart: - item.extra = imagenes[1] + "|" + imagenes[2] - - - else: - if imagenes[1] != check_fanart and imagenes[1] != item.fanart: - item.extra = imagenes[0] + "|" + imagenes[1] - elif imagenes[2] != check_fanart: - item.extra = imagenes[1] + "|" + imagenes[2] - else: - item.extra = imagenes[1] + "|" + imagenes[1] - elif len(imagenes) == 2: - if imagenes[0] != check_fanart: - item.fanart = imagenes[0] - else: - item.fanart = imagenes[1] - if imagenes[1] != check_fanart and imagenes[1] != item.fanart: - item.extra = imagenes[0] + "|" + imagenes[1] - else: - item.extra = imagenes[1] + "|" + imagenes[0] - elif len(imagenes) == 1: - item.extra = imagenes + "|" + imagenes - else: - item.extra = item.fanart + "|" + item.fanart - - images_fanarttv = fanartv(item, id_tvdb, id) - if images_fanarttv: - if item.contentType == "movie": - if images_fanarttv.get("moviedisc"): - item.thumbnail = images_fanarttv.get("moviedisc")[0].get("url") - elif images_fanarttv.get("hdmovielogo"): - item.thumbnail = images_fanarttv.get("hdmovielogo")[0].get("url") - elif images_fanarttv.get("moviethumb"): - item.thumbnail = images_fanarttv.get("moviethumb")[0].get("url") - elif images_fanarttv.get("moviebanner"): - item.thumbnail_ = images_fanarttv.get("moviebanner")[0].get("url") - else: - item.thumbnail = item.thumbnail - else: - if images_fanarttv.get("hdtvlogo"): - item.thumbnail = images_fanarttv.get("hdtvlogo")[0].get("url") - elif images_fanarttv.get("clearlogo"): - item.thumbnail = images_fanarttv.get("hdmovielogo")[0].get("url") - - if images_fanarttv.get("tvbanner"): - item.extra = item.extra + "|" + images_fanarttv.get("tvbanner")[0].get("url") - elif images_fanarttv.get("tvthumb"): - item.extra = item.extra + "|" + images_fanarttv.get("tvthumb")[0].get("url") - else: - item.extra = item.extra + "|" + item.thumbnail - else: - item.extra = item.extra + "|" + item.thumbnail - - -def get_year(url): - data = httptools.downloadpage(url).data - year = scrapertools.find_single_match(data, '

    Año:(.*?)

    ') - if year == "": - year = " " - return year From f46c7c53c7bb3518a19e240455717f535c88a63c Mon Sep 17 00:00:00 2001 From: Intel1 Date: Tue, 8 Aug 2017 14:39:23 -0500 Subject: [PATCH 04/15] Add files via upload --- plugin.video.alfa/channels/verpelis.json | 43 +++++ plugin.video.alfa/channels/verpelis.py | 213 +++++++++++++++++++++++ 2 files changed, 256 insertions(+) create mode 100644 plugin.video.alfa/channels/verpelis.json create mode 100644 plugin.video.alfa/channels/verpelis.py diff --git a/plugin.video.alfa/channels/verpelis.json b/plugin.video.alfa/channels/verpelis.json new file mode 100644 index 00000000..51de7929 --- /dev/null +++ b/plugin.video.alfa/channels/verpelis.json @@ -0,0 +1,43 @@ +{ + "id": "verpelis", + "name": "Ver-pelis", + "active": true, + "adult": false, + "language": "es", + "thumbnail": "http://imgur.com/lmYQgOu.png", + "version": 1, + "changes": [ + { + "date": "26/04/2016", + "description": "Release" + }, + { + "date": "28/06/2017", + "description": "Corrección código y algunas mejoras" + } + ], + "categories": [ + "torrent", + "movie", + "tvshow", + "direct" + ], + "settings": [ + { + "id": "modo_grafico", + "type": "bool", + "label": "Buscar información extra", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "include_in_global_search", + "type": "bool", + "label": "Incluir en busqueda global", + "default": true, + "enabled": true, + "visible": true + } + ] +} \ No newline at end of file diff --git a/plugin.video.alfa/channels/verpelis.py b/plugin.video.alfa/channels/verpelis.py new file mode 100644 index 00000000..25810528 --- /dev/null +++ b/plugin.video.alfa/channels/verpelis.py @@ -0,0 +1,213 @@ +# -*- coding: utf-8 -*- + +import re + +from core import config +from core import httptools +from core import logger +from core import scrapertools +from core import servertools +from core import tmdb +from core.item import Item + +__modo_grafico__ = config.get_setting('modo_grafico', "ver-pelis") +host = "http://ver-pelis.me" + +def mainlist(item): + logger.info() + itemlist = [] + i = 0 + global i + itemlist.append( + item.clone(title = "[COLOR oldlace]Películas[/COLOR]", action = "scraper", url = host + "/ver/", + thumbnail = "http://imgur.com/36xALWc.png", fanart = "http://imgur.com/53dhEU4.jpg", + contentType = "movie")) + itemlist.append(item.clone(title = "[COLOR oldlace]Películas por año[/COLOR]", action = "categoria_anno", + url = host, thumbnail = "http://imgur.com/36xALWc.png", extra = "Por año", + fanart = "http://imgur.com/53dhEU4.jpg", contentType = "movie")) + itemlist.append(item.clone(title = "[COLOR oldlace]Películas en Latino[/COLOR]", action = "scraper", + url = host + "/ver/latino/", thumbnail = "http://imgur.com/36xALWc.png", + fanart = "http://imgur.com/53dhEU4.jpg", contentType = "movie")) + itemlist.append(item.clone(title = "[COLOR oldlace]Películas en Español[/COLOR]", action = "scraper", + url = host + "/ver/subtituladas/", thumbnail = "http://imgur.com/36xALWc.png", + fanart = "http://imgur.com/53dhEU4.jpg", contentType = "movie")) + itemlist.append(item.clone(title = "[COLOR oldlace]Películas Subtituladas[/COLOR]", action = "scraper", + url = host + "/ver/espanol/", thumbnail = "http://imgur.com/36xALWc.png", + fanart = "http://imgur.com/53dhEU4.jpg", contentType = "movie")) + itemlist.append(item.clone(title = "[COLOR oldlace]Por Género[/COLOR]", action = "categoria_anno", + url = host, thumbnail = "http://imgur.com/36xALWc.png", extra = "Categorias", + fanart = "http://imgur.com/53dhEU4.jpg", contentType = "movie")) + + itemlist.append(itemlist[-1].clone(title = "[COLOR orangered]Buscar[/COLOR]", action = "search", + thumbnail = "http://imgur.com/ebWyuGe.png", fanart = "http://imgur.com/53dhEU4.jpg", + contentType = "tvshow")) + + return itemlist + +def categoria_anno(item): + logger.info() + itemlist = [] + data = httptools.downloadpage(item.url).data + bloque = scrapertools.find_single_match(data, 'mobile_menu.*?(%s.*?)' %item.extra) + logger.info("Intel44 %s" %bloque) + patron = '(?is)([^"]+)') + if len(patron) > 20: + if item.next_page != 20: + url_next_page = item.url + patron = patron[:20] + next_page = 20 + item.i = 0 + else: + patron = patron[item.i:][:20] + next_page = 20 + + url_next_page = item.url + + for url, thumb, title, cuality in patron: + title = re.sub(r"Imagen", "", title) + titulo = "[COLOR floralwhite]" + title + "[/COLOR]" + " " + "[COLOR crimson][B]" + cuality + "[/B][/COLOR]" + title = re.sub(r"!|\/.*", "", title).strip() + + if item.extra != "search": + item.i += 1 + new_item = item.clone(action="findvideos", title=titulo, url=url, thumbnail=thumb, fulltitle=title, + contentTitle=title, contentType="movie", library=True) + new_item.infoLabels['year'] = get_year(url) + itemlist.append(new_item) + + ## Paginación + if url_next_page: + itemlist.append(item.clone(title="[COLOR crimson]Siguiente >>[/COLOR]", url=url_next_page, next_page=next_page, + thumbnail="http://imgur.com/w3OMy2f.png", i=item.i)) + try: + from core import tmdb + tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__) + for item in itemlist: + if not "Siguiente >>" in item.title: + if "0." in str(item.infoLabels['rating']): + item.infoLabels['rating'] = "[COLOR indianred]Sin puntuacíon[/COLOR]" + else: + item.infoLabels['rating'] = "[COLOR orange]" + str(item.infoLabels['rating']) + "[/COLOR]" + item.title = item.title + " " + str(item.infoLabels['rating']) + except: + pass + + for item_tmdb in itemlist: + logger.info(str(item_tmdb.infoLabels['tmdb_id'])) + + return itemlist + + +def findvideos(item): + logger.info() + itemlist = [] + data = httptools.downloadpage(item.url).data + data_post = scrapertools.find_single_match(data, "type: 'POST'.*?id: (.*?),slug: '(.*?)'") + if data_post: + post = 'id=' + data_post[0] + '&slug=' + data_post[1] + data_info = httptools.downloadpage(host + '/ajax/cargar_video.php', post=post).data + enlaces = scrapertools.find_multiple_matches(data_info, + " (\w+ \w+).*?
    ([^']+)") + for server, id_enlace, name, number, idioma_calidad in enlaces: + + if "SUBTITULOS" in idioma_calidad and not "P" in idioma_calidad: + idioma_calidad = idioma_calidad.replace("SUBTITULOS", "VO") + idioma_calidad = idioma_calidad.replace("VO", "[COLOR orangered] VO[/COLOR]") + elif "SUBTITULOS" in idioma_calidad and "P" in idioma_calidad: + idioma_calidad = "[COLOR indianred] " + idioma_calidad + "[/COLOR]" + + elif "LATINO" in idioma_calidad: + idioma_calidad = idioma_calidad.replace("LATINO", "[COLOR red]LATINO[/COLOR]") + elif "Español" in idioma_calidad: + idioma_calidad = idioma_calidad.replace("Español", "[COLOR crimson]ESPAÑOL[/COLOR]") + if "HD" in idioma_calidad: + idioma_calidad = idioma_calidad.replace("HD", "[COLOR crimson] HD[/COLOR]") + elif "720" in idioma_calidad: + idioma_calidad = idioma_calidad.replace("720", "[COLOR firebrick] 720[/COLOR]") + elif "TS" in idioma_calidad: + idioma_calidad = idioma_calidad.replace("TS", "[COLOR brown] TS[/COLOR]") + + elif "CAM" in idioma_calidad: + idioma_calidad = idioma_calidad.replace("CAM", "[COLOR darkkakhi] CAM[/COLOR]") + + url = host + "/ajax/video.php?id=" + id_enlace + "&slug=" + name + "&quality=" + number + + if not "Ultra" in server: + server = "[COLOR cyan][B]" + server + "[/B][/COLOR]" + extra = "" + else: + server = "[COLOR yellow][B]" + server + "[/B][/COLOR]" + extra = "yes" + title = server.strip() + " " + idioma_calidad + itemlist.append(Item(channel=item.channel, action="play", title=title, url=url, fanart=item.fanart, + thumbnail=item.thumbnail, fulltitle=item.title, extra=extra, folder=True)) + if item.library and config.get_videolibrary_support() and len(itemlist) > 0: + infoLabels = {'tmdb_id': item.infoLabels['tmdb_id'], + 'title': item.infoLabels['title']} + itemlist.append(Item(channel=item.channel, title="Añadir esta película a la videoteca", + action="add_pelicula_to_library", url=item.url, infoLabels=infoLabels, + text_color="0xFFf7f7f7", + thumbnail='http://imgur.com/gPyN1Tf.png')) + else: + itemlist.append( + Item(channel=item.channel, action="", title="[COLOR red][B]Upps!..Archivo no encontrado...[/B][/COLOR]", + thumbnail=item.thumbnail)) + return itemlist + + +def play(item): + itemlist = [] + data = httptools.downloadpage(item.url).data + data = re.sub(r'\\', '', data) + item.url = scrapertools.find_single_match(data, 'src="([^"]+)"') + data = httptools.downloadpage(item.url).data + url = scrapertools.find_single_match(data, 'window.location="([^"]+)"') + if item.extra == "yes": + data = httptools.downloadpage(url).data + url = scrapertools.find_single_match(data, '(?is)iframe src="([^"]+)"') + videolist = servertools.find_video_items(data=url) + for video in videolist: + itemlist.append(Item(channel=item.channel, url=video.url, server=video.server, + title="[COLOR floralwhite][B]" + video.server + "[/B][/COLOR]", action="play", + folder=False)) + + return itemlist + + +def get_year(url): + data = httptools.downloadpage(url).data + year = scrapertools.find_single_match(data, '

    Año:(.*?)

    ') + if year == "": + year = " " + return year From a3429f68cb388b8c7b2c25845fa7f527a177f6ab Mon Sep 17 00:00:00 2001 From: Intel1 Date: Tue, 8 Aug 2017 14:40:21 -0500 Subject: [PATCH 05/15] Update cinetux.json --- plugin.video.alfa/channels/cinetux.json | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin.video.alfa/channels/cinetux.json b/plugin.video.alfa/channels/cinetux.json index 5ff1aa3d..582184ab 100755 --- a/plugin.video.alfa/channels/cinetux.json +++ b/plugin.video.alfa/channels/cinetux.json @@ -28,6 +28,7 @@ ], "categories": [ "latino", + "direct", "movie" ], "settings": [ From bde229486f33a187575bb82ed92231b31cf96655 Mon Sep 17 00:00:00 2001 From: Intel1 Date: Tue, 8 Aug 2017 14:41:07 -0500 Subject: [PATCH 06/15] Update peliculasrey.json --- plugin.video.alfa/channels/peliculasrey.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin.video.alfa/channels/peliculasrey.json b/plugin.video.alfa/channels/peliculasrey.json index c727b4c6..bbb3b0af 100755 --- a/plugin.video.alfa/channels/peliculasrey.json +++ b/plugin.video.alfa/channels/peliculasrey.json @@ -18,6 +18,7 @@ } ], "categories": [ + "direct", "movie" ] -} \ No newline at end of file +} From 0a1d4ceea61ff77f01d81317692858d885026126 Mon Sep 17 00:00:00 2001 From: Intel1 Date: Tue, 8 Aug 2017 14:41:41 -0500 Subject: [PATCH 07/15] Update peliscity.json --- plugin.video.alfa/channels/peliscity.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin.video.alfa/channels/peliscity.json b/plugin.video.alfa/channels/peliscity.json index d899b48e..75a76237 100755 --- a/plugin.video.alfa/channels/peliscity.json +++ b/plugin.video.alfa/channels/peliscity.json @@ -20,6 +20,7 @@ "categories": [ "movie", "latino", + "direct", "VOS" ] -} \ No newline at end of file +} From 08b60b37e0a6840ff1d6e28b36aa74cc42a24f96 Mon Sep 17 00:00:00 2001 From: Intel1 Date: Tue, 8 Aug 2017 14:42:10 -0500 Subject: [PATCH 08/15] Update pelisplanet.json --- plugin.video.alfa/channels/pelisplanet.json | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin.video.alfa/channels/pelisplanet.json b/plugin.video.alfa/channels/pelisplanet.json index 98ad2773..b76b31b4 100644 --- a/plugin.video.alfa/channels/pelisplanet.json +++ b/plugin.video.alfa/channels/pelisplanet.json @@ -17,6 +17,7 @@ "categories": [ "movie", "tvshow", + "direct", "vos" ], "settings": [ From 8813d365fad3db0f325ea177aa3b64da58d9bdf4 Mon Sep 17 00:00:00 2001 From: Intel1 Date: Tue, 8 Aug 2017 14:42:35 -0500 Subject: [PATCH 09/15] Update pelisfox.json --- plugin.video.alfa/channels/pelisfox.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin.video.alfa/channels/pelisfox.json b/plugin.video.alfa/channels/pelisfox.json index 210d18e1..c8730240 100755 --- a/plugin.video.alfa/channels/pelisfox.json +++ b/plugin.video.alfa/channels/pelisfox.json @@ -23,6 +23,7 @@ ], "categories": [ "latino", + "direct", "movie" ], "settings": [ @@ -51,4 +52,4 @@ "visible": true } ] -} \ No newline at end of file +} From a56e31c9feb7c9d369cb37939a08f84ab4d630f9 Mon Sep 17 00:00:00 2001 From: Intel1 Date: Tue, 8 Aug 2017 14:43:03 -0500 Subject: [PATCH 10/15] Update yaske.json --- plugin.video.alfa/channels/yaske.json | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin.video.alfa/channels/yaske.json b/plugin.video.alfa/channels/yaske.json index 6d912e10..c0d02237 100644 --- a/plugin.video.alfa/channels/yaske.json +++ b/plugin.video.alfa/channels/yaske.json @@ -44,6 +44,7 @@ ], "categories": [ "latino", + "direct", "movie" ], "settings": [ From bba783e1e440d305c5a57a65caaa478f623ababa Mon Sep 17 00:00:00 2001 From: Intel1 Date: Tue, 8 Aug 2017 14:55:24 -0500 Subject: [PATCH 11/15] Update allcalidad.json --- plugin.video.alfa/channels/allcalidad.json | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin.video.alfa/channels/allcalidad.json b/plugin.video.alfa/channels/allcalidad.json index 30a42828..42124f56 100755 --- a/plugin.video.alfa/channels/allcalidad.json +++ b/plugin.video.alfa/channels/allcalidad.json @@ -15,6 +15,7 @@ ], "categories": [ "movie", + "direct", "latino" ], "settings": [ From 20486fe6da94f2a9e58922ff3e2c5cddf3162fcb Mon Sep 17 00:00:00 2001 From: alfa-addon Date: Tue, 8 Aug 2017 17:22:47 -0400 Subject: [PATCH 12/15] update v1.5.1 --- plugin.video.alfa/channels/pelisfox.py | 39 +- plugin.video.alfa/channels/setting.py | 5 +- plugin.video.alfa/channels/videolibrary.py | 323 +++++------ plugin.video.alfa/channels/yaske.py | 519 +++++++++--------- plugin.video.alfa/channelselector.py | 4 +- plugin.video.alfa/core/videolibrarytools.py | 32 +- .../resources/language/Catalan/strings.xml | 1 + .../resources/language/English/strings.xml | 1 + .../resources/language/Italian/strings.xml | 1 + .../language/Spanish (mexico)/strings.xml | 1 + .../resources/language/Spanish/strings.xml | 1 + .../general/default/thumb_channels_direct.png | Bin 0 -> 14698 bytes plugin.video.alfa/servers/gvideo.json | 6 +- plugin.video.alfa/videolibrary_service.py | 5 +- 14 files changed, 484 insertions(+), 454 deletions(-) mode change 100755 => 100644 plugin.video.alfa/channels/pelisfox.py mode change 100755 => 100644 plugin.video.alfa/channels/setting.py mode change 100755 => 100644 plugin.video.alfa/channels/videolibrary.py mode change 100755 => 100644 plugin.video.alfa/channelselector.py mode change 100755 => 100644 plugin.video.alfa/resources/language/Catalan/strings.xml mode change 100755 => 100644 plugin.video.alfa/resources/language/English/strings.xml mode change 100755 => 100644 plugin.video.alfa/resources/language/Italian/strings.xml mode change 100755 => 100644 plugin.video.alfa/resources/language/Spanish (mexico)/strings.xml mode change 100755 => 100644 plugin.video.alfa/resources/language/Spanish/strings.xml create mode 100644 plugin.video.alfa/resources/media/general/default/thumb_channels_direct.png diff --git a/plugin.video.alfa/channels/pelisfox.py b/plugin.video.alfa/channels/pelisfox.py old mode 100755 new mode 100644 index 854bf5c9..a76d7e3b --- a/plugin.video.alfa/channels/pelisfox.py +++ b/plugin.video.alfa/channels/pelisfox.py @@ -9,6 +9,8 @@ from core import logger from core import scrapertools from core import tmdb from core.item import Item +from core import servertools + tgenero = {"Drama": "https://s16.postimg.org/94sia332d/drama.png", u"Accción": "https://s3.postimg.org/y6o9puflv/accion.png", @@ -225,6 +227,7 @@ def findvideos(item): logger.info() itemlist = [] templist = [] + video_list = [] data = httptools.downloadpage(item.url).data data = re.sub(r'"|\n|\r|\t| |
    |\s{2,}', "", data) patron = '
  • |\s{2,}', "", data) id = scrapertools.find_single_match(data, 'var _SOURCE =.*?source:(.*?),') @@ -247,24 +250,26 @@ def findvideos(item): sub = sub.replace('\\', '') else: sub = '' - new_url = 'http://iplay.one/api/embed?id=%s&token=8908d9f846&%s' % (id, sub) + new_url = 'https://onevideo.tv/api/player?key=90503e3de26d45e455b55e9dc54f015b3d1d4150&link' \ + '=%s&srt=%s' % (id, sub) data = httptools.downloadpage(new_url).data - patron = 'file":"(.*?)","label":"(.*?)","type":".*?"}' - matches = matches = re.compile(patron, re.DOTALL).findall(data) + url = scrapertools.find_single_match (data, '