diff --git a/plugin.video.alfa/channels/vernovelasonline.json b/plugin.video.alfa/channels/vernovelasonline.json new file mode 100644 index 00000000..397251ac --- /dev/null +++ b/plugin.video.alfa/channels/vernovelasonline.json @@ -0,0 +1,30 @@ +{ + "id": "vernovelasonline", + "name": "Ver Novelas Online", + "active": true, + "adult": false, + "language": "es", + "thumbnail": "https://s16.postimg.org/g4lzydrmd/vernovelasonline1.png", + "bannermenu": "https://s16.postimg.org/w44nhxno5/vernovelasonline2.png", + "version": 1, + "changes": [ + { + "date": "28/06/2017", + "description": "Primera version" + } + ], + "categories": [ + "serie", + "latino" + ], + "settings": [ + { + "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/vernovelasonline.py b/plugin.video.alfa/channels/vernovelasonline.py new file mode 100644 index 00000000..8797694d --- /dev/null +++ b/plugin.video.alfa/channels/vernovelasonline.py @@ -0,0 +1,216 @@ +# -*- coding: utf-8 -*- + +from core import httptools +from core import logger +from core import scrapertools +from core import servertools +from core.item import Item + +host = "http://ver-novelas-online.com/" + +def mainlist(item): + logger.info() + itemlist = [] + itemlist.append(Item(channel = item.channel, title = "Ultimos capitulos subidos", action = "capitulos_ultimos", url = host)) + itemlist.append(Item(channel = item.channel, title = "Novelas por letra", action = "novelas_letra", url = host + "video/category/letra-" )) + itemlist.append(Item(channel = item.channel, title = "Novelas en emision (Sin caratulas)", action = "novelas_emision", url = host)) + itemlist.append(Item(channel = item.channel, title = "")) + itemlist.append(Item(channel = item.channel, title = "Buscar novela", action = "search", url = host + "?s=")) + return itemlist + +def newest(categoria): + logger.info() + itemlist = [] + item = Item() + try: + item.channel = "vernovelasonline" + item.extra = "newest" + item.url = "http://www.ver-novelas-online.com/" + item.action = "capitulos_ultimos" + itemlist = capitulos_ultimos(item) + # Se captura la excepcion, para no interrumpir al canal novedades si un canal falla + except: + import sys + for line in sys.exc_info(): + logger.error("{0}".format(line)) + return [] + + return itemlist + + +def novelas_emision(item): + logger.info() + itemlist = [] + data = httptools.downloadpage(item.url).data + data = data.replace("\n","") + block = scrapertools.find_single_match(data, '