From 9441dd356522aace4f6a7743d95d0b11c15981ce Mon Sep 17 00:00:00 2001 From: devalls <30657322+devalls@users.noreply.github.com> Date: Wed, 2 Aug 2017 14:32:48 +0200 Subject: [PATCH 1/2] Add files via upload --- plugin.video.alfa/channels/elitetorrent.json | 31 ++++++ plugin.video.alfa/channels/elitetorrent.py | 107 +++++++++++++++++++ 2 files changed, 138 insertions(+) create mode 100644 plugin.video.alfa/channels/elitetorrent.json create mode 100644 plugin.video.alfa/channels/elitetorrent.py diff --git a/plugin.video.alfa/channels/elitetorrent.json b/plugin.video.alfa/channels/elitetorrent.json new file mode 100644 index 00000000..e83c344c --- /dev/null +++ b/plugin.video.alfa/channels/elitetorrent.json @@ -0,0 +1,31 @@ +{ + "id": "elitetorrent", + "name": "Elite Torrent", + "active": true, + "adult": false, + "language": "es", + "thumbnail": "elitetorrent.png", + "banner": "elitetorrent.png", + "version": 2, + "changes": [ + { + "date": "2/08/2017", + "description": "cambiado código url canal" + }, + { + "date": "15/03/2017", + "description": "limpieza código" + }, + { + "date": "01/07/2016", + "description": "Eliminado código innecesario." + } + ], + "categories": [ + "torrent", + "movie", + "tvshow", + "documentary", + "vos" + ] +} diff --git a/plugin.video.alfa/channels/elitetorrent.py b/plugin.video.alfa/channels/elitetorrent.py new file mode 100644 index 00000000..f6614f91 --- /dev/null +++ b/plugin.video.alfa/channels/elitetorrent.py @@ -0,0 +1,107 @@ +# -*- coding: utf-8 -*- + +import re +import urlparse + +from core import logger +from core import scrapertools +from core.item import Item + +BASE_URL = 'http://www.elitetorrent.wesconference.net' + + +def mainlist(item): + logger.info() + + itemlist = [] + itemlist.append(Item(channel=item.channel, title="Docus y TV", action="peliculas", + url="http://www.elitetorrent.wesconference.net/categoria/6/docus-y-tv/modo:mini", + viewmode="movie_with_plot")) + itemlist.append(Item(channel=item.channel, title="Estrenos", action="peliculas", + url="http://www.elitetorrent.wesconference.net/categoria/1/estrenos/modo:mini", viewmode="movie_with_plot")) + itemlist.append(Item(channel=item.channel, title="Películas", action="peliculas", + url="http://www.elitetorrent.wesconference.net/categoria/2/peliculas/modo:mini", viewmode="movie_with_plot")) + itemlist.append(Item(channel=item.channel, title="Peliculas HDRip", action="peliculas", + url="http://www.elitetorrent.wesconference.net/categoria/13/peliculas-hdrip/modo:mini", + viewmode="movie_with_plot")) + itemlist.append(Item(channel=item.channel, title="Peliculas MicroHD", action="peliculas", + url="http://www.elitetorrent.wesconference.net/categoria/17/peliculas-microhd/modo:mini", + viewmode="movie_with_plot")) + itemlist.append(Item(channel=item.channel, title="Peliculas VOSE", action="peliculas", + url="http://www.elitetorrent.wesconference.net/categoria/14/peliculas-vose/modo:mini", + viewmode="movie_with_plot")) + itemlist.append(Item(channel=item.channel, title="Series", action="peliculas", + url="http://www.elitetorrent.wesconference.net/categoria/4/series/modo:mini", viewmode="movie_with_plot")) + itemlist.append(Item(channel=item.channel, title="Series VOSE", action="peliculas", + url="http://www.elitetorrent.wesconference.net/categoria/16/series-vose/modo:mini", + viewmode="movie_with_plot")) + + return itemlist + + +def peliculas(item): + logger.info() + itemlist = [] + + # Descarga la página + data = scrapertools.cache_page(item.url) + if "http://www.bajui.com/redi.php" in data: + data = scrapertools.cache_page(item.url) + + ''' +
  • + IMG: Mandela (microHD - 720p) +
    + Mandela (microHD - 720p) + Peliculas microHD + Hace 2 sem + Título: Mandela: Del mito al hombre
    + ''' + patron = '' + patron += ']+>' + patron += '.*?(.*?)' + + matches = re.compile(patron, re.DOTALL).findall(data) + scrapertools.printMatches(matches) + + for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedplot in matches: + title = scrapedtitle.strip() + url = urlparse.urljoin(BASE_URL, scrapedurl) + thumbnail = urlparse.urljoin(BASE_URL, scrapedthumbnail) + plot = re.sub('<[^<]+?>', '', scrapedplot) + logger.debug("title=[" + title + "], url=[" + url + "], thumbnail=[" + thumbnail + "]") + itemlist.append(Item(channel=item.channel, action="play", title=title, url=url, thumbnail=thumbnail, plot=plot, + folder=False)) + + # Extrae el paginador + patronvideos = 'Siguiente \»\;' + matches = re.compile(patronvideos, re.DOTALL).findall(data) + scrapertools.printMatches(matches) + + if len(matches) > 0: + scrapedurl = urlparse.urljoin(item.url, matches[0]) + itemlist.append( + Item(channel=item.channel, action="peliculas", title="Página siguiente >>", url=scrapedurl, folder=True, + viewmode="movie_with_plot")) + + return itemlist + + +def play(item): + logger.info() + itemlist = [] + + data = scrapertools.cache_page(item.url) + if "http://www.bajui.com/redi.php" in data: + data = scrapertools.cache_page(item.url) + + # Descargar por magnet link + link = scrapertools.get_match(data, + ' Date: Wed, 2 Aug 2017 16:49:37 +0200 Subject: [PATCH 2/2] Update elitetorrent.json --- plugin.video.alfa/channels/elitetorrent.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.video.alfa/channels/elitetorrent.json b/plugin.video.alfa/channels/elitetorrent.json index e83c344c..5287e4f4 100644 --- a/plugin.video.alfa/channels/elitetorrent.json +++ b/plugin.video.alfa/channels/elitetorrent.json @@ -10,7 +10,7 @@ "changes": [ { "date": "2/08/2017", - "description": "cambiado código url canal" + "description": "arreglada url canal" }, { "date": "15/03/2017",