([^"]+)'
matches = re.compile(patron,re.DOTALL).findall(data)
for scrapedurl,scrapedthumbnail,scrapedtitle,duracion in matches:
url = urlparse.urljoin(item.url,scrapedurl)
@@ -66,21 +71,23 @@ def peliculas(item):
thumbnail = "https:" + scrapedthumbnail
plot = ""
year = ""
- itemlist.append( Item(channel=item.channel, action="play" , title=title , url=url, thumbnail=thumbnail, plot=plot, contentTitle = title, infoLabels={'year':year} ))
+ itemlist.append( Item(channel=item.channel, action="play", title=title, url=url, thumbnail=thumbnail,
+ plot=plot, contentTitle = title, infoLabels={'year':year} ))
next_page_url = scrapertools.find_single_match(data,'Next')
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="peliculas", title="Página Siguiente >>", text_color="blue",
+ url=next_page_url) )
return itemlist
def play(item):
logger.info()
itemlist = []
- data = scrapertools.cachePage(item.url)
+ data = httptools.downloadpage(item.url).data
patron = '
'
matches = scrapertools.find_multiple_matches(data, patron)
for scrapedurl in matches:
- itemlist.append(Item(channel=item.channel, action="play", title=item.title, url=scrapedurl, folder=True))
+ itemlist.append(Item(channel=item.channel, action="play", title=item.title, url=scrapedurl))
return itemlist
diff --git a/plugin.video.alfa/channels/camwhoresbay.py b/plugin.video.alfa/channels/camwhoresbay.py
index 2a58733f..b4197f0d 100644
--- a/plugin.video.alfa/channels/camwhoresbay.py
+++ b/plugin.video.alfa/channels/camwhoresbay.py
@@ -13,6 +13,7 @@ from core import jsontools
host = 'https://www.camwhoresbay.com'
+# EN CATALOGO Y BUSQUEDA LA PAGINACION FUNCIONA CON UN AJAX
def mainlist(item):
logger.info()
@@ -20,7 +21,6 @@ def mainlist(item):
itemlist.append( Item(channel=item.channel, title="Nuevos" , action="peliculas", url=host + "/latest-updates/"))
itemlist.append( Item(channel=item.channel, title="Mejor valorados" , action="peliculas", url=host + "/top-rated/"))
itemlist.append( Item(channel=item.channel, title="Mas vistos" , action="peliculas", url=host + "/most-popular/"))
-
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
@@ -51,7 +51,8 @@ def categorias(item):
for scrapedurl,scrapedtitle,scrapedthumbnail,cantidad in matches:
scrapedtitle = scrapedtitle + " (" + cantidad + ")"
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="peliculas", title=scrapedtitle, url=scrapedurl,
+ thumbnail=scrapedthumbnail, plot=scrapedplot) )
return itemlist
@@ -70,11 +71,13 @@ def peliculas(item):
thumbnail = scrapedthumbnail
plot = ""
year = ""
- itemlist.append( Item(channel=item.channel, action="play" , title=title , url=url, thumbnail=thumbnail, plot=plot, contentTitle = title, infoLabels={'year':year} ))
+ itemlist.append( Item(channel=item.channel, action="play", title=title, url=url, thumbnail=thumbnail, plot=plot,
+ contentTitle = title, infoLabels={'year':year} ))
next_page = 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="catalogo" , title="Página Siguiente >>" , text_color="blue", url=next_page_url , folder=True) )
+ itemlist.append( Item(channel=item.channel, action="catalogo", title="Página Siguiente >>", text_color="blue",
+ url=next_page_url) )
return itemlist
@@ -66,14 +68,15 @@ def categorias(item):
scrapedplot = ""
scrapedtitle = scrapedtitle
scrapedurl = urlparse.urljoin(item.url,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="peliculas", title=scrapedtitle, url=scrapedurl,
+ thumbnail=scrapedthumbnail, plot=scrapedplot) )
return itemlist
def peliculas(item):
logger.info()
itemlist = []
- data = scrapertools.cachePage(item.url)
+ data = httptools.downloadpage(item.url).data
data = re.sub(r"\n|\r|\t| |
", "", data)
patron = '
(.*?) .*?