diff --git a/plugin.video.alfa/channels/playpornx.py b/plugin.video.alfa/channels/playpornx.py
index 91d726f3..20b0ce97 100644
--- a/plugin.video.alfa/channels/playpornx.py
+++ b/plugin.video.alfa/channels/playpornx.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
import re
+import urlparse
from core import httptools
from core import scrapertools
@@ -12,10 +13,12 @@ host = "https://watchfreexxx.net/"
def mainlist(item):
itemlist = []
- itemlist.append(Item(channel=item.channel, title="Todas", action="lista",
- thumbnail='https://s18.postimg.cc/fwvaeo6qh/todas.png',
- fanart='https://s18.postimg.cc/fwvaeo6qh/todas.png',
- url =host))
+
+ itemlist.append(Item(channel=item.channel, title="Peliculas", action="lista",
+ url = urlparse.urljoin(host, "category/porn-movies/")))
+
+ itemlist.append(Item(channel=item.channel, title="Escenas", action="lista",
+ url = urlparse.urljoin(host, "category/xxx-scenes/")))
itemlist.append(Item(channel=item.channel, title="Buscar", action="search", url=host+'?s=',
thumbnail='https://s30.postimg.cc/pei7txpa9/buscar.png',
@@ -29,34 +32,27 @@ def lista(item):
itemlist = []
if item.url == '': item.url = host
+
data = httptools.downloadpage(item.url).data
- data = re.sub(r'"|\n|\r|\t| |
|\s{2,}', "", data)
- if item.extra != 'Buscar':
- patron = '
.*?href=(.*?)>
|\s{2,}', "", data)
+
+ patron = '')
+ next_page = scrapertools.find_single_match(data, 'Next')
if next_page != '':
itemlist.append(Item(channel=item.channel, action="lista", title='Siguiente >>>', url=next_page,
thumbnail='https://s16.postimg.cc/9okdu7hhx/siguiente.png', extra=item.extra))
+
return itemlist
diff --git a/plugin.video.alfa/channels/xhamster.py b/plugin.video.alfa/channels/xhamster.py
index b65f8feb..afa45db4 100755
--- a/plugin.video.alfa/channels/xhamster.py
+++ b/plugin.video.alfa/channels/xhamster.py
@@ -1,29 +1,32 @@
# -*- coding: utf-8 -*-
import re
+import sys
+import urlparse
+from platformcode import logger
from core import scrapertools
from core.item import Item
-from platformcode import logger
+HOST = "http://es.xhamster.com/"
def mainlist(item):
logger.info()
+
itemlist = []
- itemlist.append(Item(channel=item.channel, action="videos", title="Útimos vídeos", url="http://es.xhamster.com/",
- viewmode="movie"))
- itemlist.append(Item(channel=item.channel, action="categorias", title="Categorías"))
- itemlist.append(Item(channel=item.channel, action="votados", title="Más votados"))
- itemlist.append(Item(channel=item.channel, action="search", title="Buscar",
- url="http://xhamster.com/search.php?q=%s&qcat=video"))
+ itemlist.append( Item(channel=item.channel, action="videos" , title="Útimos videos" , url=HOST, viewmode="movie"))
+ itemlist.append( Item(channel=item.channel, action="categorias" , title="Categorías", url=HOST))
+ itemlist.append( Item(channel=item.channel, action="votados" , title="Lo mejor"))
+ itemlist.append( Item(channel=item.channel, action="vistos" , title="Los mas vistos"))
+ itemlist.append( Item(channel=item.channel, action="videos" , title="Recomendados", url=urlparse.urljoin(HOST,"/videos/recommended")))
+ itemlist.append( Item(channel=item.channel, action="search" , title="Buscar", url=urlparse.urljoin(HOST,"/search?q=%s")))
+
return itemlist
-
# REALMENTE PASA LA DIRECCION DE BUSQUEDA
-
-def search(item, texto):
+def search(item,texto):
logger.info()
- tecleado = texto.replace(" ", "+")
+ tecleado = texto.replace( " ", "+" )
item.url = item.url % tecleado
item.extra = "buscar"
try:
@@ -34,8 +37,6 @@ def search(item, texto):
for line in sys.exc_info():
logger.error("%s" % line)
return []
-
-
# SECCION ENCARGADA DE BUSCAR
def videos(item):
@@ -43,93 +44,66 @@ def videos(item):
data = scrapertools.cache_page(item.url)
itemlist = []
- data = scrapertools.get_match(data, '(.*?)