From 7f6f22c79d211e0d83db67399b623ece1992aad0 Mon Sep 17 00:00:00 2001 From: alfa-addon Date: Sat, 12 Aug 2017 19:19:46 -0400 Subject: [PATCH] nuevos canales - tvseriesdk y ver-peliculas --- plugin.video.alfa/channels/tvseriesdk.json | 40 +++ plugin.video.alfa/channels/tvseriesdk.py | 204 +++++++++++++++ plugin.video.alfa/channels/ver-peliculas.json | 15 ++ plugin.video.alfa/channels/ver-peliculas.py | 242 ++++++++++++++++++ 4 files changed, 501 insertions(+) create mode 100644 plugin.video.alfa/channels/tvseriesdk.json create mode 100644 plugin.video.alfa/channels/tvseriesdk.py create mode 100644 plugin.video.alfa/channels/ver-peliculas.json create mode 100644 plugin.video.alfa/channels/ver-peliculas.py diff --git a/plugin.video.alfa/channels/tvseriesdk.json b/plugin.video.alfa/channels/tvseriesdk.json new file mode 100644 index 00000000..142994b6 --- /dev/null +++ b/plugin.video.alfa/channels/tvseriesdk.json @@ -0,0 +1,40 @@ +{ + "id": "tvseriesdk", + "name": "TVSeriesdk", + "active": true, + "adult": false, + "language": "es", + "thumbnail": "https://s13.postimg.org/jrvqmqfnb/tvseriesdk.png", + "banner": "https://s16.postimg.org/r6mbel0f9/tvseriesdk-banner.png", + "version": 1, + "categories": [ + "latino", + "tvshow" + ], + "settings": [ + { + "id": "include_in_global_search", + "type": "bool", + "label": "Incluir en busqueda global", + "default": false, + "enabled": false, + "visible": false + }, + { + "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 + } + ] +} \ No newline at end of file diff --git a/plugin.video.alfa/channels/tvseriesdk.py b/plugin.video.alfa/channels/tvseriesdk.py new file mode 100644 index 00000000..eb577489 --- /dev/null +++ b/plugin.video.alfa/channels/tvseriesdk.py @@ -0,0 +1,204 @@ +# -*- coding: utf-8 -*- +# -*- Channel TVSeriesdk -*- +# -*- Created for Alfa-addon -*- +# -*- By the Alfa Develop Group -*- + +import re +from core import logger +from core 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://www.tvseriesdk.com/' + +def mainlist(item): + logger.info() + + itemlist = [] + + itemlist.append(item.clone(title="Ultimos", + action="last_episodes", + url=host + )) + + itemlist.append(item.clone(title="Todas", + action="list_all", + url = host + )) + + itemlist.append(item.clone(title="Buscar", + action="search", + url='http://www.tvseriesdk.com/index.php?s=' + )) + + 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 () + global i + itemlist = [] + templist =[] + data = get_source(item.url) + + patron = '
  • (.*?)<\/a>' + matches = re.compile(patron, re.DOTALL).findall(data) + + if len(matches) > 10: + if item.next_page != 10: + url_next_page = item.url + matches = matches[:10] + next_page = 10 + item.i = 0 + else: + patron = matches[item.i:][:10] + next_page = 10 + + url_next_page = item.url + + + + for scrapedurl, scrapedplot, scrapedtitle in matches: + url = scrapedurl + plot= scrapedplot + contentSerieName=scrapedtitle + title = contentSerieName + thumbnail='' + + templist.append(item.clone(action='episodes', + title=title, + url=url, + thumbnail='', + plot=plot, + contentErieName = contentSerieName + )) + itemlist = get_thumb(templist) + ## Paginación + if url_next_page: + itemlist.append(item.clone(title="Siguiente >>", + url=url_next_page, + next_page=next_page, + i=item.i + )) + return itemlist + +def last_episodes (item): + logger.info () + itemlist = [] + data = get_source(item.url) + patron = '
    .*?
+    matches = re.compile(patron, re.DOTALL).findall(data)
+
+    for scrapedurl, scrapedtitle, scrapedthumbnail in matches:
+        url = scrapedurl
+        title = scrapedtitle
+        thumbnail = scrapedthumbnail
+
+        itemlist.append(item.clone(action=)
+    return itemlist
+
+def search_list(item):
+    logger.info()
+    itemlist =[]
+
+    data= get_source(item.url)
+    patron = (.*?)<\/a>' + matches = re.compile(patron, re.DOTALL).findall(data) + + for scrapedthumb, scrapedurl, scrapedtitle in matches: + title = scrapedtitle + url = scrapedurl + thumbnail = scrapedthumb + itemlist.append(item.clone(title=title, + url=url, + thumbnail=thumbnail, + action='findvideos' + )) + #Pagination < link + next_page = scrapertools.find_single_match(data, '') + if next_page: + itemlist.append(Item(channel=item.channel, action="search_list", title='>> Pagina Siguiente', url=next_page, + thumbnail=config.get_thumb("thumb_next.png"))) + + return itemlist + + +def search(item, texto): + logger.info() + texto = texto.replace(" ", "+") + item.url = item.url + texto + + if texto != '': + return search_list(item) + else: + return [] + +def findvideos(item): + logger.info() + itemlist=[] + servers = {'netu':'http://hqq.tv/player/embed_player.php?vid=', + 'open':'https://openload.co/embed/', + 'netv':'http://goo.gl/', + 'gamo':'http://gamovideo.com/embed-', + 'powvideo':'http://powvideo.net/embed-', + 'play':'http://streamplay.to/embed-', + 'vido':'http://vidoza.net/embed-'} + data = get_source(item.url) + patron = 'id=tab\d+.*?class=tab_content>