diff --git a/plugin.video.alfa/addon.xml b/plugin.video.alfa/addon.xml index 9152a6c4..88b86452 100755 --- a/plugin.video.alfa/addon.xml +++ b/plugin.video.alfa/addon.xml @@ -1,5 +1,5 @@  - + @@ -19,13 +19,12 @@ [B]Estos son los cambios para esta versión:[/B] [COLOR green][B]Canales agregados y arreglos[/B][/COLOR] - » animeid » anitoonstv - » hentaiid » mundoflv - » vertelenovelas » todopeliculas - » cinemahd » filebebo - » clipwatching » sendvid - » thevideome » videowood + » hdfull » pelisplus + » cinemahd » cinecalidad + » peliculasgratis » pelisplusco + » ultrapeliculashd » thevideome ¤ arreglos internos + [COLOR green]Gracias a [B][COLOR yellow]atomizasser[/COLOR][/B] por su colaboración en esta versión[/COLOR] Navega con Kodi por páginas web para ver sus videos de manera fácil. Browse web pages using Kodi diff --git a/plugin.video.alfa/channels/cinemahd.json b/plugin.video.alfa/channels/cinemahd.json index 10407831..72ef64f0 100644 --- a/plugin.video.alfa/channels/cinemahd.json +++ b/plugin.video.alfa/channels/cinemahd.json @@ -4,11 +4,11 @@ "active": true, "adult": false, "language": ["lat"], - "thumbnail": "", + "thumbnail": "https://s13.postimg.org/bnesayzcn/cinemahd.png", "banner": "", "version": 1, "categories": [ - "tvshow" + "movies" ], "settings": [ { @@ -34,6 +34,22 @@ "default": true, "enabled": true, "visible": true + }, + { + "id": "include_in_newest_latino", + "type": "bool", + "label": "Incluir en Novedades - latino", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "include_in_newest_terror", + "type": "bool", + "label": "Incluir en Novedades - Terror", + "default": true, + "enabled": true, + "visible": true } ] } \ No newline at end of file diff --git a/plugin.video.alfa/channels/cinemahd.py b/plugin.video.alfa/channels/cinemahd.py index 2a019159..9cf46904 100644 --- a/plugin.video.alfa/channels/cinemahd.py +++ b/plugin.video.alfa/channels/cinemahd.py @@ -39,7 +39,6 @@ def get_source(url): def list_all(item): logger.info() itemlist = [] - data = get_source(item.url) if item.section == 'alpha': patron = '\d+.*?(.*?).*?' @@ -75,7 +74,7 @@ def list_all(item): # Paginación - url_next_page = scrapertools.find_single_match(data,'.*?»') + url_next_page = scrapertools.find_single_match(data,'') if url_next_page: itemlist.append(item.clone(title="Siguiente >>", url=url_next_page, action='list_all')) return itemlist @@ -92,7 +91,7 @@ def section(item): elif item.section == 'genre': patron = '(.*?)' elif item.section == 'year': - patron = 'menu-item-15\d+>(\d{4})<\/a><\/li>' + patron = 'custom menu-item-15\d+>(\d{4})<\/a><\/li>' elif item.section == 'alpha': patron = '
  • (.*?)' action = 'list_all' diff --git a/plugin.video.alfa/channels/cuelgame.json b/plugin.video.alfa/channels/cuelgame.json index 0a40b064..61aa2409 100755 --- a/plugin.video.alfa/channels/cuelgame.json +++ b/plugin.video.alfa/channels/cuelgame.json @@ -1,7 +1,7 @@ { "id": "cuelgame", "name": "Cuelgame", - "active": true, + "active": false, "adult": false, "language": ["cast"], "thumbnail": "cuelgame.png", diff --git a/plugin.video.alfa/channels/hdfull.py b/plugin.video.alfa/channels/hdfull.py index e5714a34..e0fec7f2 100644 --- a/plugin.video.alfa/channels/hdfull.py +++ b/plugin.video.alfa/channels/hdfull.py @@ -13,7 +13,7 @@ from core.item import Item from platformcode import config, logger from platformcode import platformtools -host = "http://hdfull.tv" +host = "https://hdfull.tv" if config.get_setting('hdfulluser', 'hdfull'): account = True @@ -39,11 +39,22 @@ def login(): httptools.downloadpage(host, post=post) +def set_host(): + global host + logger.info() + + hosts_list= [host, 'https://hdfull.me'] + for url in hosts_list: + data = httptools.downloadpage(url, only_headers=True) + if data.sucess: + host = url + break def mainlist(item): logger.info() itemlist = [] + set_host() itemlist.append(Item(channel=item.channel, action="menupeliculas", title="Películas", url=host, folder=True)) itemlist.append(Item(channel=item.channel, action="menuseries", title="Series", url=host, folder=True)) @@ -569,7 +580,7 @@ def generos(item): itemlist = [] data = agrupa_datos(httptools.downloadpage(item.url).data) - data = scrapertools.find_single_match(data, '
  • ([^<]+)
  • ' matches = re.compile(patron, re.DOTALL).findall(data) @@ -591,7 +602,7 @@ def generos_series(item): itemlist = [] data = agrupa_datos(httptools.downloadpage(item.url).data) - data = scrapertools.find_single_match(data, '
  • ([^<]+)
  • ' matches = re.compile(patron, re.DOTALL).findall(data) @@ -642,10 +653,10 @@ def findvideos(item): it1.append(Item(channel=item.channel, action="set_status", title=title, fulltitle=title, url=url_targets, thumbnail=item.thumbnail, show=item.show, folder=True)) - data_js = httptools.downloadpage("http://hdfull.tv/templates/hdfull/js/jquery.hdfull.view.min.js").data + data_js = httptools.downloadpage("%s/templates/hdfull/js/jquery.hdfull.view.min.js" % host).data key = scrapertools.find_single_match(data_js, 'JSON.parse\(atob.*?substrings\((.*?)\)') - data_js = httptools.downloadpage("http://hdfull.tv/js/providers.js").data + data_js = httptools.downloadpage("%s/js/providers.js" % host).data try: data_js = jhexdecode(data_js) diff --git a/plugin.video.alfa/channels/peliculasgratis.py b/plugin.video.alfa/channels/peliculasgratis.py index 9105048d..a36563da 100644 --- a/plugin.video.alfa/channels/peliculasgratis.py +++ b/plugin.video.alfa/channels/peliculasgratis.py @@ -46,20 +46,20 @@ def mainlist(item): url= host, thumbnail="http://imgur.com/fN2p6qH.png", fanart="http://imgur.com/b8OuBR2.jpg", contentType="movie")) - itemlist.append(itemlist[-1].clone(title="[COLOR lightskyblue][B]Series[/B][/COLOR]", action="scraper", - url= host + "/lista-de-series", - thumbnail="http://imgur.com/Jia27Uc.png", fanart="http://imgur.com/b8OuBR2.jpg", - contentType="tvshow")) + # itemlist.append(itemlist[-1].clone(title="[COLOR lightskyblue][B]Series[/B][/COLOR]", action="scraper", + # url= host + "/lista-de-series", + # thumbnail="http://imgur.com/Jia27Uc.png", fanart="http://imgur.com/b8OuBR2.jpg", + # contentType="tvshow")) itemlist.append(itemlist[-1].clone(title="[COLOR lightskyblue][B]Buscar[/B][/COLOR]", thumbnail="http://imgur.com/mwTwfN7.png", fanart="http://imgur.com/b8OuBR2.jpg")) itemlist.append( itemlist[-1].clone(title="[COLOR lightskyblue][B] Buscar Película[/B][/COLOR]", action="search", url="", thumbnail="http://imgur.com/mwTwfN7.png", fanart="http://imgur.com/b8OuBR2.jpg", contentType="movie")) - itemlist.append( - itemlist[-1].clone(title="[COLOR lightskyblue][B] Buscar Serie[/B][/COLOR]", action="search", url="", - thumbnail="http://imgur.com/mwTwfN7.png", fanart="http://imgur.com/b8OuBR2.jpg", - contentType="tvshow")) + # itemlist.append( + # itemlist[-1].clone(title="[COLOR lightskyblue][B] Buscar Serie[/B][/COLOR]", action="search", url="", + # thumbnail="http://imgur.com/mwTwfN7.png", fanart="http://imgur.com/b8OuBR2.jpg", + # contentType="tvshow")) return itemlist @@ -119,11 +119,11 @@ def scraper(item): patron += 'alt="([^"]+)".*?' patron += '">([^<]+)<.*?' patron += '
    (.*?)<\/a>

    .*?' - patron += '<\/a><\/h3> (.*?)<' + #patron += '<\/a><\/h3> (.*?)<' action = "findvideos" matches = scrapertools.find_multiple_matches(bloque_enlaces, patron) - for url, thumb, title, quality, check_idioma, year in matches: - year = year.strip() + for url, thumb, title, quality, check_idioma in matches: + #year = year.strip() title_fan = title title_item = "[COLOR cornflowerblue][B]" + title + "[/B][/COLOR]" if item.contentType != "movie": @@ -140,20 +140,20 @@ def scraper(item): title = title itemlist.append( Item(channel=item.channel, title=title, fulltitle=title, url=host + url, action=action, thumbnail=thumb, - fanart="http://imgur.com/nqmJozd.jpg", extra=title_fan + "|" + title_item + "|" + year, show=title, - contentType=item.contentType, folder=True, language = idiomas, infoLabels={"year":year})) + fanart="http://imgur.com/nqmJozd.jpg", extra=title_fan + "|" + title_item + "|", show=title, + contentType=item.contentType, folder=True, language = idiomas)) ## Paginación - tmdb.set_infoLabels(itemlist) - if year: - next = scrapertools.find_single_match(data, 'href="([^"]+)" title="Siguiente página">') - if len(next) > 0: - url = next - if not "http" in url: - url = host + url - itemlist.append( - Item(channel=item.channel, action="scraper", title="[COLOR floralwhite][B]Siguiente[/B][/COLOR]", - url=url, thumbnail="http://imgur.com/jhRFAmk.png", fanart="http://imgur.com/nqmJozd.jpg", - extra=item.extra, contentType=item.contentType, folder=True)) + #tmdb.set_infoLabels(itemlist) + #if year: + next = scrapertools.find_single_match(data, 'href="([^"]+)" title="Siguiente página">') + if len(next) > 0: + url = next + if not "http" in url: + url = host + url + itemlist.append( + Item(channel=item.channel, action="scraper", title="[COLOR floralwhite][B]Siguiente[/B][/COLOR]", + url=url, thumbnail="http://imgur.com/jhRFAmk.png", fanart="http://imgur.com/nqmJozd.jpg", + extra=item.extra, contentType=item.contentType, folder=True)) return itemlist diff --git a/plugin.video.alfa/channels/pelisplus.py b/plugin.video.alfa/channels/pelisplus.py index 23a950b9..fefe287d 100644 --- a/plugin.video.alfa/channels/pelisplus.py +++ b/plugin.video.alfa/channels/pelisplus.py @@ -434,11 +434,20 @@ def get_vip(url): if 'plus'in item: id, tipo, lang= scrapertools.find_single_match(item,'plus\/(\d+)\/.*?=(\d+).*?=(.*)') new_url = 'https://www.elreyxhd.com/pelisplus.php?id=%s&tipo=%s&idioma=%s' % (id, tipo, lang) + datax=httptools.downloadpage(new_url, follow_redirects=False).headers.get("location", "") + itemlist.append(Item(url=datax)) else: id = scrapertools.find_single_match(item,'episodes\/(\d+)') - new_url = 'https://www.elreyxhd.com/samir.php?id=%s&tipo=capitulo&idioma=latino&x=&sv=' % id - data=httptools.downloadpage(new_url, follow_redirects=False).headers.get("location", "") - itemlist.append(Item(url=data)) + data_vip = httptools.downloadpage(item).data + patron = '' + matches = re.compile(patron, re.DOTALL).findall(data_vip) + for urls in matches: + x = scrapertools.find_single_match(urls,r"&x=(\d)&") + if x != '': + new_url = 'https://www.elreyxhd.com/samir.php?id=%s&tipo=capitulo&idioma=latino&x=%s&sv=si' % (id, x) + datax = httptools.downloadpage(new_url, follow_redirects=False).headers.get("location", "") + itemlist.append(Item(url=datax)) + return itemlist diff --git a/plugin.video.alfa/channels/pelisplusco.py b/plugin.video.alfa/channels/pelisplusco.py index 848df623..d32165a6 100644 --- a/plugin.video.alfa/channels/pelisplusco.py +++ b/plugin.video.alfa/channels/pelisplusco.py @@ -1,312 +1,320 @@ -# -*- coding: utf-8 -*- -# -*- Channel PelisPlus.co -*- -# -*- Created for Alfa-addon -*- -# -*- By the Alfa Develop Group -*- - -import re -import urllib -from platformcode import logger -from platformcode import config -from core import scrapertools -from core.item import Item -from core import servertools -from core import httptools -from core import tmdb - - -host = 'http://pelisplus.co' - -def mainlist(item): - logger.info() - - itemlist = [] - - itemlist.append(item.clone(title="Peliculas", - action="movie_menu", - )) - - itemlist.append(item.clone(title="Series", - action="series_menu", - )) - - return itemlist - -def movie_menu(item): - - logger.info() - - itemlist = [] - - itemlist.append(item.clone(title="Estrenos", - action="list_all", - url = host+'/estrenos/', - type = 'normal' - )) - - itemlist.append(item.clone(title="Generos", - action="seccion", - url=host, - seccion='generos' - )) - - itemlist.append(item.clone(title="Por Año", - action="seccion", - url=host, - seccion='anios' - )) - - return itemlist - -def series_menu(item): - - logger.info() - - itemlist =[] - - itemlist.append(item.clone(title="Todas", - action="list_all", - url=host + '/series/', - type='serie' - )) - - return itemlist - - -def get_source(url): - - logger.info() - data = httptools.downloadpage(url).data - data = re.sub(r'"|\n|\r|\t| |
    |\s{2,}', "", data) - return data - -def list_all (item): - logger.info () - itemlist = [] - - if item.type not in ['normal', 'seccion', 'serie']: - post = {'page':item.page, 'type':item.type,'id':item.id} - post = urllib.urlencode(post) - data =httptools.downloadpage(item.url, post=post).data - data = re.sub(r'"|\n|\r|\t| |
    |\s{2,}', "", data) - else: - data = get_source(item.url) - if item.type == 'serie' or item.type == 'recents': - contentType = 'serie' - action = 'seasons' - else: - contentType = 'pelicula' - action = 'findvideos' - - patron = 'item-%s>
    (.*?)<\/p>(\d{4})<\/span>'%contentType - - matches = re.compile(patron,re.DOTALL).findall(data) - - for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedyear in matches: - url = host+scrapedurl+'p001/' - thumbnail = scrapedthumbnail - plot= '' - contentTitle=scrapedtitle - title = contentTitle - year = scrapedyear - fanart ='' - - new_item=item.clone(action=action, - title=title, - url=url, - thumbnail=thumbnail, - plot=plot, - fanart=fanart, - infoLabels ={'year':year} - ) - if contentType =='serie': - new_item.contentSerieName=title - else: - new_item.contentTitle = title - itemlist.append(new_item) - - tmdb.set_infoLabels_itemlist(itemlist, seekTmdb =True) - #Paginacion - - next_page_valid = scrapertools.find_single_match(data, '
    ') - if item.type != 'normal' and (len(itemlist)>19 or next_page_valid): - type = item.type - if item.type == 'serie': - type = 'recents' - if next_page_valid: - page = str(int(next_page_valid[0])+1) - if item.type != 'recents': - id = next_page_valid[1] - type = next_page_valid[2] - else: - id ='' - else: - page = str(int(item.page)+1) - id = item.id - - if type =='recents': - type_pagination = '/series/pagination' - else: - type_pagination = '/pagination' - - url = host+type_pagination - - itemlist.append(item.clone(action = "list_all", - title = 'Siguiente >>>', - page=page, - url = url, - id = id, - type = type - )) - return itemlist - -def seccion(item): - logger.info() - itemlist = [] - data = get_source(item.url) - if item.seccion == 'generos': - patron = '
  • <\/i>(.*?)<\/span>' - type = 'genre' - elif item.seccion == 'anios': - patron = '
  • (\d{4})<\/a>' - type = 'year' - matches = re.compile(patron, re.DOTALL).findall(data) - for scrapedurl, scrapedtitle in matches: - title = scrapedtitle - if item.seccion == 'generos': - cant = re.sub(r'.*?','',scrapedtitle) - only_title = re.sub(r'<.*','',scrapedtitle).rstrip() - title = only_title+' (%s)'%cant - - url = host+scrapedurl - - itemlist.append( - Item(channel=item.channel, - action="list_all", - title=title, - fulltitle=item.title, - url=url, - type = 'seccion' - )) - # Paginacion - - if itemlist != []: - next_page = scrapertools.find_single_match(data, '
  • Siguiente <') - next_page_url = host + next_page - import inspect - if next_page != '': - itemlist.append(item.clone(action="seccion", - title='Siguiente >>>', - url=next_page_url, - thumbnail='https://s16.postimg.org/9okdu7hhx/siguiente.png' - )) - - return itemlist - - -def seasons(item): - logger.info() - itemlist =[] - - data = httptools.downloadpage(item.url).data - data = re.sub(r'"|\n|\r|\t| |
    |\s{2,}', "", data) - - patron ='<\/i>(.*?)<\/div>' - matches = matches = re.compile(patron, re.DOTALL).findall(data) - infoLabels=item.infoLabels - - for title in matches: - season = title.replace('Temporada ','') - infoLabels['season'] = season - itemlist.append(Item( - channel=item.channel, - title=title, - url=item.url, - action='season_episodes', - contentSerieName= item.contentSerieName, - contentSeasonNumber = season, - infoLabels=infoLabels - )) - tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) - - return itemlist[::-1] - -def season_episodes(item): - logger.info() - itemlist = [] - - data = httptools.downloadpage(item.url).data - data = re.sub(r'"|\n|\r|\t| |
    |\s{2,}', "", data) - season = str(item.infoLabels['season']) - patron = '
    <\/i> (.*?)<\/a>'%season - matches = matches = re.compile(patron, re.DOTALL).findall(data) - infoLabels = item.infoLabels - for url, episode in matches: - episodenumber = re.sub('C.* ','',episode) - infoLabels['episode'] = episodenumber - itemlist.append(Item(channel=item.channel, - title= episode, - url = host+url, - action = 'findvideos', - infoLabels=infoLabels, - contentEpisodeNumber=episode - )) - tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) - - - return itemlist[::-1] - - -def findvideos(item): - logger.info() - itemlist = [] - video_list = [] - data = httptools.downloadpage(item.url).data - data = re.sub(r'"|\n|\r|\t| |
    |\s{2,}', "", data) - - patron = 'data-source=(.*?) .*?tab.*?data.*?srt=(.*?) data-iframe=>
    (.*?)\s?-\s?(.*?)<\/a>' - - matches = matches = re.compile(patron, re.DOTALL).findall(data) - - for url, sub, language, quality in matches: - - if 'http' not in url: - - new_url = 'https://onevideo.tv/api/player?key=90503e3de26d45e455b55e9dc54f015b3d1d4150&link' \ - '=%s&srt=%s' % (url, sub) - data = httptools.downloadpage(new_url).data - data = re.sub(r'\\', "", data) - video_list.extend(servertools.find_video_items(data=data)) - - for video_url in video_list: - video_url.channel = item.channel - video_url.action = 'play' - video_url.title = item.title + '(%s) (%s)' % (language, video_url.server) - if video_url.language == '': - video_url.language = language - video_url.subtitle = sub - video_url.contentTitle=item.contentTitle - else: - server = servertools.get_server_from_url(url) - video_list.append(item.clone(title=item.title, - url=url, - action='play', - quality = quality, - language = language, - server=server, - subtitle = sub - )) - - - if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos': - itemlist.append( - Item(channel=item.channel, - title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]', - url=item.url, - action="add_pelicula_to_library", - extra="findvideos", - contentTitle=item.contentTitle - )) - - return video_list - +# -*- coding: utf-8 -*- +# -*- Channel PelisPlus.co -*- +# -*- Created for Alfa-addon -*- +# -*- By the Alfa Develop Group -*- + +import re +import urllib +from platformcode import logger +from platformcode import config +from core import scrapertools +from core.item import Item +from core import servertools +from core import httptools +from core import tmdb + + +host = 'http://pelisplus.co' + +def mainlist(item): + logger.info() + + itemlist = [] + + itemlist.append(item.clone(title="Peliculas", + action="movie_menu", + )) + + itemlist.append(item.clone(title="Series", + action="series_menu", + )) + + return itemlist + +def movie_menu(item): + + logger.info() + + itemlist = [] + + itemlist.append(item.clone(title="Estrenos", + action="list_all", + url = host+'/estrenos/', + type = 'normal' + )) + + itemlist.append(item.clone(title="Generos", + action="seccion", + url=host, + seccion='generos' + )) + + itemlist.append(item.clone(title="Por Año", + action="seccion", + url=host, + seccion='anios' + )) + + return itemlist + +def series_menu(item): + + logger.info() + + itemlist =[] + + itemlist.append(item.clone(title="Todas", + action="list_all", + url=host + '/series/', + type='serie' + )) + + return itemlist + + +def get_source(url): + + logger.info() + data = httptools.downloadpage(url).data + data = re.sub(r'"|\n|\r|\t| |
    |\s{2,}', "", data) + return data + +def list_all (item): + logger.info () + itemlist = [] + + if item.type not in ['normal', 'seccion', 'serie']: + post = {'page':item.page, 'type':item.type,'id':item.id} + post = urllib.urlencode(post) + data =httptools.downloadpage(item.url, post=post).data + data = re.sub(r'"|\n|\r|\t| |
    |\s{2,}', "", data) + else: + data = get_source(item.url) + if item.type == 'serie' or item.type == 'recents': + contentType = 'serie' + action = 'seasons' + else: + contentType = 'pelicula' + action = 'findvideos' + + patron = 'item-%s>
    (.*?)<\/p>(\d{4})<\/span>'%contentType + + matches = re.compile(patron,re.DOTALL).findall(data) + + for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedyear in matches: + url = host+scrapedurl+'p001/' + thumbnail = scrapedthumbnail + plot= '' + contentTitle=scrapedtitle + title = contentTitle + year = scrapedyear + fanart ='' + + new_item=item.clone(action=action, + title=title, + url=url, + thumbnail=thumbnail, + plot=plot, + fanart=fanart, + infoLabels ={'year':year} + ) + if contentType =='serie': + new_item.contentSerieName=title + else: + new_item.contentTitle = title + itemlist.append(new_item) + + tmdb.set_infoLabels_itemlist(itemlist, seekTmdb =True) + #Paginacion + + next_page_valid = scrapertools.find_single_match(data, '
    ') + if item.type != 'normal' and (len(itemlist)>19 or next_page_valid): + type = item.type + if item.type == 'serie': + type = 'recents' + if next_page_valid: + page = str(int(next_page_valid[0])+1) + if item.type != 'recents': + id = next_page_valid[1] + type = next_page_valid[2] + else: + id ='' + else: + page = str(int(item.page)+1) + id = item.id + + if type =='recents': + type_pagination = '/series/pagination' + else: + type_pagination = '/pagination' + + url = host+type_pagination + + itemlist.append(item.clone(action = "list_all", + title = 'Siguiente >>>', + page=page, + url = url, + id = id, + type = type + )) + return itemlist + +def seccion(item): + logger.info() + itemlist = [] + data = get_source(item.url) + if item.seccion == 'generos': + patron = '
  • <\/i>(.*?)<\/span>' + type = 'genre' + elif item.seccion == 'anios': + patron = '
  • (\d{4})<\/a>' + type = 'year' + matches = re.compile(patron, re.DOTALL).findall(data) + for scrapedurl, scrapedtitle in matches: + title = scrapedtitle + if item.seccion == 'generos': + cant = re.sub(r'.*?','',scrapedtitle) + only_title = re.sub(r'<.*','',scrapedtitle).rstrip() + title = only_title+' (%s)'%cant + + url = host+scrapedurl + + itemlist.append( + Item(channel=item.channel, + action="list_all", + title=title, + fulltitle=item.title, + url=url, + type = 'seccion' + )) + # Paginacion + + if itemlist != []: + next_page = scrapertools.find_single_match(data, '
  • Siguiente <') + next_page_url = host + next_page + import inspect + if next_page != '': + itemlist.append(item.clone(action="seccion", + title='Siguiente >>>', + url=next_page_url, + thumbnail='https://s16.postimg.org/9okdu7hhx/siguiente.png' + )) + + return itemlist + + +def seasons(item): + logger.info() + itemlist =[] + + data = httptools.downloadpage(item.url).data + data = re.sub(r'"|\n|\r|\t| |
    |\s{2,}', "", data) + + patron ='<\/i>(.*?)<\/div>' + matches = matches = re.compile(patron, re.DOTALL).findall(data) + infoLabels=item.infoLabels + + for title in matches: + season = title.replace('Temporada ','') + infoLabels['season'] = season + itemlist.append(Item( + channel=item.channel, + title=title, + url=item.url, + action='season_episodes', + contentSerieName= item.contentSerieName, + contentSeasonNumber = season, + infoLabels=infoLabels + )) + tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) + + return itemlist[::-1] + +def season_episodes(item): + logger.info() + itemlist = [] + + data = httptools.downloadpage(item.url).data + data = re.sub(r'"|\n|\r|\t| |
    |\s{2,}', "", data) + season = str(item.infoLabels['season']) + patron = '
    <\/i> (.*?)<\/a>'%season + matches = matches = re.compile(patron, re.DOTALL).findall(data) + infoLabels = item.infoLabels + for url, episode in matches: + episodenumber = re.sub('C.* ','',episode) + infoLabels['episode'] = episodenumber + itemlist.append(Item(channel=item.channel, + title= episode, + url = host+url, + action = 'findvideos', + infoLabels=infoLabels, + contentEpisodeNumber=episode + )) + tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) + + + return itemlist[::-1] + +def get_links_by_language(item, data): + logger.info() + + video_list = [] + + language = scrapertools.find_single_match(data, 'ul id=level\d_(.*?)\s*class=') + patron = 'data-source=(.*?)data.*?srt=(.*?)data-iframe.*?Opci.*?<.*?hidden>[^\(]\((.*?)\)' + matches = re.compile(patron, re.DOTALL).findall(data) + + for url, sub, quality in matches: + if 'http' not in url: + + new_url = 'https://onevideo.tv/api/player?key=90503e3de26d45e455b55e9dc54f015b3d1d4150&link' \ + '=%s&srt=%s' % (url, sub) + data = httptools.downloadpage(new_url).data + data = re.sub(r'\\', "", data) + video_list.extend(servertools.find_video_items(data=data)) + + for video_url in video_list: + video_url.channel = item.channel + video_url.action = 'play' + video_url.title = item.title + '(%s) (%s)' % ('', video_url.server) + if video_url.language == '': + video_url.language = language + video_url.subtitle = sub + video_url.contentTitle = item.contentTitle + + else: + video_list.append(item.clone(title='%s [%s] [%s]', + url=url, + action='play', + quality=quality, + language=language, + subtitle=sub + )) + + return video_list + +def findvideos(item): + logger.info() + itemlist = [] + video_list = [] + data = httptools.downloadpage(item.url).data + data = re.sub(r'"|\n|\r|\t| |
    |\s{2,}', "", data) + patron_language ='(