diff --git a/plugin.video.alfa/channels/TXXX.py b/plugin.video.alfa/channels/TXXX.py index e68eac93..5755703b 100644 --- a/plugin.video.alfa/channels/TXXX.py +++ b/plugin.video.alfa/channels/TXXX.py @@ -2,7 +2,6 @@ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os, sys - from core import scrapertools from core import servertools from core.item import Item diff --git a/plugin.video.alfa/channels/porn300.py b/plugin.video.alfa/channels/porn300.py index 37f5970f..58566951 100644 --- a/plugin.video.alfa/channels/porn300.py +++ b/plugin.video.alfa/channels/porn300.py @@ -7,20 +7,18 @@ from core import scrapertools from core.item import Item from core import servertools from core import httptools -from core import tmdb -from core import jsontools host = 'https://www.porn300.com' def mainlist(item): logger.info() itemlist = [] - itemlist.append( Item(channel=item.channel, title="Nuevas" , action="peliculas", url=host + "/es/videos/")) - itemlist.append( Item(channel=item.channel, title="Mas Vistas" , action="peliculas", url=host + "/es/mas-vistos/")) - itemlist.append( Item(channel=item.channel, title="Mejor valorada" , action="peliculas", url=host + "/es/mas-votados/")) + itemlist.append( Item(channel=item.channel, title="Nuevas" , action="lista", url=host + "/es/videos/")) + itemlist.append( Item(channel=item.channel, title="Mas Vistas" , action="lista", url=host + "/es/mas-vistos/")) + itemlist.append( Item(channel=item.channel, title="Mejor valorada" , action="lista", url=host + "/es/mas-votados/")) itemlist.append( Item(channel=item.channel, title="Canal" , action="categorias", url=host + "/es/canales/")) - itemlist.append( Item(channel=item.channel, title="Pornstars" , action="catalogo", url=host + "/es/pornostars/?sort=views")) - itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host + "/es/categorias/?sort=videos")) + itemlist.append( Item(channel=item.channel, title="Pornstars" , action="categorias", url=host + "/es/pornostars/")) + itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host + "/es/categorias/")) itemlist.append( Item(channel=item.channel, title="Buscar", action="search")) return itemlist @@ -30,7 +28,7 @@ def search(item, texto): texto = texto.replace(" ", "+") item.url = host + "/es/buscar/?q=%s" % texto try: - return peliculas(item) + return lista(item) except: import sys for line in sys.exc_info(): @@ -38,63 +36,56 @@ def search(item, texto): return [] -def catalogo(item): - logger.info() - itemlist = [] - data = httptools.downloadpage(item.url).data - data = re.sub(r"\n|\r|\t| |
", "", data) - patron = '') - if next_page_url!="": - next_page_url = urlparse.urljoin(item.url,next_page_url) - itemlist.append( Item(channel=item.channel , action="catalogo" , title="Página Siguiente >>" , text_color="blue", url=next_page_url , folder=True) ) - return itemlist - - def categorias(item): logger.info() itemlist = [] data = httptools.downloadpage(item.url).data data = re.sub(r"\n|\r|\t| |
", "", data) - patron = '
.*?(.*?)' + patron = '.*?' + patron += '') patron = '
  • (.*?)' matches = re.compile(patron,re.DOTALL).findall(data) scrapertools.printMatches(matches) for scrapedurl,scrapedtitle in matches: scrapedplot = "" scrapedthumbnail = "" - itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle , url=scrapedurl , thumbnail=scrapedthumbnail , plot=scrapedplot , folder=True) ) + itemlist.append( Item(channel=item.channel, action="lista", title=scrapedtitle, url=scrapedurl, + thumbnail=scrapedthumbnail, plot=scrapedplot) ) return itemlist -def peliculas(item): +def lista(item): logger.info() itemlist = [] data = httptools.downloadpage(item.url).data @@ -66,11 +66,11 @@ def peliculas(item): title = scrapedtitle thumbnail = scrapedthumbnail plot = "" - year = "" - itemlist.append( Item(channel=item.channel, action="play" , title=title , url=scrapedurl, thumbnail=thumbnail, plot=plot, contentTitle=title, infoLabels={'year':year} )) - next_page_url = scrapertools.find_single_match(data,'
  • (.*?)') if scrapedhd == 'HD': @@ -90,7 +89,7 @@ def play(item): logger.info() itemlist = [] data = scrapertools.cachePage(item.url) - patron = '"defaultQuality":true,"format":"","quality":"\d+","videoUrl":"(.*?)"' + patron = '"defaultQuality":true,"format":"mp4","quality":"\d+","videoUrl":"(.*?)"' matches = re.compile(patron,re.DOTALL).findall(data) for scrapedurl in matches: url = scrapedurl.replace("\/", "/") diff --git a/plugin.video.alfa/channels/pornrewind.py b/plugin.video.alfa/channels/pornrewind.py index e9d659dc..d2ad196d 100644 --- a/plugin.video.alfa/channels/pornrewind.py +++ b/plugin.video.alfa/channels/pornrewind.py @@ -7,20 +7,15 @@ from core import scrapertools from core.item import Item from core import servertools from core import httptools -from core import tmdb -from core import jsontools - host = 'https://www.pornrewind.com' - def mainlist(item): logger.info() itemlist = [] - itemlist.append( Item(channel=item.channel, title="Nuevos" , action="peliculas", url=host + "/videos/?sort_by=post_date")) - itemlist.append( Item(channel=item.channel, title="Mejor valorados" , action="peliculas", url=host + "/videos/?sort_by=rating")) - itemlist.append( Item(channel=item.channel, title="Mas vistos" , action="peliculas", url=host + "/videos/?sort_by=video_viewed")) - + itemlist.append( Item(channel=item.channel, title="Nuevos" , action="lista", url=host + "/videos/?sort_by=post_date")) + itemlist.append( Item(channel=item.channel, title="Mejor valorados" , action="lista", url=host + "/videos/?sort_by=rating")) + itemlist.append( Item(channel=item.channel, title="Mas vistos" , action="lista", url=host + "/videos/?sort_by=video_viewed")) itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host + "/categories/")) itemlist.append( Item(channel=item.channel, title="Buscar", action="search")) return itemlist @@ -31,7 +26,7 @@ def search(item, texto): texto = texto.replace(" ", "+") item.url = host + "/search/%s/" % texto try: - return peliculas(item) + return lista(item) except: import sys for line in sys.exc_info(): @@ -49,11 +44,12 @@ def categorias(item): scrapertools.printMatches(matches) for scrapedurl,scrapedtitle,scrapedthumbnail in matches: scrapedplot = "" - itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle , url=scrapedurl , thumbnail=scrapedthumbnail , plot=scrapedplot , folder=True) ) + itemlist.append( Item(channel=item.channel, action="lista", title=scrapedtitle, url=scrapedurl, + thumbnail=scrapedthumbnail, plot=scrapedplot) ) return itemlist -def peliculas(item): +def lista(item): logger.info() itemlist = [] data = httptools.downloadpage(item.url).data @@ -66,11 +62,11 @@ def peliculas(item): title = "[COLOR yellow]" + scrapedtime + "[/COLOR] " + scrapedtitle thumbnail = scrapedthumbnail plot = "" - year = "" - itemlist.append( Item(channel=item.channel, action="findvideos" , title=title , url=url, thumbnail=thumbnail, plot=plot, contentTitle = title, infoLabels={'year':year} )) + itemlist.append( Item(channel=item.channel, action="findvideos", title=title, url=url, thumbnail=thumbnail, + plot=plot, contentTitle = title)) next_page = scrapertools.find_single_match(data, '
  • ') if next_page: next_page = urlparse.urljoin(item.url,next_page) - itemlist.append( Item(channel=item.channel, action="peliculas", title="Página Siguiente >>" , text_color="blue", url=next_page ) ) + itemlist.append(item.clone(action="lista", title="Página Siguiente >>", text_color="blue", url=next_page ) ) return itemlist diff --git a/plugin.video.alfa/channels/qwertty.py b/plugin.video.alfa/channels/qwertty.py index 8113ad60..d8e5651b 100644 --- a/plugin.video.alfa/channels/qwertty.py +++ b/plugin.video.alfa/channels/qwertty.py @@ -2,23 +2,21 @@ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os, sys -from core import jsontools as json from core import scrapertools from core import servertools from core.item import Item from platformcode import config, logger from core import httptools -from core import tmdb host = 'http://qwertty.net' def mainlist(item): logger.info() itemlist = [] - itemlist.append( Item(channel=item.channel, title="Recientes" , action="peliculas", url=host)) - itemlist.append( Item(channel=item.channel, title="Mas Vistas" , action="peliculas", url=host + "/?filter=most-viewed")) - itemlist.append( Item(channel=item.channel, title="Mas popular" , action="peliculas", url=host + "/?filter=popular")) - itemlist.append( Item(channel=item.channel, title="Mejor valoradas" , action="peliculas", url=host + "/?filter=random")) + itemlist.append( Item(channel=item.channel, title="Recientes" , action="lista", url=host)) + itemlist.append( Item(channel=item.channel, title="Mas Vistas" , action="lista", url=host + "/?filter=most-viewed")) + itemlist.append( Item(channel=item.channel, title="Mas popular" , action="lista", url=host + "/?filter=popular")) + itemlist.append( Item(channel=item.channel, title="Mejor valoradas" , action="lista", url=host + "/?filter=random")) itemlist.append( Item(channel=item.channel, title="Buscar", action="search")) return itemlist @@ -28,7 +26,7 @@ def search(item, texto): texto = texto.replace(" ", "+") item.url = host + "/?s=%s" % texto try: - return peliculas(item) + return lista(item) except: import sys for line in sys.exc_info(): @@ -46,28 +44,33 @@ def categorias(item): scrapedplot = "" scrapedthumbnail = "" scrapedurl = host + scrapedurl - itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle , url=scrapedurl , thumbnail=scrapedthumbnail , plot=scrapedplot , folder=True) ) + itemlist.append( Item(channel=item.channel, action="lista", title=scrapedtitle, url=scrapedurl, + thumbnail=scrapedthumbnail, plot=scrapedplot) ) return itemlist -def peliculas(item): +def lista(item): logger.info() itemlist = [] data = httptools.downloadpage(item.url).data + data = scrapertools.get_match(data,'
    (.*?)
    ') data = re.sub(r"\n|\r|\t| |
    ", "", data) - patron = '
    .*?([^<]+)' + patron = '
    Next') - if next_page_url=="": - next_page_url = scrapertools.find_single_match(data,'
  • .*?
  • ') - - if next_page_url!="": - next_page_url = urlparse.urljoin(item.url,next_page_url) - itemlist.append( Item(channel=item.channel , action="peliculas" , title="Página Siguiente >>" , text_color="blue", url=next_page_url , folder=True) ) + itemlist.append( Item(channel=item.channel, action="play", title=title, url=scrapedurl, + thumbnail=scrapedthumbnail, plot=scrapedplot) ) + next_page = scrapertools.find_single_match(data,'
  • Next') + if next_page=="": + next_page = scrapertools.find_single_match(data,'
  • .*?
  • ') + if next_page!="": + next_page = urlparse.urljoin(item.url,next_page) + itemlist.append(item.clone(action="lista", title="Página Siguiente >>", text_color="blue", url=next_page) ) return itemlist @@ -75,13 +78,54 @@ def play(item): logger.info() itemlist = [] data = scrapertools.cachePage(item.url) - pornhub = scrapertools.find_single_match(data,'