diff --git a/plugin.video.alfa/channels/camwhoresbay.json b/plugin.video.alfa/channels/camwhoresbay.json new file mode 100644 index 00000000..f57213ca --- /dev/null +++ b/plugin.video.alfa/channels/camwhoresbay.json @@ -0,0 +1,15 @@ +{ + "id": "camwhoresbay", + "name": "camwhoresbay", + "active": true, + "adult": true, + "language": ["*"], + "thumbnail": "https://www.camwhoresbay.com/images/porntrex.ico", + "banner": "", + "categories": [ + "adult" + ], + "settings": [ + ] +} + diff --git a/plugin.video.alfa/channels/camwhoresbay.py b/plugin.video.alfa/channels/camwhoresbay.py new file mode 100644 index 00000000..2a58733f --- /dev/null +++ b/plugin.video.alfa/channels/camwhoresbay.py @@ -0,0 +1,97 @@ +# -*- coding: utf-8 -*- +#------------------------------------------------------------ +import urlparse,urllib2,urllib,re +import os, sys +from platformcode import config, logger +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.camwhoresbay.com' + + +def mainlist(item): + logger.info() + itemlist = [] + 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 + + +def search(item, texto): + logger.info() + texto = texto.replace(" ", "+") + item.url = host + "/search/%s/" % texto + try: + return peliculas(item) + except: + import sys + for line in sys.exc_info(): + logger.error("%s" % line) + return [] + + +def categorias(item): + logger.info() + itemlist = [] + data = httptools.downloadpage(item.url).data + patron = '.*?' + patron += '", "", data) + patron = '
Siguiente »') + 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 )) + return itemlist + + +def play(item): + logger.info() + itemlist = [] + data = httptools.downloadpage(item.url).data + url = scrapertools.find_single_match(data, '