diff --git a/cuevana3.json b/cuevana3.json new file mode 100644 index 00000000..97c0d751 --- /dev/null +++ b/cuevana3.json @@ -0,0 +1,69 @@ +{ + "id": "cuevana3", + "name": "Cuevana 3", + "active": true, + "adult": false, + "language": ["lat", "cast"], + "thumbnail": "https://www.cuevana3.co/wp-content/themes/cuevana3/public/img/cnt/cuevana3.png", + "banner": "", + "version": 1, + "categories": [ + "movie" + ], + "settings": [ + { + "id": "include_in_global_search", + "type": "bool", + "label": "Incluir en busqueda global", + "default": false, + "enabled": false, + "visible": false + }, + { + "id": "filter_languages", + "type": "list", + "label": "Mostrar enlaces en idioma...", + "default": 0, + "enabled": true, + "visible": true, + "lvalues": [ + "No filtrar", + "LAT", + "CAST", + "VOSE" + ] + }, + { + "id": "include_in_newest_peliculas", + "type": "bool", + "label": "Incluir en Novedades - Peliculas", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "include_in_newest_infantiles", + "type": "bool", + "label": "Incluir en Novedades - Infantiles", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "include_in_newest_terror", + "type": "bool", + "label": "Incluir en Novedades - Terror", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "include_in_newest_documentales", + "type": "bool", + "label": "Incluir en Novedades - Documentales", + "default": true, + "enabled": true, + "visible": true + } + ] +} diff --git a/plugin.video.alfa/channels/cuevana3.py b/plugin.video.alfa/channels/cuevana3.py index 9c4d64b3..4882c812 100644 --- a/plugin.video.alfa/channels/cuevana3.py +++ b/plugin.video.alfa/channels/cuevana3.py @@ -31,23 +31,29 @@ def mainlist(item): itemlist = list() - itemlist.append(Item(channel=item.channel, title="Ultimas", action="list_all", url=host, - thumbnail=get_thumb('last', auto=True))) + itemlist.append(Item(channel=item.channel, title="Todas", action="list_all", url=host+'peliculas', + thumbnail=get_thumb('all', auto=True))) + itemlist.append(Item(channel=item.channel, title="Estrenos", action="list_all", url=host+'estrenos', + thumbnail=get_thumb('premieres', auto=True))) + itemlist.append(Item(channel=item.channel, title="Mas vistas", action="list_all", url=host+'peliculas-mas-vistas', + thumbnail=get_thumb('more watched', auto=True))) + itemlist.append(Item(channel=item.channel, title="Mas votadas", action="list_all", url=host+'peliculas-mas-valoradas', + thumbnail=get_thumb('more voted', auto=True))) itemlist.append(Item(channel=item.channel, title="Generos", action="section", section='genre', thumbnail=get_thumb('genres', auto=True))) - itemlist.append(Item(channel=item.channel, title="Castellano", action="list_all", url= host+'espanol', - thumbnail=get_thumb('audio', auto=True))) - - itemlist.append(Item(channel=item.channel, title="Latino", action="list_all", url=host + 'latino', - thumbnail=get_thumb('audio', auto=True))) - - itemlist.append(Item(channel=item.channel, title="VOSE", action="list_all", url=host + 'subtitulado', - thumbnail=get_thumb('audio', auto=True))) - - itemlist.append(Item(channel=item.channel, title="Alfabetico", action="section", section='alpha', - thumbnail=get_thumb('alphabet', auto=True))) + # itemlist.append(Item(channel=item.channel, title="Castellano", action="list_all", url= host+'espanol', + # thumbnail=get_thumb('audio', auto=True))) + # + # itemlist.append(Item(channel=item.channel, title="Latino", action="list_all", url=host + 'latino', + # thumbnail=get_thumb('audio', auto=True))) + # + # itemlist.append(Item(channel=item.channel, title="VOSE", action="list_all", url=host + 'subtitulado', + # thumbnail=get_thumb('audio', auto=True))) + # + # itemlist.append(Item(channel=item.channel, title="Alfabetico", action="section", section='alpha', + # thumbnail=get_thumb('alphabet', auto=True))) itemlist.append(Item(channel=item.channel, title="Buscar", action="search", url=host+'?s=', thumbnail=get_thumb('search', auto=True))) @@ -69,17 +75,16 @@ def list_all(item): itemlist = [] try: - data = get_source(item.url) - if item.section == 'alpha': - patron = '\d+.*?<\/i> (.*?)<\/a>' - matches = matches = re.compile(patron, re.DOTALL).findall(data) + matches = re.compile(patron, re.DOTALL).findall(data) infoLabels = item.infoLabels for url, episode in matches: episodenumber = re.sub('C.* ','',episode) @@ -354,7 +355,7 @@ def get_links_by_language(item, data): video_list = [] language = scrapertools.find_single_match(data, 'ul id="level\d_([^"]+)"\s*class=') - patron = 'data-source="([^"]+)"data-quality="([^"]+)"data-srt="([^"]+)"' + patron = 'data-source="([^"]+)"data-quality="([^"]+)"data-srt="([^"]+)?"' matches = re.compile(patron, re.DOTALL).findall(data) if language in IDIOMAS: language = IDIOMAS[language] @@ -399,7 +400,6 @@ def findvideos(item): new_url = base_url.replace('/serie/', '/player/serie/') new_url += '|%s|%s/' % (item.contentSeason, item.contentEpisodeNumber) data = get_source(new_url, referer=item.url) - patron_language ='(