diff --git a/plugin.video.alfa/channels/torrentlocura.py b/plugin.video.alfa/channels/torrentlocura.py index 2a2f5f02..ba8ebbfd 100755 --- a/plugin.video.alfa/channels/torrentlocura.py +++ b/plugin.video.alfa/channels/torrentlocura.py @@ -1,10 +1,15 @@ # -*- coding: utf-8 -*- import re +import urllib +import urlparse + + from channelselector import get_thumb from core import httptools from core import scrapertools +from core import servertools from core.item import Item from platformcode import logger @@ -362,3 +367,100 @@ def episodios(item): return sorted(itemlist, key=lambda it: (int(it.contentSeason), int(it.contentEpisodeNumber))) return itemlist + +def findvideos(item): + logger.info() + itemlist = [] + + # Descarga la pagina + data = httptools.downloadpage(item.url).data + item.plot = scrapertools.find_single_match(data, '
(.*?)
') + item.plot = scrapertools.htmlclean(item.plot).strip() + item.contentPlot = item.plot + + link = scrapertools.find_single_match(data, 'href.*?=.*?"http:\/\/(?:tumejorserie|tumejorjuego).*?link=([^"]+)"') + if link != "": + link = host + link + logger.info("torrent=" + link) + itemlist.append( + Item(channel=item.channel, action="play", server="torrent", title="VĂ­deo en torrent", fulltitle=item.title, + url=link, thumbnail=servertools.guess_server_thumbnail("torrent"), plot=item.plot, folder=False, + parentContent=item)) + + patron = '
([^<]+)<\/div[^<]+
([^<]+)' + patron += '<\/div[^<]+
([^<]+)<\/div[^<]+