From 9ddc0c7eec4fea6cb1fabb393fd58c932d7da116 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Fri, 15 Dec 2017 14:50:33 -0500 Subject: [PATCH] ohlatino: pagina no existe --- plugin.video.alfa/channels/ohlatino.py | 206 ------------------------- 1 file changed, 206 deletions(-) delete mode 100644 plugin.video.alfa/channels/ohlatino.py diff --git a/plugin.video.alfa/channels/ohlatino.py b/plugin.video.alfa/channels/ohlatino.py deleted file mode 100644 index 11a08812..00000000 --- a/plugin.video.alfa/channels/ohlatino.py +++ /dev/null @@ -1,206 +0,0 @@ -# -*- coding: utf-8 -*- -# -*- Channel OH!Latino -*- -# -*- Created for Alfa-addon -*- -# -*- By the Alfa Develop Group -*- - -import re - -from channelselector import get_thumb -from core import httptools -from core import scrapertools -from core import servertools -from core import tmdb -from core.item import Item -from platformcode import config, logger - -host = 'http://www.ohpeliculas.com' - -def mainlist(item): - logger.info() - itemlist = [] - data = httptools.downloadpage(host).data - patron = '
  • (.*?)<\/a> (\d+)<\/i>' - matches = scrapertools.find_multiple_matches(data, patron) - mcantidad = 0 - for scrapedurl, scrapedtitle, cantidad in matches: - mcantidad += int(cantidad) - - itemlist.append( - item.clone(title="Peliculas", - action='movies_menu' - )) - - itemlist.append( - item.clone(title="Buscar", - action="search", - url=host+'?s=', - )) - - return itemlist - - -def movies_menu(item): - logger.info() - - itemlist = [] - - itemlist.append( - item.clone(title="Todas", - action="list_all", - url=host - )) - - itemlist.append( - item.clone(title="Generos", - action="section", - url=host, extra='genres')) - - itemlist.append( - item.clone(title="Por año", - action="section", - url=host, extra='byyear' - )) - - 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 = [] - data = get_source(item.url) - patron = '
  • (.*?)<\/a>' - elif item.extra == 'byyear': - patron = '(\d{4})<\/a><\/li>' - matches = re.compile(patron, re.DOTALL).findall(data) - - for scrapedurl, scrapedtitle in matches: - title = scrapedtitle - url = scrapedurl - if url not in duplicated: - itemlist.append(Item(channel=item.channel, - action='list_all', - title=title, - url=url - )) - duplicated.append(url) - return itemlist - - -def search(item, texto): - logger.info() - texto = texto.replace(" ", "+") - item.url = item.url + texto - if texto != '': - return list_all(item) - - -def findvideos(item): - logger.info() - itemlist = [] - data = httptools.downloadpage(item.url).data - itemlist.extend(servertools.find_video_items(data=data)) - for videoitem in itemlist: - videoitem.channel = item.channel - videoitem.contentTitle = item.fulltitle - videoitem.infoLabels = item.infoLabels - if videoitem.server != 'youtube': - videoitem.title = item.title + ' (%s)' % videoitem.server - else: - videoitem.title = 'Trailer en %s' % videoitem.server - videoitem.action = 'play' - videoitem.server = "" - - 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", - )) - tmdb.set_infoLabels(itemlist, True) - itemlist = servertools.get_servers_itemlist(itemlist) - return itemlist - - -def newest(categoria): - logger.info() - item = Item() - try: - if categoria in ['peliculas','latino']: - item.url = host + '/release/2017/' - - elif categoria == 'infantiles': - item.url = host + '/genero/infantil/' - - itemlist = list_all(item) - if itemlist[-1].title == '>> Página siguiente': - itemlist.pop() - except: - import sys - for line in sys.exc_info(): - logger.error("%s" % line) - return [] - - return itemlist - -def play(item): - logger.info() - item.thumbnail = item.contentThumbnail - return [item]