Merge branch 'master' into fixes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="plugin.video.alfa" name="Alfa" version="2.7.21" provider-name="Alfa Addon">
|
||||
<addon id="plugin.video.alfa" name="Alfa" version="2.7.25" provider-name="Alfa Addon">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="2.1.0"/>
|
||||
<import addon="script.module.libtorrent" optional="true"/>
|
||||
@@ -18,14 +18,14 @@
|
||||
<screenshot>resources/media/themes/ss/4.jpg</screenshot>
|
||||
</assets>
|
||||
<news>[B]Estos son los cambios para esta versión:[/B]
|
||||
[COLOR green][B]Arreglos[/B][/COLOR]
|
||||
¤ Grantorrent ¤ Zonatorrent ¤ pack +18
|
||||
¤ erotik ¤ pelis24 ¤ cineasiaenlinea
|
||||
¤ pelisgratis ¤ repelis ¤ descargacineclasico
|
||||
¤ Goovie ¤ PelisFox ¤ PelisPlus
|
||||
¤ TvSeriesDk ¤ UqLoad ¤ Vi2
|
||||
¤ gnula.biz
|
||||
[COLOR green][B]Arreglos[/B][/COLOR]
|
||||
¤ allcalidad ¤ canalpelis ¤ ciberpeliculashd
|
||||
¤ pelisplay ¤ doramasmp4 ¤ Newpct1
|
||||
¤ AnimeBoom ¤ AnimeID ¤ abtoon
|
||||
¤ mixtoon ¤ Animeflv
|
||||
|
||||
[COLOR green][B]Novedades[/B][/COLOR]
|
||||
¤ Mirapeliculas
|
||||
</news>
|
||||
<description lang="es">Navega con Kodi por páginas web para ver sus videos de manera fácil.</description>
|
||||
<summary lang="en">Browse web pages using Kodi</summary>
|
||||
|
||||
@@ -7,8 +7,6 @@ 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 = 'http://www.likuoo.video'
|
||||
|
||||
@@ -16,7 +14,8 @@ host = 'http://www.likuoo.video'
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Ultimos" , action="peliculas", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Ultimos" , action="lista", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Pornstar" , action="categorias", url=host + "/pornstars/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host + "/all-channels/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Buscar", action="search"))
|
||||
return itemlist
|
||||
@@ -27,7 +26,7 @@ def search(item, texto):
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = host + "/search/?s=%s" % texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
return lista(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -46,16 +45,24 @@ def categorias(item):
|
||||
scrapedplot = ""
|
||||
scrapedthumbnail = "https:" + scrapedthumbnail
|
||||
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="lista", title=scrapedtitle, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail, plot=scrapedplot) )
|
||||
next_page = scrapertools.find_single_match(data,'...<a href="([^"]+)" class="next">»</a>')
|
||||
if next_page!="":
|
||||
next_page = urlparse.urljoin(item.url,next_page)
|
||||
itemlist.append(item.clone(action="categorias", title="Página Siguiente >>", text_color="blue", url=next_page) )
|
||||
return itemlist
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
def lista(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = scrapertools.cachePage(item.url)
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<div class="item">.*?<a href="([^"]+)" title="(.*?)">.*?src="(.*?)".*?<div class="runtime">(.*?)</div>'
|
||||
patron = '<div class="item">.*?'
|
||||
patron += '<a href="([^"]+)" title="(.*?)">.*?'
|
||||
patron += 'src="(.*?)".*?'
|
||||
patron += '<div class="runtime">(.*?)</div>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail,scrapedtime in matches:
|
||||
url = urlparse.urljoin(item.url,scrapedurl)
|
||||
@@ -64,12 +71,12 @@ def peliculas(item):
|
||||
contentTitle = title
|
||||
thumbnail = "https:" + scrapedthumbnail
|
||||
plot = ""
|
||||
year = ""
|
||||
itemlist.append( Item(channel=item.channel, action="play" , title=title , url=url, thumbnail=thumbnail, plot=plot, contentTitle = contentTitle, infoLabels={'year':year} ))
|
||||
next_page_url = scrapertools.find_single_match(data,'...<a href="([^"]+)" class="next">»</a>')
|
||||
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=url, thumbnail=thumbnail,
|
||||
plot=plot, contentTitle = contentTitle))
|
||||
next_page = scrapertools.find_single_match(data,'...<a href="([^"]+)" class="next">»</a>')
|
||||
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
|
||||
|
||||
|
||||
|
||||
@@ -2,14 +2,11 @@
|
||||
#------------------------------------------------------------
|
||||
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://www.txxx.com'
|
||||
|
||||
@@ -17,10 +14,10 @@ host = 'http://www.txxx.com'
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Ultimas" , action="peliculas", url=host + "/latest-updates/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mejor valoradas" , action="peliculas", url=host + "/top-rated/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas popular" , action="peliculas", url=host + "/most-popular/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Canal" , action="catalogo", url=host + "/channels-list/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Ultimas" , action="lista", url=host + "/latest-updates/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mejor valoradas" , action="lista", url=host + "/top-rated/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas popular" , action="lista", url=host + "/most-popular/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Canal" , action="catalogo", url=host + "/channels-list/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
|
||||
@@ -31,7 +28,7 @@ def search(item, texto):
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = host + "/search/s=%s" % texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
return lista(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -44,19 +41,22 @@ def catalogo(item):
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<div class="channel-thumb">.*?<a href="([^"]+)" title="([^"]+)".*?<img src="([^"]+)".*?<span>(.*?)</span>'
|
||||
patron = '<div class="channel-thumb">.*?'
|
||||
patron += '<a href="([^"]+)" title="([^"]+)".*?'
|
||||
patron += '<img src="([^"]+)".*?'
|
||||
patron += '<span>(.*?)</span>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail,num in matches:
|
||||
scrapedplot = ""
|
||||
scrapedurl = host + scrapedurl
|
||||
title = scrapedtitle + "[COLOR yellow] " + num + "[/COLOR]"
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=title , url=scrapedurl ,
|
||||
thumbnail=scrapedthumbnail , plot=scrapedplot , folder=True) )
|
||||
next_page_url = scrapertools.find_single_match(data,'<a class=" btn btn--size--l btn--next" href="([^"]+)" title="Next Page"')
|
||||
if next_page_url!="":
|
||||
next_page_url = urlparse.urljoin(item.url,next_page_url)
|
||||
itemlist.append( Item(channel=item.channel, action="lista", title=title , url=scrapedurl ,
|
||||
thumbnail=scrapedthumbnail , plot=scrapedplot) )
|
||||
next_page = scrapertools.find_single_match(data,'<a class=" btn btn--size--l btn--next" href="([^"]+)" title="Next Page"')
|
||||
if next_page!="":
|
||||
next_page = urlparse.urljoin(item.url,next_page)
|
||||
itemlist.append( Item(channel=item.channel , action="catalogo" , title="Página Siguiente >>" ,
|
||||
text_color="blue", url=next_page_url , folder=True) )
|
||||
text_color="blue", url=next_page) )
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -73,33 +73,36 @@ def categorias(item):
|
||||
scrapedthumbnail = ""
|
||||
scrapedplot = ""
|
||||
title = scrapedtitle + "[COLOR yellow] " + num + "[/COLOR]"
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=title , url=url ,
|
||||
thumbnail=scrapedthumbnail , plot=scrapedplot , folder=True) )
|
||||
itemlist.append( Item(channel=item.channel, action="lista", title=title , url=url ,
|
||||
thumbnail=scrapedthumbnail, plot=scrapedplot) )
|
||||
return itemlist
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
def lista(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = 'data-video-id="\d+">.*?<a href="([^"]+)".*?'
|
||||
patron += '<img src="([^"]+)" alt="([^"]+)".*?'
|
||||
patron += '<span class="thumb__duration">(.*?)</span>'
|
||||
patron += '</div>(.*?)</div>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedthumbnail,scrapedtitle,time in matches:
|
||||
for scrapedurl,scrapedthumbnail,scrapedtitle,scrapedtime in matches:
|
||||
contentTitle = scrapedtitle
|
||||
title = "[COLOR yellow]" + time + " [/COLOR]" + scrapedtitle
|
||||
scrapedhd = scrapertools.find_single_match(scrapedtime, '<span class="thumb__hd">(.*?)</span>')
|
||||
duration = scrapertools.find_single_match(scrapedtime, '<span class="thumb__duration">(.*?)</span>')
|
||||
if scrapedhd != '':
|
||||
title = "[COLOR yellow]" +duration+ "[/COLOR] " + "[COLOR red]" +scrapedhd+ "[/COLOR] "+scrapedtitle
|
||||
else:
|
||||
title = "[COLOR yellow]" + duration + "[/COLOR] " + scrapedtitle
|
||||
thumbnail = scrapedthumbnail
|
||||
plot = ""
|
||||
year = ""
|
||||
itemlist.append( Item(channel=item.channel, action="play" , title=title , url=scrapedurl, thumbnail=thumbnail,
|
||||
plot=plot, contentTitle=contentTitle, infoLabels={'year':year} ))
|
||||
next_page_url = scrapertools.find_single_match(data,'<a class=" btn btn--size--l btn--next" href="([^"]+)" title="Next Page"')
|
||||
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) )
|
||||
plot=plot, contentTitle=title) )
|
||||
next_page = scrapertools.find_single_match(data,'<a class=" btn btn--size--l btn--next.*?" href="([^"]+)" title="Next Page"')
|
||||
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
|
||||
|
||||
|
||||
|
||||
@@ -7,9 +7,6 @@ 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 = 'http://www.absoluporn.es'
|
||||
|
||||
@@ -18,10 +15,10 @@ def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
itemlist.append( Item(channel=item.channel, title="Nuevos" , action="peliculas", url=host + "/wall-date-1.html"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas valorados" , action="peliculas", url=host + "/wall-note-1.html"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas vistos" , action="peliculas", url=host + "/wall-main-1.html"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas largos" , action="peliculas", url=host + "/wall-time-1.html"))
|
||||
itemlist.append( Item(channel=item.channel, title="Nuevos" , action="lista", url=host + "/wall-date-1.html"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas valorados" , action="lista", url=host + "/wall-note-1.html"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas vistos" , action="lista", url=host + "/wall-main-1.html"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas largos" , action="lista", url=host + "/wall-time-1.html"))
|
||||
|
||||
itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Buscar", action="search"))
|
||||
@@ -33,7 +30,7 @@ def search(item, texto):
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = host + "/search-%s-1.html" % texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
return lista(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -52,12 +49,12 @@ def categorias(item):
|
||||
scrapedthumbnail = ""
|
||||
scrapedurl = scrapedurl.replace(".html", "_date.html")
|
||||
scrapedurl = host +"/" + scrapedurl
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=scrapedurl,
|
||||
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
|
||||
@@ -72,14 +69,13 @@ def peliculas(item):
|
||||
title = "[COLOR yellow]" + scrapedtime + "[/COLOR] " + scrapedtitle
|
||||
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} ))
|
||||
contentTitle = scrapedtitle))
|
||||
next_page = scrapertools.find_single_match(data, '<span class="text16">\d+</span> <a href="..([^"]+)"')
|
||||
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(channel=item.channel, action="lista", title="Página Siguiente >>", text_color="blue",
|
||||
url=next_page) )
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"id": "abtoon",
|
||||
"name": "abtoon",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["lat"],
|
||||
"thumbnail": "http://i.imgur.com/EpNUqsD.png",
|
||||
"banner": "http://i.imgur.com/c1YTgNT.png",
|
||||
"categories": [
|
||||
"tvshow"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,225 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from channels import renumbertools
|
||||
from channelselector import get_thumb
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
from channels import filtertools
|
||||
from channels import autoplay
|
||||
from lib import gktools
|
||||
|
||||
IDIOMAS = {'latino': 'Latino'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['openload'
|
||||
]
|
||||
list_quality = ['default']
|
||||
|
||||
|
||||
host = "https://abtoon.net"
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
thumb_series = get_thumb("channels_tvshow.png")
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist = list()
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="lista", title="Series", contentSerieName="Series", url=host, thumbnail=thumb_series, page=0))
|
||||
#itemlist.append(
|
||||
# Item(channel=item.channel, action="lista", title="Live Action", contentSerieName="Live Action", url=host+"/liveaction", thumbnail=thumb_series, page=0))
|
||||
#itemlist.append(
|
||||
# Item(channel=item.channel, action="peliculas", title="Películas", contentSerieName="Películas", url=host+"/peliculas", thumbnail=thumb_series, page=0))
|
||||
itemlist = renumbertools.show_option(item.channel, itemlist)
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
def lista(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
patron = '<a href="([^"]+)" '
|
||||
if item.contentSerieName == "Series":
|
||||
patron += 'class="link">.+?<img src="([^"]+)".*?'
|
||||
else:
|
||||
patron += 'class="link-la">.+?<img src="([^"]+)".*?'
|
||||
patron += 'title="([^"]+)">'
|
||||
if item.url==host or item.url==host+"/liveaction":
|
||||
a=1
|
||||
else:
|
||||
num=(item.url).split('-')
|
||||
a=int(num[1])
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
|
||||
# Paginacion
|
||||
num_items_x_pagina = 30
|
||||
min = item.page * num_items_x_pagina
|
||||
min=min-item.page
|
||||
max = min + num_items_x_pagina - 1
|
||||
b=0
|
||||
for link, img, name in matches[min:max]:
|
||||
b=b+1
|
||||
if " y " in name:
|
||||
title=name.replace(" y "," & ")
|
||||
else:
|
||||
title = name
|
||||
url = host + link
|
||||
scrapedthumbnail = host + img
|
||||
context = renumbertools.context(item)
|
||||
context2 = autoplay.context
|
||||
context.extend(context2)
|
||||
|
||||
itemlist.append(item.clone(title=title, url=url, action="episodios", thumbnail=scrapedthumbnail, show=title,contentSerieName=title,
|
||||
context=context))
|
||||
if b<29:
|
||||
a=a+1
|
||||
url=host+"/p/pag-"+str(a)
|
||||
if b>10:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, contentSerieName=item.contentSerieName, title="[COLOR cyan]Página Siguiente >>[/COLOR]", url=url, action="lista", page=0))
|
||||
else:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, contentSerieName=item.contentSerieName, title="[COLOR cyan]Página Siguiente >>[/COLOR]", url=item.url, action="lista", page=item.page + 1))
|
||||
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
return itemlist
|
||||
|
||||
def peliculas(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
patron = '<div class="pel play" dt="(.+?)" .+?><img src="(.+?)" .+? title="(.*?)"><span class=".+?">(.+?)<\/span><a href="(.+?)" class.+?>'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
# Paginacion
|
||||
num_items_x_pagina = 30
|
||||
min = item.page * num_items_x_pagina
|
||||
min=min-item.page
|
||||
max = min + num_items_x_pagina - 1
|
||||
b=0
|
||||
for scrapedplot,scrapedthumbnail, scrapedtitle, scrapedyear, scrapedurl in matches[min:max]:
|
||||
b=b+1
|
||||
url = host + scrapedurl
|
||||
thumbnail = host +scrapedthumbnail
|
||||
context = renumbertools.context(item)
|
||||
context2 = autoplay.context
|
||||
context.extend(context2)
|
||||
itemlist.append(item.clone(title=scrapedtitle+"-"+scrapedyear, url=url, action="findvideos", thumbnail=thumbnail, plot=scrapedplot,
|
||||
show=scrapedtitle,contentSerieName=scrapedtitle,context=context))
|
||||
if b<29:
|
||||
pass
|
||||
else:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, contentSerieName=item.contentSerieName, title="[COLOR cyan]Página Siguiente >>[/COLOR]", url=item.url, action="peliculas", page=item.page + 1))
|
||||
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
return itemlist
|
||||
|
||||
def episodios(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
# obtener el numero total de episodios
|
||||
total_episode = 0
|
||||
|
||||
patron_caps = '<li><a href="(.*?)">(.*?) - (.*?)<\/a><\/li>'
|
||||
matches = scrapertools.find_multiple_matches(data, patron_caps)
|
||||
patron_info = '<img src="([^"]+)" .+?>.+?<h1>([^"]+)<\/h1><p .+?>(.+?)<\/p>'
|
||||
scrapedthumbnail, show, scrapedplot = scrapertools.find_single_match(data, patron_info)
|
||||
scrapedthumbnail = host + scrapedthumbnail
|
||||
|
||||
for link, cap, name in matches:
|
||||
|
||||
title = ""
|
||||
pat = "$%&"
|
||||
# varios episodios en un enlace
|
||||
if len(name.split(pat)) > 1:
|
||||
i = 0
|
||||
for pos in name.split(pat):
|
||||
i = i + 1
|
||||
total_episode += 1
|
||||
season, episode = renumbertools.numbered_for_tratk(item.channel, item.contentSerieName, 1, total_episode)
|
||||
if len(name.split(pat)) == i:
|
||||
title += "%sx%s " % (season, str(episode).zfill(2))
|
||||
else:
|
||||
title += "%sx%s_" % (season, str(episode).zfill(2))
|
||||
else:
|
||||
total_episode += 1
|
||||
season, episode = renumbertools.numbered_for_tratk(item.channel,item.contentSerieName, 1, total_episode)
|
||||
|
||||
title += "%sx%s " % (season, str(episode).zfill(2))
|
||||
|
||||
url = host + "/" + link
|
||||
if "DISPONIBLE" in name:
|
||||
title += "No Disponible aún"
|
||||
else:
|
||||
title += name
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="findvideos", title=title, url=url, show=show, plot=scrapedplot,
|
||||
thumbnail=scrapedthumbnail))
|
||||
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||
itemlist.append(Item(channel=item.channel, title="[COLOR yellow]Añadir esta serie a la videoteca[/COLOR]", url=item.url,
|
||||
action="add_serie_to_library", extra="episodios", show=show))
|
||||
|
||||
return itemlist
|
||||
|
||||
def findvideos(item):
|
||||
import base64
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
_sl = scrapertools.find_single_match(data, 'var abi = ([^;]+);')
|
||||
sl = eval(_sl)
|
||||
buttons = scrapertools.find_multiple_matches(data,'class="bsel" sl="(.+?)"')#[0,1,2,3,4]
|
||||
for ids in buttons:
|
||||
id = int(ids)
|
||||
url_end = golink(id,sl)
|
||||
new_url = "https://abtoon.net/" + "embed/" + sl[0] + "/" + sl[1] + "/" + str(id) + "/" + sl[2] + url_end
|
||||
data_new = httptools.downloadpage(new_url).data
|
||||
data_new = re.sub(r"\n|\r|\t|\s{2}| ", "", data_new)
|
||||
logger.info("asdasdasdcc"+data_new)
|
||||
valor1, valor2 = scrapertools.find_single_match(data_new, 'var x0x = \["[^"]*", "([^"]+)", "[^"]*", "[^"]*", "([^"]+)"\];')
|
||||
try:
|
||||
url = base64.b64decode(gktools.transforma_gsv(valor2, base64.b64decode(valor1)))
|
||||
if 'download' in url:
|
||||
url = url.replace('download', 'preview')
|
||||
title = '%s'
|
||||
itemlist.append(Item(channel=item.channel, title=title, url=url, action='play', language='latino',
|
||||
infoLabels=item.infoLabels))
|
||||
except Exception as e:
|
||||
logger.info(e)
|
||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||
# Requerido para FilterTools
|
||||
itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
# Requerido para AutoPlay
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
def golink(ida,sl):
|
||||
a=ida
|
||||
b=[3,10,5,22,31]
|
||||
c=1
|
||||
d=""
|
||||
e=sl[2]
|
||||
for i in range(len(b)):
|
||||
d=d+substr(e,b[i]+a,c)
|
||||
return d
|
||||
|
||||
def substr(st,a,b):
|
||||
return st[a:a+b]
|
||||
@@ -19,7 +19,7 @@ list_servers = ['rapidvideo', 'streamango', 'fastplay', 'flashx', 'openload', 'v
|
||||
|
||||
__channel__='allcalidad'
|
||||
|
||||
host = "http://allcalidad.net/"
|
||||
host = "https://allcalidad.net/"
|
||||
|
||||
try:
|
||||
__modo_grafico__ = config.get_setting('modo_grafico', __channel__)
|
||||
@@ -198,17 +198,16 @@ def findvideos(item):
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
if itemlist:
|
||||
if itemlist and item.contentChannel != "videolibrary":
|
||||
itemlist.append(Item(channel = item.channel))
|
||||
itemlist.append(item.clone(channel="trailertools", title="Buscar Tráiler", action="buscartrailer", context="",
|
||||
text_color="magenta"))
|
||||
# Opción "Añadir esta película a la biblioteca de KODI"
|
||||
if item.extra != "library":
|
||||
if config.get_videolibrary_support():
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green",
|
||||
action="add_pelicula_to_library", url=item.url, thumbnail = item.thumbnail,
|
||||
contentTitle = item.contentTitle
|
||||
))
|
||||
if config.get_videolibrary_support():
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green",
|
||||
action="add_pelicula_to_library", url=item.url, thumbnail = item.thumbnail,
|
||||
contentTitle = item.contentTitle
|
||||
))
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
@@ -7,15 +7,14 @@ 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 = 'http://www.alsoporn.com'
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Top" , action="peliculas", url=host + "/g/All/top/1"))
|
||||
itemlist.append( Item(channel=item.channel, title="Top" , action="lista", url=host + "/g/All/top/1"))
|
||||
itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Buscar", action="search"))
|
||||
return itemlist
|
||||
@@ -26,7 +25,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():
|
||||
@@ -46,8 +45,8 @@ def catalogo(item):
|
||||
for scrapedurl,cantidad,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
|
||||
|
||||
|
||||
@@ -62,12 +61,12 @@ def categorias(item):
|
||||
for scrapedurl,scrapedthumbnail,scrapedtitle in matches:
|
||||
scrapedplot = ""
|
||||
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="lista", title=scrapedtitle, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail, plot=scrapedplot) )
|
||||
return itemlist
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
def lista(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = scrapertools.cachePage(item.url)
|
||||
@@ -82,14 +81,12 @@ def peliculas(item):
|
||||
title = "[COLOR yellow]" + scrapedtime + "[/COLOR] " + scrapedtitle
|
||||
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} ))
|
||||
next_page_url = scrapertools.find_single_match(data,'<li><a href="([^"]+)" target="_self"><span class="alsoporn_page">NEXT</span></a>')
|
||||
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) )
|
||||
plot=plot, contentTitle = scrapedtitle))
|
||||
next_page = scrapertools.find_single_match(data,'<li><a href="([^"]+)" target="_self"><span class="alsoporn_page">NEXT</span></a>')
|
||||
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
|
||||
|
||||
|
||||
|
||||
@@ -7,17 +7,17 @@ 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.analdin.com/es'
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Nuevas" , action="peliculas", url=host + "/más-reciente/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas Vistas" , action="peliculas", url=host + "/más-visto/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mejor valorada" , action="peliculas", url=host + "/mejor-valorado/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Nuevas" , action="lista", url=host + "/más-reciente/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas Vistas" , action="lista", url=host + "/más-visto/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mejor valorada" , action="lista", url=host + "/mejor-valorado/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Canal" , action="catalogo", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host + "/categorías/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Buscar", action="search"))
|
||||
@@ -29,7 +29,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():
|
||||
@@ -48,13 +48,12 @@ def catalogo(item):
|
||||
for scrapedurl,scrapedtitle in matches:
|
||||
scrapedplot = ""
|
||||
scrapedthumbnail = ""
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail , plot=scrapedplot) )
|
||||
next_page_url = scrapertools.find_single_match(data,'<li class="arrow"><a rel="next" href="([^"]+)">»</a>')
|
||||
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) )
|
||||
itemlist.append( Item(channel=item.channel, action="lista", title=scrapedtitle, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail, plot=scrapedplot) )
|
||||
next_page = scrapertools.find_single_match(data,'<li class="arrow"><a rel="next" href="([^"]+)">»</a>')
|
||||
if next_page!="":
|
||||
next_page = urlparse.urljoin(item.url,next_page)
|
||||
itemlist.append(item.clone(action="catalogo", title="Página Siguiente >>", text_color="blue", url=next_page) )
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -71,12 +70,12 @@ def categorias(item):
|
||||
scrapedplot = ""
|
||||
scrapedtitle = scrapedtitle + " (" + cantidad + ")"
|
||||
scrapedurl = urlparse.urljoin(item.url,scrapedurl)
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=scrapedurl,
|
||||
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
|
||||
@@ -91,14 +90,13 @@ def peliculas(item):
|
||||
title = "[COLOR yellow]" + scrapedtime + "[/COLOR] " + scrapedtitle
|
||||
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} ))
|
||||
next_page_url = scrapertools.find_single_match(data,'<li class="next"><a href="([^"]+)"')
|
||||
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) )
|
||||
contentTitle = title))
|
||||
next_page = scrapertools.find_single_match(data,'<li class="next"><a href="([^"]+)"')
|
||||
if next_page!="":
|
||||
next_page = urlparse.urljoin(item.url,next_page)
|
||||
itemlist.append( Item(channel=item.channel, action="lista", title="Página Siguiente >>", text_color="blue",
|
||||
url=next_page) )
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ from core.item import Item
|
||||
from platformcode import logger, config
|
||||
from channels import autoplay
|
||||
from channels import filtertools
|
||||
|
||||
from channels import renumbertools
|
||||
|
||||
host = "https://animeboom.net/"
|
||||
|
||||
@@ -84,6 +84,7 @@ def mainlist(item):
|
||||
))
|
||||
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
itemlist = renumbertools.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -113,12 +114,16 @@ def list_all(item):
|
||||
else:
|
||||
lang = 'VOSE'
|
||||
title = re.sub('Audio Latino', '', scrapedtitle)
|
||||
context = renumbertools.context(item)
|
||||
context2 = autoplay.context
|
||||
context.extend(context2)
|
||||
itemlist.append(Item(channel=item.channel, action='episodios',
|
||||
title=title,
|
||||
url=url,
|
||||
thumbnail=thumbnail,
|
||||
contentSerieName=title,
|
||||
language = lang,
|
||||
context = context,
|
||||
infoLabels={'year':year}
|
||||
))
|
||||
|
||||
@@ -153,11 +158,17 @@ def search_results(item):
|
||||
|
||||
url = scrapedurl
|
||||
title = re.sub('online|Audio|Latino', '', scrapedtitle)
|
||||
|
||||
title = title.lstrip()
|
||||
title = title.rstrip()
|
||||
context = renumbertools.context(item)
|
||||
context2 = autoplay.context
|
||||
context.extend(context2)
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
action="episodios",
|
||||
title=title,
|
||||
contentSerieName=title,
|
||||
url=url,
|
||||
context = context,
|
||||
thumbnail=scrapedthumbnail))
|
||||
|
||||
tmdb.set_infoLabels(itemlist, seekTmdb=True)
|
||||
@@ -217,9 +228,10 @@ def episodios(item):
|
||||
lang='Latino'
|
||||
else:
|
||||
lang = 'VOSE'
|
||||
title = "1x" + episode + " - Episodio %s" % episode
|
||||
season, episode = renumbertools.numbered_for_tratk(item.channel, item.contentSerieName, 1, int(episode))
|
||||
title = "%sx%s - %s" % (season, str(episode).zfill(2),item.contentSerieName)
|
||||
url = scrapedurl
|
||||
infoLabels['season'] = '1'
|
||||
infoLabels['season'] = season
|
||||
infoLabels['episode'] = episode
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title=title, contentSerieName=item.contentSerieName, url=url,
|
||||
|
||||
@@ -25,6 +25,19 @@
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostrar enlaces en idioma...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"No filtrar",
|
||||
"VOSE",
|
||||
"LAT"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -10,12 +10,24 @@ from core import servertools
|
||||
from core import scrapertools
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
from channels import autoplay
|
||||
from channels import filtertools
|
||||
|
||||
|
||||
IDIOMAS = {'LAT': 'LAT','SUB': 'VOSE'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['directo', 'rapidvideo', 'streamango', 'yourupload', 'mailru', 'netutv', 'okru']
|
||||
list_quality = ['default']
|
||||
|
||||
|
||||
HOST = "https://animeflv.net/"
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist = list()
|
||||
itemlist.append(Item(channel=item.channel, action="novedades_episodios", title="Últimos episodios", url=HOST))
|
||||
itemlist.append(Item(channel=item.channel, action="novedades_anime", title="Últimos animes", url=HOST))
|
||||
@@ -31,6 +43,9 @@ def mainlist(item):
|
||||
itemlist.append(Item(channel=item.channel, action="search_section", title=" Estado", url=HOST + "browse",
|
||||
extra="status"))
|
||||
itemlist = renumbertools.show_option(item.channel, itemlist)
|
||||
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -50,6 +65,10 @@ def search(item, texto):
|
||||
_id = e["id"]
|
||||
url = "%sanime/%s/%s" % (HOST, _id, e["slug"])
|
||||
title = e["title"]
|
||||
#if "'" in title:
|
||||
# title = title.replace("'","")
|
||||
#if "°" in title:
|
||||
# title = title.replace("°","")
|
||||
thumbnail = "%suploads/animes/covers/%s.jpg" % (HOST, e["id"])
|
||||
new_item = item.clone(action="episodios", title=title, url=url, thumbnail=thumbnail)
|
||||
if e["type"] != "movie":
|
||||
@@ -173,47 +192,57 @@ def episodios(item):
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", data)
|
||||
info = eval(scrapertools.find_single_match(data, 'anime_info = (.*?);'))
|
||||
episodes = eval(scrapertools.find_single_match(data, 'var episodes = (.*?);'))
|
||||
info = scrapertools.find_single_match(data, "anime_info = \[(.*?)\];")
|
||||
info = eval(info)
|
||||
episodes = eval(scrapertools.find_single_match(data, "var episodes = (.*?);"))
|
||||
for episode in episodes:
|
||||
url = '%s/ver/%s/%s-%s' % (HOST, episode[1], info[2], episode[0])
|
||||
title = '1x%s Episodio %s' % (episode[0], episode[0])
|
||||
itemlist.append(item.clone(title=title, url=url, action='findvideos', show=info[1]))
|
||||
season = 1
|
||||
season, episodeRenumber = renumbertools.numbered_for_tratk(item.channel, item.contentSerieName, season, int(episode[0]))
|
||||
#title = '1x%s Episodio %s' % (episode[0], episode[0])
|
||||
title = '%sx%s Episodio %s' % (season, str(episodeRenumber).zfill(2), episodeRenumber)
|
||||
itemlist.append(item.clone(title=title, url=url, action='findvideos', contentSerieName=item.contentSerieName))
|
||||
itemlist = itemlist[::-1]
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir esta serie a la videoteca", url=item.url,
|
||||
action="add_serie_to_library", extra="episodios"))
|
||||
action="add_serie_to_library", extra="episodios", show=item.contentSerieName))
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
from core import jsontools
|
||||
itemlist = []
|
||||
data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", httptools.downloadpage(item.url).data)
|
||||
list_videos = scrapertools.find_multiple_matches(data, 'video\[\d\]\s=\s\'<iframe.+?src="([^"]+)"')
|
||||
download_list = scrapertools.find_multiple_matches(data, 'video\[\d+\] = \'<iframe .*?src="(.*?)"')
|
||||
for url in download_list:
|
||||
data = httptools.downloadpage(url).data
|
||||
if 'izanagi' in url:
|
||||
new_url = url.replace('embed', 'check')
|
||||
new_data = httptools.downloadpage(new_url).data
|
||||
url = scrapertools.find_single_match(new_data, '"file":"(.*?)"')
|
||||
else:
|
||||
url = scrapertools.find_single_match(data, 'var redir = "(.*?)"')
|
||||
if url != '':
|
||||
url = url.replace("\\","")
|
||||
itemlist.append(item.clone(title='%s', url=url, action='play'))
|
||||
videos = scrapertools.find_single_match(data, 'var videos = (.*?);')
|
||||
videos_json = jsontools.load(videos)
|
||||
for video_lang in videos_json.items():
|
||||
language = video_lang[0]
|
||||
matches = scrapertools.find_multiple_matches(str(video_lang[1]), 'src="([^"]+)"')
|
||||
for source in matches:
|
||||
new_data = httptools.downloadpage(source).data
|
||||
if 'redirector' in source:
|
||||
|
||||
url = scrapertools.find_single_match(new_data, 'window.location.href = "([^"]+)"')
|
||||
elif 'embed' in source:
|
||||
source = source.replace('embed', 'check')
|
||||
new_data = httptools.downloadpage(source).data
|
||||
json_data = jsontools.load(new_data)
|
||||
try:
|
||||
url = json_data['file']
|
||||
except:
|
||||
continue
|
||||
|
||||
itemlist.append(Item(channel=item.channel, url=url, title='%s', action='play', language=language))
|
||||
|
||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server)
|
||||
|
||||
# Requerido para FilterTools
|
||||
|
||||
itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
|
||||
# Requerido para AutoPlay
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def play(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
if item.video_urls:
|
||||
for it in item.video_urls:
|
||||
title = ".%s %sp [directo]" % (it[1].replace("video/", ""), it[0])
|
||||
itemlist.append([title, it[2]])
|
||||
return itemlist
|
||||
else:
|
||||
return [item]
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"id": "animeflv_me",
|
||||
"name": "Animeflv.ME",
|
||||
"active": false,
|
||||
"adult": false,
|
||||
"language": ["cast", "lat"],
|
||||
"thumbnail": "http://i.imgur.com/x9AdvBx.png",
|
||||
"banner": "http://i.imgur.com/dTZwCPq.png",
|
||||
"categories": [
|
||||
"anime"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
+45
-43
@@ -1,43 +1,45 @@
|
||||
{
|
||||
"id": "animemovil",
|
||||
"name": "Animemovil",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["cast", "lat"],
|
||||
"thumbnail": "https://s1.postimg.cc/92ji7stii7/animemovil1.png",
|
||||
"banner": "",
|
||||
"categories": [
|
||||
"anime"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "modo_grafico",
|
||||
"type": "bool",
|
||||
"label": "Buscar información extra",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "perfil",
|
||||
"type": "list",
|
||||
"label": "Perfil de color",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"Perfil 3",
|
||||
"Perfil 2",
|
||||
"Perfil 1"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"id": "animeflv_ru",
|
||||
"name": "AnimeFLV.RU",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["cast", "lat"],
|
||||
"thumbnail": "http://i.imgur.com/5nRR9qq.png",
|
||||
"banner": "animeflv_ru.png",
|
||||
"compatible": {
|
||||
"python": "2.7.9"
|
||||
},
|
||||
"categories": [
|
||||
"anime"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_anime",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Episodios de anime",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostrar enlaces en idioma...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"No filtrar",
|
||||
"VOSE"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -5,10 +5,18 @@ import urlparse
|
||||
|
||||
from channels import renumbertools
|
||||
from core import httptools
|
||||
from core import servertools
|
||||
from core import jsontools
|
||||
from core import scrapertools
|
||||
from core.item import Item
|
||||
from platformcode import logger
|
||||
from channels import autoplay
|
||||
|
||||
IDIOMAS = {'VOSE': 'VOSE'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['directo']
|
||||
list_quality = ['default']
|
||||
|
||||
|
||||
HOST = "https://animeflv.ru/"
|
||||
|
||||
@@ -16,25 +24,25 @@ HOST = "https://animeflv.ru/"
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = list()
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist = list()
|
||||
itemlist.append(Item(channel=item.channel, action="novedades_episodios", title="Últimos episodios", url=HOST))
|
||||
itemlist.append(Item(channel=item.channel, action="novedades_anime", title="Últimos animes", url=HOST))
|
||||
itemlist.append(Item(channel=item.channel, action="listado", title="Animes", url=HOST + "animes/nombre/lista"))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title="Buscar por:"))
|
||||
itemlist.append(Item(channel=item.channel, action="search", title=" Título"))
|
||||
itemlist.append(Item(channel=item.channel, action="search_section", title=" Género", url=HOST + "animes",
|
||||
extra="genre"))
|
||||
|
||||
itemlist = renumbertools.show_option(item.channel, itemlist)
|
||||
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def clean_title(title):
|
||||
year_pattern = r'\([\d -]+?\)'
|
||||
|
||||
return re.sub(year_pattern, '', title).strip()
|
||||
|
||||
|
||||
@@ -45,32 +53,26 @@ def search(item, texto):
|
||||
texto = texto.replace(" ", "+")
|
||||
post = "value=%s" % texto
|
||||
data = httptools.downloadpage(item.url, post=post).data
|
||||
|
||||
try:
|
||||
dict_data = jsontools.load(data)
|
||||
|
||||
for e in dict_data:
|
||||
title = clean_title(scrapertools.htmlclean(e["name"]))
|
||||
url = e["url"]
|
||||
plot = e["description"]
|
||||
thumbnail = HOST + e["thumb"]
|
||||
thumbnail = e["thumb"]
|
||||
new_item = item.clone(action="episodios", title=title, url=url, plot=plot, thumbnail=thumbnail)
|
||||
|
||||
if "Pelicula" in e["genre"]:
|
||||
new_item.contentType = "movie"
|
||||
new_item.contentTitle = title
|
||||
else:
|
||||
new_item.show = title
|
||||
new_item.context = renumbertools.context(item)
|
||||
|
||||
itemlist.append(new_item)
|
||||
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -79,41 +81,32 @@ def search_section(item):
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", data)
|
||||
|
||||
patron = 'id="%s_filter"[^>]+><div class="inner">(.*?)</div></div>' % item.extra
|
||||
data = scrapertools.find_single_match(data, patron)
|
||||
matches = re.compile('<a href="([^"]+)"[^>]+>(.*?)</a>', re.DOTALL).findall(data)
|
||||
|
||||
for url, title in matches:
|
||||
url = "%s/nombre/lista" % url
|
||||
itemlist.append(Item(channel=item.channel, action="listado", title=title, url=url,
|
||||
context=renumbertools.context(item)))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
itemlist = []
|
||||
|
||||
if categoria == 'anime':
|
||||
itemlist = novedades_episodios(Item(url=HOST))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def novedades_episodios(item):
|
||||
logger.info()
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", data)
|
||||
data = scrapertools.find_single_match(data, '<ul class="ListEpisodios[^>]+>(.*?)</ul>')
|
||||
|
||||
matches = re.compile('href="([^"]+)"[^>]+>.+?<img src="([^"]+)".+?"Capi">(.*?)</span>'
|
||||
'<strong class="Title">(.*?)</strong>', re.DOTALL).findall(data)
|
||||
itemlist = []
|
||||
|
||||
for url, thumbnail, str_episode, show in matches:
|
||||
|
||||
try:
|
||||
episode = int(str_episode.replace("Ep. ", ""))
|
||||
except ValueError:
|
||||
@@ -121,42 +114,31 @@ def novedades_episodios(item):
|
||||
episode = 1
|
||||
else:
|
||||
season, episode = renumbertools.numbered_for_tratk(item.channel, item.show, 1, episode)
|
||||
|
||||
title = "%s: %sx%s" % (show, season, str(episode).zfill(2))
|
||||
url = urlparse.urljoin(HOST, url)
|
||||
thumbnail = urlparse.urljoin(HOST, thumbnail)
|
||||
|
||||
new_item = Item(channel=item.channel, action="findvideos", title=title, url=url, show=show, thumbnail=thumbnail,
|
||||
fulltitle=title)
|
||||
|
||||
itemlist.append(new_item)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def novedades_anime(item):
|
||||
logger.info()
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", data)
|
||||
data = scrapertools.find_single_match(data, '<ul class="ListAnimes[^>]+>(.*?)</ul>')
|
||||
|
||||
matches = re.compile('<img src="([^"]+)".+?<a href="([^"]+)">(.*?)</a>', re.DOTALL).findall(data)
|
||||
itemlist = []
|
||||
|
||||
for thumbnail, url, title in matches:
|
||||
url = urlparse.urljoin(HOST, url)
|
||||
thumbnail = urlparse.urljoin(HOST, thumbnail)
|
||||
title = clean_title(title)
|
||||
|
||||
new_item = Item(channel=item.channel, action="episodios", title=title, url=url, thumbnail=thumbnail,
|
||||
fulltitle=title)
|
||||
|
||||
new_item.show = title
|
||||
new_item.context = renumbertools.context(item)
|
||||
|
||||
itemlist.append(new_item)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -166,19 +148,16 @@ def listado(item):
|
||||
data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", data)
|
||||
url_pagination = scrapertools.find_single_match(data, '<li class="current">.*?</li>[\s]<li><a href="([^"]+)">')
|
||||
data = scrapertools.find_single_match(data, '</div><div class="full">(.*?)<div class="pagination')
|
||||
|
||||
matches = re.compile('<img.+?src="([^"]+)".+?<a href="([^"]+)">(.*?)</a>.+?'
|
||||
'<div class="full item_info genres_info">(.*?)</div>.+?class="full">(.*?)</p>',
|
||||
re.DOTALL).findall(data)
|
||||
itemlist = []
|
||||
for thumbnail, url, title, genres, plot in matches:
|
||||
|
||||
title = clean_title(title)
|
||||
url = urlparse.urljoin(HOST, url)
|
||||
thumbnail = urlparse.urljoin(HOST, thumbnail)
|
||||
new_item = Item(channel=item.channel, action="episodios", title=title, url=url, thumbnail=thumbnail,
|
||||
fulltitle=title, plot=plot)
|
||||
|
||||
if "Pelicula Anime" in genres:
|
||||
new_item.contentType = "movie"
|
||||
new_item.contentTitle = title
|
||||
@@ -189,7 +168,6 @@ def listado(item):
|
||||
if url_pagination:
|
||||
url = urlparse.urljoin(HOST, url_pagination)
|
||||
title = ">> Pagina Siguiente"
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action="listado", title=title, url=url))
|
||||
return itemlist
|
||||
|
||||
@@ -203,7 +181,6 @@ def episodios(item):
|
||||
item.plot = scrapertools.find_single_match(data, 'Description[^>]+><p>(.*?)</p>')
|
||||
data = scrapertools.find_single_match(data, '<div class="Sect Episodes full">(.*?)</div>')
|
||||
matches = re.compile('<a href="([^"]+)"[^>]+>(.+?)</a', re.DOTALL).findall(data)
|
||||
|
||||
for url, title in matches:
|
||||
title = title.strip()
|
||||
url = urlparse.urljoin(item.url, url)
|
||||
@@ -224,27 +201,27 @@ def episodios(item):
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
_id = scrapertools.find_single_match(item.url, 'https://animeflv.ru/ver/([^/]+)/')
|
||||
post = "embed_id=%s" % _id
|
||||
data = httptools.downloadpage("https://animeflv.ru/get_video_info", post=post).data
|
||||
dict_data = jsontools.load(data)
|
||||
headers = dict()
|
||||
headers["Referer"] = item.url
|
||||
data = httptools.downloadpage("https:" + dict_data["value"], headers=headers).data
|
||||
dict_data = jsontools.load(data)
|
||||
if not dict_data:
|
||||
return itemlist
|
||||
list_videos = dict_data["playlist"][0]
|
||||
if isinstance(list_videos, list):
|
||||
for video in list_videos:
|
||||
itemlist.append(Item(channel=item.channel, action="play", url=video["file"],
|
||||
show=re.escape(item.show),
|
||||
title=item.title, plot=item.plot, fulltitle=item.title,
|
||||
thumbnail=item.thumbnail))
|
||||
else:
|
||||
for video in list_videos.values():
|
||||
video += "|User-Agent=Mozilla/5.0"
|
||||
itemlist.append(Item(channel=item.channel, action="play", url=video, show=re.escape(item.show),
|
||||
title=item.title, plot=item.plot, fulltitle=item.title,
|
||||
thumbnail=item.thumbnail))
|
||||
_id = scrapertools.find_single_match(item.url, HOST + 'ver/([^/]+)/')
|
||||
data = httptools.downloadpage(item.url).data
|
||||
bloque = scrapertools.find_single_match(data, 'atrl(.*?)choose_quality')
|
||||
matches = scrapertools.find_multiple_matches(bloque, '<option value="([^"]+)')
|
||||
headers = {"Referer" : item.url}
|
||||
for url in matches:
|
||||
post = "embed_id=%s" % _id
|
||||
xserver = scrapertools.find_single_match(url, 's=(\w+)')
|
||||
data = httptools.downloadpage(HOST + "get_video_info_v2?s=%s" %xserver, post=post).data
|
||||
dict_data = jsontools.load(data)
|
||||
data = httptools.downloadpage(dict_data["value"], headers=headers).data
|
||||
matches = scrapertools.find_multiple_matches(data, '"file":"([^"]+)"')
|
||||
for url in matches:
|
||||
url = url.replace("\\","")
|
||||
itemlist.append(item.clone(action="play", url=url, title='%s',
|
||||
fulltitle=item.title, language='VOSE'
|
||||
))
|
||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda x: x.title % x.server.capitalize())
|
||||
|
||||
# Requerido para AutoPlay
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -9,11 +9,18 @@ from core import scrapertools
|
||||
from core import servertools
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
from channels import renumbertools,autoplay
|
||||
|
||||
CHANNEL_HOST = "https://www.animeid.tv/"
|
||||
|
||||
IDIOMAS = {'Latino':'LAT', 'VOSE': 'VOSE'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_quality = []
|
||||
list_servers = ['animeid']
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
itemlist = list()
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="novedades_series", title="Últimas series", url=CHANNEL_HOST))
|
||||
@@ -25,6 +32,9 @@ def mainlist(item):
|
||||
Item(channel=item.channel, action="letras", title="Listado alfabetico", url=CHANNEL_HOST))
|
||||
itemlist.append(Item(channel=item.channel, action="search", title="Buscar..."))
|
||||
|
||||
itemlist = renumbertools.show_option(item.channel, itemlist)
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -69,9 +79,12 @@ def search(item, texto):
|
||||
url = urlparse.urljoin(item.url, scrapedurl)
|
||||
thumbnail = scrapedthumbnail
|
||||
plot = ""
|
||||
context = renumbertools.context(item)
|
||||
context2 = autoplay.context
|
||||
context.extend(context2)
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="episodios", title=title, url=url, thumbnail=thumbnail, plot=plot,
|
||||
show=title, viewmode="movie_with_plot"))
|
||||
context=context,show=title, viewmode="movie_with_plot"))
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -93,8 +106,11 @@ def novedades_series(item):
|
||||
for url, tipo, title in matches:
|
||||
scrapedtitle = title + " (" + tipo + ")"
|
||||
scrapedurl = urlparse.urljoin(item.url, url)
|
||||
context = renumbertools.context(item)
|
||||
context2 = autoplay.context
|
||||
context.extend(context2)
|
||||
itemlist.append(Item(channel=item.channel, action="episodios", title=scrapedtitle, url=scrapedurl,
|
||||
show=title, viewmode="movie_with_plot"))
|
||||
context=context,show=title, viewmode="movie_with_plot"))
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -165,13 +181,16 @@ def series(item):
|
||||
scrapedurl = urlparse.urljoin(item.url, url)
|
||||
scrapedthumbnail = thumbnail
|
||||
scrapedplot = plot
|
||||
context = renumbertools.context(item)
|
||||
context2 = autoplay.context
|
||||
context.extend(context2)
|
||||
itemlist.append(Item(channel=item.channel, action="episodios", title=scrapedtitle, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail, plot=scrapedplot, show=scrapedtitle,
|
||||
thumbnail=scrapedthumbnail, plot=scrapedplot, show=scrapedtitle, context=context,
|
||||
viewmode="movie_with_plot"))
|
||||
itemlist = sorted(itemlist, key=lambda it: it.title)
|
||||
try:
|
||||
page_url = scrapertools.find_single_match(data, '<li><a href="([^"]+)">></a></li>')
|
||||
itemlist.append(Item(channel=item.channel, action="series", title=">> Página siguiente",
|
||||
itemlist.append(Item(channel=item.channel, action="series", title="[COLOR cyan]>> Página siguiente[/COLOR]",
|
||||
url=urlparse.urljoin(item.url, page_url), viewmode="movie_with_plot", thumbnail="",
|
||||
plot=""))
|
||||
except:
|
||||
@@ -197,20 +216,22 @@ def episodios(item, final=True):
|
||||
if '"list":[]' in data:
|
||||
break
|
||||
dict_data = jsontools.load(data)
|
||||
list = dict_data['list']
|
||||
list = dict_data['list'][::-1]
|
||||
for dict in list:
|
||||
itemlist.append(Item(action = "findvideos",
|
||||
season, episode = renumbertools.numbered_for_tratk(item.channel, item.contentSerieName, 1, int(dict["numero"]))
|
||||
title = "%sx%s - %s" % (season, str(episode).zfill(2),dict["date"])
|
||||
itemlist.append(Item(action = "findvideos",
|
||||
channel = item.channel,
|
||||
title = "1x" + dict["numero"] + " - " + dict["date"],
|
||||
title = title,
|
||||
url = CHANNEL_HOST + dict['href'],
|
||||
thumbnail = item.thumbnail,
|
||||
show = item.show,
|
||||
viewmode = "movie_with_plot"
|
||||
))
|
||||
if config.get_videolibrary_support():
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir esta serie a la videoteca", url=item.url,
|
||||
itemlist.append(Item(channel=item.channel, title="[COLOR yellow]Añadir esta serie a la videoteca[/COLOR]", url=item.url,
|
||||
action="add_serie_to_library", extra="episodios", show=item.show))
|
||||
itemlist.append(Item(channel=item.channel, title="Descargar todos los episodios de la serie", url=item.url,
|
||||
itemlist.append(Item(channel=item.channel, title="[COLOR white]Descargar todos los episodios de la serie[/COLOR]", url=item.url,
|
||||
action="download_all_episodes", extra="episodios", show=item.show))
|
||||
return itemlist
|
||||
|
||||
@@ -249,4 +270,8 @@ def findvideos(item):
|
||||
itemlist.append(Item(channel=item.channel, action="findvideos", title="Siguiente: " + title_siguiente,
|
||||
url=CHANNEL_HOST + url_siguiente, thumbnail=item.thumbnail, plot=item.plot, show=item.show,
|
||||
fanart=item.thumbnail, folder=True))
|
||||
|
||||
# Requerido para AutoPlay
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -1,338 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from channels import renumbertools
|
||||
from core import httptools
|
||||
from core import servertools
|
||||
from core import jsontools
|
||||
from core import scrapertools
|
||||
from core.item import Item
|
||||
from platformcode import platformtools, config, logger
|
||||
|
||||
|
||||
|
||||
__modo_grafico__ = config.get_setting('modo_grafico', 'animemovil')
|
||||
__perfil__ = ''
|
||||
|
||||
# Fijar perfil de color
|
||||
perfil = [['0xFFFFE6CC', '0xFFFFCE9C', '0xFF994D00', '0xFFFE2E2E', '0xFFFFD700'],
|
||||
['0xFFA5F6AF', '0xFF5FDA6D', '0xFF11811E', '0xFFFE2E2E', '0xFFFFD700'],
|
||||
['0xFF58D3F7', '0xFF2E9AFE', '0xFF2E64FE', '0xFFFE2E2E', '0xFFFFD700']]
|
||||
if __perfil__ < 3:
|
||||
color1, color2, color3, color4, color5 = perfil[__perfil__]
|
||||
else:
|
||||
color1 = color2 = color3 = color4 = color5 = ""
|
||||
|
||||
host = "http://animemovil.com"
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action="recientes", title="Episodios Recientes", thumbnail=item.thumbnail,
|
||||
url=host, text_color=color1, contentType="tvshow", extra="recientes"))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action="listado", title="Anime", thumbnail=item.thumbnail,
|
||||
url=host+'/api/buscador?q=&letra=ALL&genero=ALL&estado=2&offset=0&limit=20', text_color=color1, contentType="tvshow", extra="recientes"))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action="list_by_json", title="En emisión", thumbnail=item.thumbnail,
|
||||
text_color=color2, contentType="tvshow"))
|
||||
itemlist.append(Item(channel=item.channel, action="indices", title="Índices", thumbnail=item.thumbnail,
|
||||
text_color=color2))
|
||||
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action="search", title="Buscar...",
|
||||
thumbnail=item.thumbnail, text_color=color3))
|
||||
|
||||
itemlist.append(item.clone(title="Configurar canal", action="openconfig", text_color=color5, folder=False))
|
||||
if renumbertools.context:
|
||||
itemlist = renumbertools.show_option(item.channel, itemlist)
|
||||
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def openconfig(item):
|
||||
ret = platformtools.show_channel_settings()
|
||||
platformtools.itemlist_refresh()
|
||||
return ret
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
item.url = "%s/api/buscador?q=%s&letra=ALL&genero=ALL&estado=2&offset=0&limit=30" % (host, texto.replace(" ", "+"))
|
||||
return list_by_json(item)
|
||||
|
||||
|
||||
def recientes(item):
|
||||
logger.info()
|
||||
item.contentType = "tvshow"
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r'\n|\s{2,}','', data)
|
||||
|
||||
bloque = scrapertools.find_single_match(data, '<ul class="hover">(.*?)</ul>')
|
||||
patron = '<li><a href="([^"]+)" title="([^"]+)".*?src="([^"]+)"'
|
||||
matches = scrapertools.find_multiple_matches(bloque, patron)
|
||||
for url, title, thumb in matches:
|
||||
url = host + url
|
||||
|
||||
try:
|
||||
contentTitle = re.split(r"(?i) \d+ (?:Sub Español|Audio Español|Español Latino)", title)[0]
|
||||
except:
|
||||
contentTitle = ""
|
||||
contentTitle = re.sub(r"(?i) Ova| Especiales| \(Pelicula[s]*\)| \(Película[s]*\)| Sub| Español| Peliculas| Audio| Latino", "", contentTitle)
|
||||
|
||||
tipo = "tvshow"
|
||||
show = contentTitle
|
||||
action = "episodios"
|
||||
context = renumbertools.context(item)
|
||||
if item.extra == "recientes":
|
||||
action = "findvideos"
|
||||
context = ""
|
||||
if not item.extra and (url.endswith("-pelicula/") or url.endswith("-pelicula")):
|
||||
tipo = "movie"
|
||||
show = ""
|
||||
action = "peliculas"
|
||||
if not thumb.startswith("http"):
|
||||
thumb = "http:%s" % thumb
|
||||
infoLabels = {'filtro': {"original_language": "ja"}.items()}
|
||||
itemlist.append(item.clone(action=action, title=title, url=url, thumbnail=thumb, text_color=color3,
|
||||
contentTitle=contentTitle, contentSerieName=show, infoLabels=infoLabels,
|
||||
thumb_=thumb, contentType=tipo, context=context))
|
||||
|
||||
try:
|
||||
from core import tmdb
|
||||
tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
|
||||
if item.extra and itemlist:
|
||||
for it in itemlist:
|
||||
it.thumbnail = it.thumb_
|
||||
except:
|
||||
pass
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def listado(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = jsontools.load(httptools.downloadpage(item.url).data)
|
||||
status = data.get('status')
|
||||
data= data.get('result')
|
||||
for it in data.get("items", []):
|
||||
scrapedtitle = it["title"]
|
||||
url = "%s/%s/" % (host, it["slug"])
|
||||
thumb = 'http://media.animemovil.com/animes/%s/wallpaper_small.jpg' % it['id']
|
||||
title = re.sub(r"(?i) Ova| Especiales| \(Pelicula[s]*\)| \(Película[s]*\)| Sub| Español| Peliculas| Audio| Latino", "", scrapedtitle)
|
||||
|
||||
tipo = "tvshow"
|
||||
show = title
|
||||
action = "episodios"
|
||||
if url.endswith("-pelicula/") or url.endswith("-pelicula"):
|
||||
tipo = "movie"
|
||||
show = ""
|
||||
action = "peliculas"
|
||||
infoLabels = {'filtro': {"original_language": "ja"}.items()}
|
||||
itemlist.append(item.clone(action=action, title=scrapedtitle, url=url, thumbnail=thumb, text_color=color3,
|
||||
contentTitle=title, contentSerieName=show, infoLabels=infoLabels,
|
||||
context=renumbertools.context(item), contentType=tipo))
|
||||
try:
|
||||
from core import tmdb
|
||||
tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
|
||||
except:
|
||||
pass
|
||||
|
||||
if status and itemlist:
|
||||
offset = scrapertools.find_single_match(item.url, 'offset=(\d+)')
|
||||
if offset:
|
||||
offset = int(offset) + 2
|
||||
else:
|
||||
offset = 0
|
||||
url = re.sub(r'offset=\d+', 'offset=%s' % offset, item.url)
|
||||
itemlist.append(Item(channel=item.channel, action="listado", url=url, title=">> Página Siguiente",
|
||||
thumbnail=item.thumbnail, text_color=color2))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def indices(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
if "Índices" in item.title:
|
||||
itemlist.append(item.clone(title="Por Género", url="%s/anime" % host))
|
||||
itemlist.append(item.clone(title="Por Letra", url="%s/anime" % host))
|
||||
itemlist.append(item.clone(action="list_by_json", title="Lista completa de Animes",
|
||||
url="%s/api/buscador?q=&letra=ALL&genero=ALL&estado=2&offset=0&limit=20" % host))
|
||||
else:
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub('\n|\s{2,}', '', data)
|
||||
if 'Letra' in item.title:
|
||||
bloque = scrapertools.find_single_match(data, '<select name="letra"(.*?)</select>')
|
||||
patron = '<option value="(\w)"'
|
||||
elif 'Género' in item.title:
|
||||
bloque = scrapertools.find_single_match(data, '<select name="genero"(.*?)</select>')
|
||||
patron = '<option value="(\d+.*?)/'
|
||||
|
||||
matches = scrapertools.find_multiple_matches(bloque, patron)
|
||||
|
||||
for title in matches:
|
||||
if "Letra" in item.title:
|
||||
url = '%s/api/buscador?q=&letra=%s&genero=ALL&estado=2&offset=0&limit=20' % (host, title)
|
||||
else:
|
||||
value = scrapertools.find_single_match(title, '(\d+)"')
|
||||
title = scrapertools.find_single_match(title, '\d+">(.*?)<')
|
||||
url = '%s/api/buscador?q=&letra=ALL&genero=%s&estado=2&offset=0&limit=20' % (host, value)
|
||||
|
||||
itemlist.append(item.clone(action="list_by_json", url=url, title=title))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodios(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub('\n|\s{2,}', '', data)
|
||||
show = scrapertools.find_single_match(data, '<div class="x-title">(.*?)</div>')
|
||||
show = re.sub(r"(?i) Ova| Especiales| \(Pelicula[s]*\)| \(Película[s]*\)| Sub| Español| Peliculas| Audio| Latino", "", show)
|
||||
|
||||
if not item.infoLabels["plot"]:
|
||||
item.infoLabels["plot"] = scrapertools.find_single_match(data, '<div class="x-sinopsis">\s*(.*?)</div>')
|
||||
|
||||
bloque = scrapertools.find_single_match(data, '<ul class="list"(.*?)</ul>')
|
||||
matches = scrapertools.find_multiple_matches(bloque, '<li><a href="([^"]+)" title="([^"]+)"')
|
||||
for url, title in matches:
|
||||
url = host + url
|
||||
epi = scrapertools.find_single_match(title, '.+?(\d+) (?:Sub|Audio|Español)')
|
||||
#epi = scrapertools.find_single_match(title, '(?i)%s.*? (\d+) (?:Sub|Audio|Español)' % item.contentSerieName)
|
||||
new_item = item.clone(action="findvideos", url=url, title=title, extra="")
|
||||
if epi:
|
||||
if "Especial" in title:
|
||||
epi=0
|
||||
season, episode = renumbertools.numbered_for_tratk(
|
||||
item.channel, item.contentSerieName, 1, int(epi))
|
||||
new_item.infoLabels["episode"] = episode
|
||||
new_item.infoLabels["season"] = season
|
||||
new_item.title = "%sx%s %s" % (season, episode, title)
|
||||
itemlist.append(new_item)
|
||||
|
||||
if item.infoLabels.get("tmdb_id") or item.extra == "recientes" or item.extra == "completo":
|
||||
try:
|
||||
from core import tmdb
|
||||
tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
|
||||
except:
|
||||
pass
|
||||
|
||||
if config.get_videolibrary_support() and itemlist:
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir serie a la videoteca", url=item.url,
|
||||
action="add_serie_to_library", extra="episodios", contentTitle=item.contentTitle,
|
||||
contentSerieName=item.contentSerieName, text_color=color4, fanart=item.fanart,
|
||||
thumbnail=item.thumbnail))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def list_by_json(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
repeat = 1
|
||||
status = False
|
||||
if item.url =='':
|
||||
item.url = host+"/api/buscador?limit=30&estado=1&dia=%s"
|
||||
repeat = 6
|
||||
for element in range(0,repeat):
|
||||
if repeat != 1:
|
||||
data = jsontools.load(httptools.downloadpage(item.url % element).data)
|
||||
else:
|
||||
data = jsontools.load(httptools.downloadpage(item.url).data)
|
||||
|
||||
status = data.get('status')
|
||||
json_data = data.get('result')
|
||||
elem_data = json_data['items']
|
||||
|
||||
for item_data in elem_data:
|
||||
url = '%s/%s/' % (host, item_data['slug'])
|
||||
title = item_data['title']
|
||||
title = re.sub(r"(?i) Ova| Especiales| \(Pelicula[s]*\)| \(Película[s]*\)| Sub Español| Peliculas", "",
|
||||
title)
|
||||
thumb = 'http://media.animemovil.com/animes/%s/wallpaper_small.jpg' % item_data['id']
|
||||
infoLabels = {'filtro': {"original_language": "ja"}.items()}
|
||||
itemlist.append(
|
||||
item.clone(action="episodios", title=title, url=url, thumbnail=thumb, text_color=color3,
|
||||
contentTitle=title, contentSerieName=title, extra="recientes",
|
||||
context=renumbertools.context(item), infoLabels=infoLabels))
|
||||
if status and itemlist:
|
||||
offset = scrapertools.find_single_match(item.url, 'offset=(\d+)')
|
||||
if offset:
|
||||
offset = int(offset) + 2
|
||||
else:
|
||||
offset = 0
|
||||
url = re.sub(r'offset=\d+', 'offset=%s' % offset, item.url)
|
||||
itemlist.append(Item(channel=item.channel, action="listado", url=url, title=">> Página Siguiente",
|
||||
thumbnail=item.thumbnail, text_color=color2))
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r'\n|\s{2,}', '', data)
|
||||
strm_id = scrapertools.find_single_match(data, '"id": (.*?),')
|
||||
streams = scrapertools.find_single_match(data, '"stream": (.*?)};')
|
||||
dict_strm = jsontools.load(streams)
|
||||
base_url = 'http:%s%s/' % (dict_strm['accessPoint'], strm_id)
|
||||
for server in dict_strm['servers']:
|
||||
expire = dict_strm['expire']
|
||||
signature = dict_strm['signature']
|
||||
last_modify = dict_strm['last_modify']
|
||||
callback = 'playerWeb'
|
||||
|
||||
strm_url = base_url +'%s?expire=%s&callback=%s&signature=%s&last_modify=%s' % (server, expire, callback,
|
||||
signature, last_modify)
|
||||
try:
|
||||
strm_data = httptools.downloadpage(strm_url).data
|
||||
strm_data = scrapertools.unescape(strm_data)
|
||||
title = '%s'
|
||||
language = ''
|
||||
if server not in ['fire', 'meph']:
|
||||
urls = scrapertools.find_multiple_matches(strm_data, '"(?:file|src)"*?:.*?"(.*?)"')
|
||||
for url in urls:
|
||||
if url != '':
|
||||
url = url.replace ('\\/','/')
|
||||
itemlist.append(Item(channel=item.channel, title=title, url=url, action='play'))
|
||||
elif server in ['fire', 'mpeh']:
|
||||
url = scrapertools.find_single_match(strm_data, 'xmlhttp.open(\"GET\", \"(.*?)\"')
|
||||
if url != '':
|
||||
url = url.replace('\\/', '/')
|
||||
itemlist.append(Item(channel=item.channel, title=url, url=url, action='play'))
|
||||
else:
|
||||
continue
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server)
|
||||
return itemlist
|
||||
|
||||
def newest(categoria):
|
||||
logger.info()
|
||||
item = Item()
|
||||
try:
|
||||
item.url = host
|
||||
item.extra = "novedades"
|
||||
itemlist = recientes(item)
|
||||
# Se captura la excepción, para no interrumpir al canal novedades si un canal falla
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
@@ -10,7 +10,7 @@ from channelselector import get_thumb
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import logger, config
|
||||
from channels import autoplay
|
||||
from channels import autoplay, renumbertools
|
||||
from channels import filtertools
|
||||
|
||||
tgenero = {"Comedia": "https://s7.postimg.cc/ne9g9zgwb/comedia.png",
|
||||
@@ -83,7 +83,7 @@ def mainlist(item):
|
||||
))
|
||||
|
||||
itemlist = filtertools.show_option(itemlist, item.channel, list_language, list_quality)
|
||||
|
||||
itemlist = renumbertools.show_option(item.channel, itemlist)
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
|
||||
@@ -113,7 +113,9 @@ def lista(item):
|
||||
patron = 'class="anime"><a href="([^"]+)">'
|
||||
patron +='<div class="cover" style="background-image: url\((.*?)\)">.*?<h2>([^<]+)<\/h2>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
context = renumbertools.context(item)
|
||||
context2 = autoplay.context
|
||||
context.extend(context2)
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle in matches:
|
||||
url = scrapedurl
|
||||
thumbnail = host + scrapedthumbnail
|
||||
@@ -191,10 +193,11 @@ def episodios(item):
|
||||
infoLabels = item.infoLabels
|
||||
for scrapedurl, scrapedlang, scrapedtitle, episode in matches:
|
||||
language = scrapedlang
|
||||
title = scrapedtitle + " " + "1x" + episode
|
||||
season, episode = renumbertools.numbered_for_tratk(item.channel, item.contentSerieName, 1, int(episode))
|
||||
title = scrapedtitle + " " + str(season) +"x" + str(episode)
|
||||
url = scrapedurl
|
||||
infoLabels['season'] ='1'
|
||||
infoLabels['episode'] = episode
|
||||
infoLabels['season'] = str(season)
|
||||
infoLabels['episode'] = str(episode)
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title=title, contentSerieName=item.contentSerieName, url=url,
|
||||
action='findvideos', language=IDIOMAS[language], infoLabels=infoLabels))
|
||||
@@ -211,32 +214,21 @@ def episodios(item):
|
||||
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
|
||||
from channels.pelisplus import add_vip
|
||||
itemlist = []
|
||||
|
||||
data = get_source(item.url)
|
||||
logger.debug(data)
|
||||
patron = "<option value=\"([^\"]+)\" data-content=.*?width='16'> (.*?) <span class='text-muted'>"
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, language in matches:
|
||||
vip = False
|
||||
|
||||
title = '%s [%s]'
|
||||
|
||||
if not config.get_setting('unify'):
|
||||
title = ' [%s]' % IDIOMAS[language]
|
||||
else:
|
||||
title = ''
|
||||
if 'pelisplus.net' in scrapedurl:
|
||||
referer = scrapedurl
|
||||
post = {'r':item.url, 'd': 'www.pelisplus.net'}
|
||||
post = urllib.urlencode(post)
|
||||
scrapedurl = scrapedurl.replace('/v/', '/api/source/')
|
||||
url_data = httptools.downloadpage(scrapedurl, post=post, headers={'Referer':referer}).data
|
||||
patron = '"file":"([^"]+)","label":"([^"]+)"'
|
||||
matches = re.compile(patron, re.DOTALL).findall(url_data)
|
||||
for url, quality in matches:
|
||||
url = 'https://www.pelisplus.net' + url.replace('\/', '/')
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, title=title, url=url, action='play', language=IDIOMAS[language],
|
||||
quality=quality, infoLabels=item.infoLabels, server='directo'))
|
||||
itemlist += add_vip(item, scrapedurl, IDIOMAS[language])
|
||||
vip = True
|
||||
elif 'server' in scrapedurl:
|
||||
new_data = get_source(scrapedurl)
|
||||
@@ -244,10 +236,10 @@ def findvideos(item):
|
||||
|
||||
|
||||
if not vip:
|
||||
itemlist.append(item.clone(title=title, url=scrapedurl.strip(), action='play',
|
||||
itemlist.append(item.clone(title='%s'+title, url=scrapedurl.strip(), action='play',
|
||||
language=IDIOMAS[language]))
|
||||
|
||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda x: x.title % (x.server.capitalize(), x.language))
|
||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda x: x.title % x.server.capitalize())
|
||||
|
||||
if __comprueba_enlaces__:
|
||||
itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__)
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
{
|
||||
"id": "animeyt",
|
||||
"name": "AnimeYT",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": "cast, lat",
|
||||
"thumbnail": "http://i.imgur.com/dHpupFk.png",
|
||||
"categories": [
|
||||
"anime",
|
||||
"vos"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "modo_grafico",
|
||||
"type": "bool",
|
||||
"label": "información extra",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,510 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import urlparse
|
||||
|
||||
from channels import renumbertools
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core.item import Item
|
||||
from core import tmdb
|
||||
from platformcode import config,logger
|
||||
|
||||
import gktools, random, time, urllib
|
||||
|
||||
__modo_grafico__ = config.get_setting('modo_grafico', 'animeyt')
|
||||
|
||||
HOST = "http://animeyt.tv/"
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = list()
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title="Novedades", action="novedades", url=HOST))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title="Recientes", action="recientes", url=HOST))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title="Alfabético", action="alfabetico", url=HOST))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title="Búsqueda", action="search", url=urlparse.urljoin(HOST, "busqueda?terminos=")))
|
||||
|
||||
itemlist = renumbertools.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def novedades(item):
|
||||
logger.info()
|
||||
itemlist = list()
|
||||
if not item.pagina:
|
||||
item.pagina = 0
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
|
||||
patron_novedades = '<div class="capitulos-portada">[\s\S]+?<h2>Comentarios</h2>'
|
||||
|
||||
data_novedades = scrapertools.find_single_match(data, patron_novedades)
|
||||
|
||||
patron = 'href="([^"]+)"[\s\S]+?src="([^"]+)"[^<]+alt="([^"]+) (\d+)([^"]+)'
|
||||
|
||||
matches = scrapertools.find_multiple_matches(data_novedades, patron)
|
||||
|
||||
for url, img, scrapedtitle, eps, info in matches[item.pagina:item.pagina + 20]:
|
||||
title = scrapedtitle + " " + "1x" + eps + info
|
||||
title = title.replace("Sub Español", "").replace("sub español", "")
|
||||
infoLabels = {'filtro': {"original_language": "ja"}.items()}
|
||||
itemlist.append(Item(channel=item.channel, title=title, url=url, thumb=img, action="findvideos", contentTitle=scrapedtitle, contentSerieName=scrapedtitle, infoLabels=infoLabels, contentType="tvshow"))
|
||||
try:
|
||||
from core import tmdb
|
||||
tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
|
||||
for it in itemlist:
|
||||
it.thumbnail = it.thumb
|
||||
except:
|
||||
pass
|
||||
|
||||
if len(matches) > item.pagina + 20:
|
||||
pagina = item.pagina + 20
|
||||
itemlist.append(item.clone(channel=item.channel, action="novedades", url=item.url, title=">> Página Siguiente", pagina=pagina))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def alfabetico(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
|
||||
|
||||
for letra in '0ABCDEFGHIJKLMNOPQRSTUVWXYZ':
|
||||
titulo = letra
|
||||
if letra == "0":
|
||||
letra = "num"
|
||||
itemlist.append(Item(channel=item.channel, action="recientes", title=titulo,
|
||||
url=urlparse.urljoin(HOST, "animes?tipo=0&genero=0&anio=0&letra={letra}".format(letra=letra))))
|
||||
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info()
|
||||
|
||||
texto = texto.replace(" ","+")
|
||||
item.url = item.url+texto
|
||||
if texto!='':
|
||||
return recientes(item)
|
||||
|
||||
|
||||
def recientes(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
|
||||
patron_recientes = '<article class="anime">[\s\S]+?</main>'
|
||||
|
||||
data_recientes = scrapertools.find_single_match(data, patron_recientes)
|
||||
|
||||
patron = '<a href="([^"]+)"[^<]+<img src="([^"]+)".+?js-synopsis-reduce">(.*?)<.*?<h3 class="anime__title">(.*?)<small>(.*?)</small>'
|
||||
|
||||
matches = scrapertools.find_multiple_matches(data_recientes, patron)
|
||||
|
||||
for url, thumbnail, plot, title, cat in matches:
|
||||
itemlist.append(item.clone(title=title, url=url, action="episodios", show=title, thumbnail=thumbnail, plot=plot, cat=cat, context=renumbertools.context(item)))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb = True)
|
||||
|
||||
paginacion = scrapertools.find_single_match(data, '<a class="pager__link icon-derecha last" href="([^"]+)"')
|
||||
paginacion = scrapertools.decodeHtmlentities(paginacion)
|
||||
|
||||
if paginacion:
|
||||
itemlist.append(Item(channel=item.channel, action="recientes", title=">> Página Siguiente", url=paginacion))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodios(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
|
||||
patron = '<span class="icon-triangulo-derecha"></span>.*?<a href="([^"]+)">([^"]+) (\d+)'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
|
||||
for url, scrapedtitle, episode in matches:
|
||||
|
||||
season = 1
|
||||
episode = int(episode)
|
||||
season, episode = renumbertools.numbered_for_tratk(item.channel, scrapedtitle, season, episode)
|
||||
title = "%sx%s %s" % (season, str(episode).zfill(2), scrapedtitle)
|
||||
itemlist.append(item.clone(title=title, url=url, action='findvideos'))
|
||||
|
||||
if config.get_videolibrary_support:
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir serie a la biblioteca", url=item.url, action="add_serie_to_library", extra="episodios", show=item.show))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
duplicados = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
|
||||
from collections import OrderedDict # cambiado dict por OrderedDict para mantener el mismo orden que en la web
|
||||
|
||||
matches = scrapertools.find_multiple_matches(data, '<li><a id="mirror(\d*)" class="link-veranime[^"]*" href="[^"]*">([^<]*)')
|
||||
d_links = OrderedDict(matches)
|
||||
|
||||
matches = scrapertools.find_multiple_matches(data, 'if \(mirror == (\d*)\).*?iframe src="([^"]*)"')
|
||||
d_frames = OrderedDict(matches)
|
||||
|
||||
for k in d_links:
|
||||
if k in d_frames and d_frames[k] != '':
|
||||
tit = scrapertools.find_single_match(d_frames[k], '/([^\./]*)\.php\?')
|
||||
if tit == '':
|
||||
tit = 'mega' if 'mega.nz/' in d_frames[k] else 'dailymotion' if 'dailymotion.com/' in d_frames[k] else'noname'
|
||||
if tit == 'id' and 'yourupload.com/' in d_frames[k]: tit = 'yourupload'
|
||||
title = 'Opción %s (%s)' % (d_links[k], tit)
|
||||
|
||||
itemlist.append(item.clone(channel=item.channel, folder=False, title=title, action="play", url=d_frames[k], referer=item.url))
|
||||
|
||||
|
||||
if item.extra != "library":
|
||||
if config.get_videolibrary_support() and item.extra:
|
||||
itemlist.append(item.clone(channel=item.channel, title="[COLOR yellow]Añadir pelicula a la videoteca[/COLOR]", url=item.url, action="add_pelicula_to_library", extra="library", contentTitle=item.show, contentType="movie"))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def play(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
if item.url.startswith('https://www.dailymotion.com/'):
|
||||
itemlist.append(item.clone(url=item.url, server='dailymotion'))
|
||||
|
||||
elif item.url.startswith('https://mega.nz/'):
|
||||
itemlist.append(item.clone(url=item.url.replace('embed',''), server='mega'))
|
||||
|
||||
elif item.url.startswith('https://s2.animeyt.tv/rakuten.php?'):
|
||||
# 1- Descargar
|
||||
data, ck = gktools.get_data_and_cookie(item)
|
||||
|
||||
# 2- Calcular datos
|
||||
gsv = scrapertools.find_single_match(data, '<meta name="google-site-verification" content="([^"]*)"')
|
||||
if not gsv: return itemlist
|
||||
|
||||
suto = gktools.md5_dominio(item.url)
|
||||
sufijo = '3497510'
|
||||
|
||||
token = gktools.generar_token('"'+gsv+'"', suto+'yt'+suto+sufijo)
|
||||
|
||||
link, subtitle = gktools.get_play_link_id(data, item.url)
|
||||
|
||||
url = 'https://s2.animeyt.tv/rakuten/plugins/gkpluginsphp.php'
|
||||
post = "link=%s&token=%s" % (link, token)
|
||||
|
||||
# 3- Descargar json
|
||||
data = gktools.get_data_json(url, post, ck, item.url)
|
||||
|
||||
# 4- Extraer enlaces
|
||||
itemlist = gktools.extraer_enlaces_json(data, item.referer, subtitle)
|
||||
|
||||
|
||||
elif item.url.startswith('https://s3.animeyt.tv/amz.php?'):
|
||||
# 1- Descargar
|
||||
data, ck = gktools.get_data_and_cookie(item)
|
||||
|
||||
# 2- Calcular datos
|
||||
gsv = scrapertools.find_single_match(data, '<meta name="Animeyt-Token" content="([^"]*)"')
|
||||
v_token = scrapertools.find_single_match(data, "var v_token='([^']*)'")
|
||||
if not gsv or not v_token: return itemlist
|
||||
|
||||
suto = gktools.md5_dominio(item.url)
|
||||
sufijo = '9457610'
|
||||
|
||||
token = gktools.generar_token('"'+gsv+'"', suto+'yt'+suto+sufijo)
|
||||
|
||||
url = 'https://s3.animeyt.tv/amz_animeyts.php'
|
||||
post = "v_token=%s&token=%s&handler=%s" % (v_token, token, 'Animeyt')
|
||||
|
||||
# 3- Descargar json
|
||||
data = gktools.get_data_json(url, post, ck, item.url)
|
||||
|
||||
# 4- Extraer enlaces
|
||||
itemlist = gktools.extraer_enlaces_json(data, item.referer)
|
||||
|
||||
|
||||
elif item.url.startswith('https://s2.animeyt.tv/lola.php?'):
|
||||
# 1- Descargar
|
||||
data, ck = gktools.get_data_and_cookie(item)
|
||||
|
||||
# 2- Calcular datos
|
||||
gsv = scrapertools.find_single_match(data, '<meta name="Animeyt-Token" content="([^"]*)"')
|
||||
s_cd, s_file = scrapertools.find_single_match(data, "var cd='([^']*)';\s*var file='([^']*)'")
|
||||
if not gsv or not s_cd or not s_file: return itemlist
|
||||
|
||||
suto = gktools.md5_dominio(item.url)
|
||||
sufijo = '8134976'
|
||||
|
||||
token = gktools.generar_token('"'+gsv+'"', suto+'yt'+suto+sufijo)
|
||||
|
||||
url = 'https://s2.animeyt.tv/minha_animeyt.php'
|
||||
post = "cd=%s&file=%s&token=%s&handler=%s" % (s_cd, s_file, token, 'Animeyt')
|
||||
|
||||
# 3- Descargar json
|
||||
data = gktools.get_data_json(url, post, ck, item.url)
|
||||
|
||||
# 4- Extraer enlaces
|
||||
itemlist = gktools.extraer_enlaces_json(data, item.referer)
|
||||
|
||||
|
||||
elif item.url.startswith('https://s4.animeyt.tv/chumi.php?'): #https://s4.animeyt.tv/chumi.php?cd=3481&file=4
|
||||
# 1- Descargar
|
||||
data, ck = gktools.get_data_and_cookie(item)
|
||||
|
||||
# 2- Calcular datos
|
||||
gsv = scrapertools.find_single_match(data, '<meta name="Animeyt-Token" content="([^"]*)"')
|
||||
s_cd, s_file = scrapertools.find_single_match(item.url, '\?cd=([^&]*)&file=([^&]*)')
|
||||
if not gsv or not s_cd or not s_file: return itemlist
|
||||
|
||||
ip = gktools.toHex(gsv) + str(1000000 + random.randint(0,9000000)) + str(100000 + random.randint(0,900000))
|
||||
|
||||
gsv_bis = gktools.transforma_gsv(gsv, '159753')
|
||||
p1 = '1705f5652bb6546ab3643ff698e' + gsv[-5:]
|
||||
p2 = '8388ca3fd07' + gsv[-5:] + gsv_bis
|
||||
|
||||
texto = gktools.toHex(gktools.encode_rijndael(gsv, p1, p2))
|
||||
|
||||
suto = gktools.md5_dominio(item.url)
|
||||
sufijo = '147268278' + gsv[-5:]
|
||||
prefijo = gsv[:-5] + gsv_bis
|
||||
|
||||
token = gktools.generar_token('"'+texto+'"', prefijo+suto+'yt'+suto+sufijo)
|
||||
archive = gktools.toHex(token)
|
||||
|
||||
url = 'https://s4.animeyt.tv/minha/minha_animeyt.php'
|
||||
post = "cd=%s&id=%s&archive=%s&ip=%s&Japan=%s" % (s_cd, s_file, archive, ip, 'Asia')
|
||||
|
||||
# 3- Descargar json
|
||||
data = gktools.get_data_json(url, post, ck, item.url)
|
||||
|
||||
# 4- Extraer enlaces
|
||||
itemlist = gktools.extraer_enlaces_json(data, item.referer)
|
||||
|
||||
|
||||
elif item.url.startswith('https://s3.animeyt.tv/mega.php?'): #https://s3.animeyt.tv/mega.php?v=WmpHMEVLVTNZZktyaVAwai9sYzhWV1ZRTWh0WTZlNGZ3VzFVTXhMTkx2NGlOMjRYUHhZQlMvaUFsQlJFbHBVTA==
|
||||
# 1- Descargar
|
||||
data, ck = gktools.get_data_and_cookie(item)
|
||||
|
||||
# 2- Calcular datos
|
||||
gsv = scrapertools.find_single_match(data, '<meta name="Animeyt-Token" content="([^"]*)"')
|
||||
s_v = scrapertools.find_single_match(item.url, '\?v=([^&]*)')
|
||||
if not gsv or not s_v: return itemlist
|
||||
|
||||
ip = gktools.toHex(gsv) + str(1000000 + random.randint(0,9000000)) + str(100000 + random.randint(0,900000))
|
||||
|
||||
gsv_bis = gktools.transforma_gsv(gsv, '159753')
|
||||
p1 = '1705f5652bb6546ab3643ff698e' + gsv[-5:]
|
||||
p2 = '8388ca3fd07' + gsv[-5:] + gsv_bis
|
||||
|
||||
texto = gktools.toHex(gktools.encode_rijndael(gsv, p1, p2))
|
||||
|
||||
suto = gktools.md5_dominio(item.url)
|
||||
sufijo = '147268278' + gsv[-5:]
|
||||
prefijo = gsv[:-5] + gsv_bis
|
||||
|
||||
token = gktools.generar_token('"'+texto+'"', prefijo+suto+'yt'+suto+sufijo)
|
||||
archive = gktools.toHex(token)
|
||||
|
||||
url = 'https://s3.animeyt.tv/mega_animeyts.php'
|
||||
post = "v=%s&archive=%s&referer=%s&ip=%s&Japan=%s" % (s_v, archive, item.url, ip, 'Asia')
|
||||
|
||||
# 3- Descargar json
|
||||
data = gktools.get_data_json(url, post, ck, item.url)
|
||||
|
||||
# 4- Extraer enlaces
|
||||
itemlist = gktools.extraer_enlaces_json(data, item.referer)
|
||||
|
||||
|
||||
elif item.url.startswith('https://s2.animeyt.tv/naruto/naruto.php?'): #https://s2.animeyt.tv/naruto/naruto.php?id=3477&file=11.mp4
|
||||
# 1- Descargar
|
||||
data, ck = gktools.get_data_and_cookie(item)
|
||||
|
||||
# 2- Calcular datos
|
||||
gsv = scrapertools.find_single_match(data, '<meta name="Animeyt-Token" content="([^"]*)"')
|
||||
s_id, s_file = scrapertools.find_single_match(item.url, '\?id=([^&]*)&file=([^&]*)')
|
||||
if not gsv or not s_id or not s_file: return itemlist
|
||||
|
||||
ip = gktools.toHex(gsv) + str(1000000 + random.randint(0,9000000)) + str(100000 + random.randint(0,900000))
|
||||
|
||||
gsv_bis = gktools.transforma_gsv(gsv, '159753')
|
||||
p1 = '1705f5652bb6546ab3643ff698e' + gsv[-5:]
|
||||
p2 = '8388ca3fd07' + gsv[-5:] + gsv_bis
|
||||
|
||||
texto = gktools.toHex(gktools.encode_rijndael(gsv, p1, p2))
|
||||
|
||||
suto = gktools.md5_dominio(item.url)
|
||||
sufijo = '147268278' + gsv[-5:]
|
||||
prefijo = gsv[:-5] + gsv_bis
|
||||
|
||||
token = gktools.generar_token('"'+texto+'"', prefijo+suto+'yt'+suto+sufijo)
|
||||
archive = gktools.toHex(token)
|
||||
|
||||
url = 'https://s2.animeyt.tv/naruto/narutos_animeyt.php'
|
||||
post = "id=%s&file=%s&archive=%s&referer=%s&ip=%s&Japan=%s" % (s_id, s_file, archive, urllib.quote(item.url), ip, 'Asia')
|
||||
|
||||
# 3- Descargar json
|
||||
data = gktools.get_data_json(url, post, ck, item.url)
|
||||
|
||||
# 4- Extraer enlaces
|
||||
itemlist = gktools.extraer_enlaces_json(data, item.referer)
|
||||
|
||||
|
||||
elif item.url.startswith('https://s4.animeyt.tv/facebook.php?'): #https://s4.animeyt.tv/facebook.php?cd=3481&id=4
|
||||
# 1- Descargar
|
||||
data, ck = gktools.get_data_and_cookie(item)
|
||||
|
||||
# 2- Calcular datos
|
||||
gsv = scrapertools.find_single_match(data, '<meta name="Animeyt-Token" content="([^"]*)"')
|
||||
s_cd, s_id = scrapertools.find_single_match(item.url, '\?cd=([^&]*)&id=([^&]*)')
|
||||
if not gsv or not s_cd or not s_id: return itemlist
|
||||
|
||||
ip = gktools.toHex(gsv) + str(1000000 + random.randint(0,9000000)) + str(100000 + random.randint(0,900000))
|
||||
|
||||
gsv_bis = gktools.transforma_gsv(gsv, '159753')
|
||||
p1 = '1705f5652bb6546ab3643ff698e' + gsv[-5:]
|
||||
p2 = '8388ca3fd07' + gsv[-5:] + gsv_bis
|
||||
|
||||
texto = gktools.toHex(gktools.encode_rijndael(gsv, p1, p2))
|
||||
|
||||
suto = gktools.md5_dominio(item.url)
|
||||
sufijo = '147268278' + gsv[-5:]
|
||||
prefijo = gsv[:-5] + gsv_bis
|
||||
|
||||
token = gktools.generar_token('"'+texto+'"', prefijo+suto+'yt'+suto+sufijo)
|
||||
archive = gktools.toHex(token)
|
||||
|
||||
url = 'https://s4.animeyt.tv/facebook/facebook_animeyts.php'
|
||||
post = "cd=%s&id=%s&archive=%s&referer=%s&ip=%s&Japan=%s" % (s_cd, s_id, archive, urllib.quote(item.url), ip, 'Asia')
|
||||
|
||||
# 3- Descargar json
|
||||
data = gktools.get_data_json(url, post, ck, item.url)
|
||||
|
||||
# 4- Extraer enlaces
|
||||
itemlist = gktools.extraer_enlaces_json(data, item.referer)
|
||||
|
||||
|
||||
elif item.url.startswith('https://s.animeyt.tv/v4/media.php?'): #https://s.animeyt.tv/v4/media.php?id=SmdMQ2Y0NUhFK2hOZlYzbVJCbnE3QT09
|
||||
# 1- Descargar
|
||||
data, ck = gktools.get_data_and_cookie(item)
|
||||
|
||||
# 2- Calcular datos
|
||||
gsv = scrapertools.find_single_match(data, '<meta name="Animeyt-Token" content="([^"]*)"')
|
||||
s_id = scrapertools.find_single_match(item.url, '\?id=([^&]*)')
|
||||
if not gsv or not s_id: return itemlist
|
||||
|
||||
ip = gktools.toHex(gsv) + str(1000000 + random.randint(0,9000000)) + str(100000 + random.randint(0,900000))
|
||||
|
||||
gsv_bis = gktools.transforma_gsv(gsv, '159753')
|
||||
p1 = '1705f5652bb6546ab3643ff698e' + gsv[-5:]
|
||||
p2 = '8388ca3fd07' + gsv[-5:] + gsv_bis
|
||||
|
||||
texto = gktools.toHex(gktools.encode_rijndael(gsv, p1, p2))
|
||||
|
||||
suto = gktools.md5_dominio(item.url)
|
||||
sufijo = '8049762' + gsv[-5:]
|
||||
prefijo = gsv[:-5] + gsv_bis
|
||||
|
||||
token = gktools.generar_token('"'+texto+'"', prefijo+suto+'yt'+suto+sufijo)
|
||||
archive = gktools.toHex(token)
|
||||
|
||||
url = 'https://s.animeyt.tv/v4/gsuite_animeyts.php'
|
||||
post = "id=%s&archive=%s&ip=%s&Japan=%s" % (s_id, archive, ip, 'Asia')
|
||||
|
||||
# 3- Descargar json
|
||||
data = gktools.get_data_json(url, post, ck, item.url)
|
||||
|
||||
# 4- Extraer enlaces
|
||||
itemlist = gktools.extraer_enlaces_json(data, item.referer)
|
||||
|
||||
|
||||
elif item.url.startswith('https://s10.animeyt.tv/yourupload.com/id.php?'): #https://s10.animeyt.tv/yourupload.com/id.php?id=62796D77774A4E4363326642
|
||||
# 1- Descargar
|
||||
data, ck = gktools.get_data_and_cookie(item)
|
||||
|
||||
# 2- Calcular datos
|
||||
gsv = scrapertools.find_single_match(data, '<meta name="Animeyt-Token" content="([^"]*)"')
|
||||
s_id = scrapertools.find_single_match(item.url, '\?id=([^&]*)')
|
||||
if not gsv or not s_id: return itemlist
|
||||
|
||||
ip = gktools.toHex(gsv) + str(1000000 + random.randint(0,9000000)) + str(100000 + random.randint(0,900000))
|
||||
|
||||
gsv_bis = gktools.transforma_gsv(gsv, '159753')
|
||||
p1 = '1705f5652bb6546ab3643ff698e' + gsv[-5:]
|
||||
p2 = '8388ca3fd07' + gsv[-5:] + gsv_bis
|
||||
|
||||
texto = gktools.toHex(gktools.encode_rijndael(gsv, p1, p2))
|
||||
|
||||
suto = gktools.md5_dominio(item.url)
|
||||
sufijo = '8049762' + gsv[-5:]
|
||||
prefijo = gsv[:-5] + gsv_bis
|
||||
|
||||
token = gktools.generar_token('"'+texto+'"', prefijo+suto+'yt'+suto+sufijo)
|
||||
archive = gktools.toHex(token)
|
||||
|
||||
url = 'https://s10.animeyt.tv/yourupload.com/chinese_streaming.php'
|
||||
post = "id=%s&archive=%s&ip=%s&Japan=%s" % (s_id, archive, ip, 'Asia')
|
||||
|
||||
# 3- Descargar json
|
||||
data = gktools.get_data_json(url, post, ck, item.url)
|
||||
|
||||
# 4- Extraer enlaces
|
||||
itemlist = gktools.extraer_enlaces_json(data, item.referer)
|
||||
|
||||
|
||||
elif item.url.startswith('https://s4.animeyt.tv/onedrive.php?'): #https://s4.animeyt.tv/onedrive.php?cd=3439&id=12
|
||||
# 1- Descargar
|
||||
data, ck = gktools.get_data_and_cookie(item)
|
||||
|
||||
# 2- Calcular datos
|
||||
gsv = scrapertools.find_single_match(data, '<meta name="Animeyt-Token" content="([^"]*)"')
|
||||
s_cd, s_id = scrapertools.find_single_match(item.url, '\?cd=([^&]*)&id=([^&]*)')
|
||||
if not gsv or not s_cd or not s_id: return itemlist
|
||||
|
||||
ip = gktools.toHex(gsv) + str(1000000 + random.randint(0,9000000)) + str(100000 + random.randint(0,900000))
|
||||
|
||||
gsv_bis = gktools.transforma_gsv(gsv, '159753')
|
||||
p1 = '1705f5652bb6546ab3643ff698e' + gsv[-5:]
|
||||
p2 = '8388ca3fd07' + gsv[-5:] + gsv_bis
|
||||
|
||||
texto = gktools.toHex(gktools.encode_rijndael(gsv, p1, p2))
|
||||
|
||||
suto = gktools.md5_dominio(item.url)
|
||||
sufijo = '147268278' + gsv[-5:]
|
||||
prefijo = gsv[:-5] + gsv_bis
|
||||
|
||||
token = gktools.generar_token('"'+texto+'"', prefijo+suto+'yt'+suto+sufijo)
|
||||
archive = gktools.toHex(token)
|
||||
|
||||
url = 'https://s4.animeyt.tv/onedrive/onedrive_animeyts.php'
|
||||
post = "cd=%s&id=%s&archive=%s&ip=%s&Japan=%s" % (s_cd, s_id, archive, ip, 'Asia')
|
||||
|
||||
# 3- Descargar json
|
||||
data = gktools.get_data_json(url, post, ck, item.url)
|
||||
|
||||
# 4- Extraer enlaces
|
||||
itemlist = gktools.extraer_enlaces_json(data, item.referer)
|
||||
|
||||
|
||||
return itemlist
|
||||
@@ -116,7 +116,7 @@ def lista(item):
|
||||
itemlist.append(item.clone(title=scrapedtitle, contentSerieName=show,url=scrapedurl, plot=scrapedplot,
|
||||
thumbnail=scrapedthumbnail, action="episodios", context=context))
|
||||
tmdb.set_infoLabels(itemlist, seekTmdb=True)
|
||||
itemlist.append(Item(channel=item.channel, url=item.url, range=next_page, title='Pagina Siguente >>>', contentTitle=item.title, action='lista'))
|
||||
itemlist.append(Item(channel=item.channel, url=item.url, range=next_page, title='Pagina Siguente >>>', contentTitle=item.contentTitle, action='lista'))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@ 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 = 'http://www.bravoporn.com'
|
||||
|
||||
@@ -17,8 +15,8 @@ host = 'http://www.bravoporn.com'
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Nuevas" , action="peliculas", url=host +"/latest-updates/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Popular" , action="peliculas", url=host + "/most-popular/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Nuevas" , action="lista", url=host +"/latest-updates/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Popular" , action="lista", url=host + "/most-popular/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host + "/c/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Buscar", action="search"))
|
||||
return itemlist
|
||||
@@ -29,7 +27,7 @@ def search(item, texto):
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = host + "/s/?q=%s" % texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
return lista(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -51,12 +49,12 @@ def categorias(item):
|
||||
scrapedtitle = scrapedtitle + " (" + cantidad + ")"
|
||||
scrapedthumbnail = "http:" + scrapedthumbnail
|
||||
scrapedurl = urlparse.urljoin(item.url,scrapedurl) + "/latest/"
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=scrapedurl,
|
||||
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
|
||||
@@ -70,14 +68,12 @@ def peliculas(item):
|
||||
title = "[COLOR yellow]" + duracion + "[/COLOR] " + scrapedtitle
|
||||
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} ))
|
||||
next_page_url = scrapertools.find_single_match(data,'<a href="([^"]+)" class="next" title="Next">Next</a>')
|
||||
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) )
|
||||
plot=plot, contentTitle = scrapedtitle))
|
||||
next_page = scrapertools.find_single_match(data,'<a href="([^"]+)" class="next" title="Next">Next</a>')
|
||||
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
|
||||
|
||||
|
||||
|
||||
@@ -7,20 +7,16 @@ 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'
|
||||
|
||||
# EN CATALOGO Y BUSQUEDA LA PAGINACION FUNCIONA CON UN AJAX
|
||||
|
||||
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="Nuevos" , action="lista", url=host + "/latest-updates/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mejor valorados" , action="lista", url=host + "/top-rated/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas vistos" , action="lista", 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
|
||||
@@ -28,10 +24,11 @@ def mainlist(item):
|
||||
|
||||
def search(item, texto):
|
||||
logger.info()
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = host + "/search/%s/" % texto
|
||||
item.url = "%s/search/%s/" % (host, texto.replace("+", "-"))
|
||||
item.extra = texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
return lista(item)
|
||||
# Se captura la excepción, para no interrumpir al buscador global si un canal falla
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -51,12 +48,12 @@ 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,
|
||||
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
|
||||
@@ -70,14 +67,31 @@ def peliculas(item):
|
||||
title = "[COLOR yellow]" + scrapedtime + "[/COLOR] " + scrapedtitle
|
||||
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} ))
|
||||
next_page = scrapertools.find_single_match(data, '<li class="next"><a href="([^"]+)"')
|
||||
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 ) )
|
||||
contentTitle = scrapedtitle, fanart=scrapedthumbnail))
|
||||
if item.extra:
|
||||
next_page = scrapertools.find_single_match(data, '<li class="next">.*?from_videos\+from_albums:(\d+)')
|
||||
if next_page:
|
||||
if "from_videos=" in item.url:
|
||||
next_page = re.sub(r'&from_videos=(\d+)', '&from_videos=%s' % next_page, item.url)
|
||||
else:
|
||||
next_page = "%s?mode=async&function=get_block&block_id=list_videos_videos_list_search_result" \
|
||||
"&q=%s&category_ids=&sort_by=post_date&from_videos=%s" % (item.url, item.extra, next_page)
|
||||
itemlist.append(item.clone(action="lista", title="Página Siguiente >>", text_color="blue", url=next_page))
|
||||
else:
|
||||
next_page = scrapertools.find_single_match(data, '<li class="next"><a href="([^"]+)"')
|
||||
if next_page and not next_page.startswith("#"):
|
||||
next_page = urlparse.urljoin(item.url,next_page)
|
||||
itemlist.append(item.clone(action="lista", title="Página Siguiente >>", text_color="blue", url=next_page) )
|
||||
else:
|
||||
next_page = scrapertools.find_single_match(data, '<li class="next">.*?from:(\d+)')
|
||||
if next_page:
|
||||
if "from" in item.url:
|
||||
next_page = re.sub(r'&from=(\d+)', '&from=%s' % next_page, item.url)
|
||||
else:
|
||||
next_page = "%s?mode=async&function=get_block&block_id=list_videos_common_videos_list&sort_by=post_date&from=%s" % (
|
||||
item.url, next_page)
|
||||
itemlist.append(item.clone(action="lista", title="Página Siguiente >>", text_color="blue", url=next_page))
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -94,7 +108,7 @@ def play(item):
|
||||
scrapedurl = scrapertools.find_single_match(data, 'video_url: \'([^\']+)\'')
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action="play", title=scrapedurl, fulltitle=item.title, url=scrapedurl,
|
||||
thumbnail=item.thumbnail, plot=item.plot, show=item.title, server="directo", folder=False))
|
||||
thumbnail=item.thumbnail, plot=item.plot, show=item.title, server="directo"))
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
@@ -289,9 +289,9 @@ def temporadas(item):
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
datas = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<span class="title">([^<]+)<i>.*?' # numeros de temporadas
|
||||
patron += '<img src="([^"]+)"></a></div>' # capitulos
|
||||
|
||||
patron = "<span class='title'>([^<]+)<i>.*?" # numeros de temporadas
|
||||
patron += "<img src='([^']+)'>" # capitulos
|
||||
# logger.info(datas)
|
||||
matches = scrapertools.find_multiple_matches(datas, patron)
|
||||
if len(matches) > 1:
|
||||
for scrapedseason, scrapedthumbnail in matches:
|
||||
@@ -331,14 +331,13 @@ def episodios(item):
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
datas = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
# logger.info(datas)
|
||||
patron = '<div class="imagen"><a href="([^"]+)">.*?' # url cap, img
|
||||
patron += '<div class="numerando">(.*?)</div>.*?' # numerando cap
|
||||
patron += '<a href="[^"]+">([^<]+)</a>' # title de episodios
|
||||
patron = "<div class='imagen'>.*?"
|
||||
patron += "<div class='numerando'>(.*?)</div>.*?"
|
||||
patron += "<a href='([^']+)'>([^<]+)</a>"
|
||||
|
||||
matches = scrapertools.find_multiple_matches(datas, patron)
|
||||
|
||||
for scrapedurl, scrapedtitle, scrapedname in matches:
|
||||
for scrapedtitle, scrapedurl, scrapedname in matches:
|
||||
scrapedtitle = scrapedtitle.replace('--', '0')
|
||||
patron = '(\d+) - (\d+)'
|
||||
match = re.compile(patron, re.DOTALL).findall(scrapedtitle)
|
||||
|
||||
@@ -248,8 +248,8 @@ def findvideos(item):
|
||||
itemlist.append(Item(channel = item.channel))
|
||||
itemlist.append(item.clone(channel="trailertools", title="Buscar Tráiler", action="buscartrailer", context="",
|
||||
text_color="magenta"))
|
||||
# Opción "Añadir esta película a la biblioteca de KODI"
|
||||
if item.extra != "library":
|
||||
# Opción "Añadir esta película a la videoteca de KODI"
|
||||
if item.contentChannel != "videolibrary":
|
||||
if config.get_videolibrary_support():
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green",
|
||||
action="add_pelicula_to_library", url=item.url, thumbnail = item.thumbnail,
|
||||
|
||||
@@ -244,8 +244,8 @@ def findvideos(item):
|
||||
url = scrapertools.find_single_match(new_data, "src='([^']+)'")
|
||||
url = get_url(url.replace('\\/', '/'))
|
||||
if url:
|
||||
itemlist.append(Item(channel=item.channel, title ='%s'+title, url=url, action='play', quality=item.quality,
|
||||
language=IDIOMAS[language], infoLabels=item.infoLabels))
|
||||
itemlist.append(item.clone(title ='%s'+title, url=url, action='play',
|
||||
language=IDIOMAS[language], text_color = ""))
|
||||
patron = "<a class='optn' href='([^']+)'.*?<img src='.*?>([^<]+)<.*?<img src='.*?>([^<]+)<"
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for hidden_url, quality, language in matches:
|
||||
@@ -258,10 +258,23 @@ def findvideos(item):
|
||||
url = get_url(url.replace('\\/', '/'))
|
||||
if url:
|
||||
itemlist.append(Item(channel=item.channel, title='%s'+title, url=url, action='play', quality=quality,
|
||||
language=IDIOMAS[language], infoLabels=item.infoLabels))
|
||||
language=IDIOMAS[language], infoLabels=item.infoLabels, text_color = ""))
|
||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||
itemlist.sort(key=lambda it: (it.language, it.server, it.quality))
|
||||
tmdb.set_infoLabels(itemlist, __modo_grafico__)
|
||||
# Requerido para FilterTools
|
||||
itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
|
||||
# Requerido para AutoPlay
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
if itemlist:
|
||||
if item.contentChannel != "videolibrary":
|
||||
if config.get_videolibrary_support():
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green",
|
||||
action="add_pelicula_to_library", url=item.url, thumbnail = item.thumbnail,
|
||||
contentTitle = item.contentTitle
|
||||
))
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
@@ -7,8 +7,7 @@ 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.cliphunter.com'
|
||||
|
||||
@@ -16,8 +15,8 @@ host = 'https://www.cliphunter.com'
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Nuevas" , action="peliculas", url=host + "/categories/All"))
|
||||
itemlist.append( Item(channel=item.channel, title="Popular" , action="peliculas", url=host + "/popular/ratings/yesterday"))
|
||||
itemlist.append( Item(channel=item.channel, title="Nuevas" , action="lista", url=host + "/categories/All"))
|
||||
itemlist.append( Item(channel=item.channel, title="Popular" , action="lista", url=host + "/popular/ratings/yesterday"))
|
||||
itemlist.append( Item(channel=item.channel, title="Pornstars" , action="catalogo", url=host + "/pornstars/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host + "/categories/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Buscar", action="search"))
|
||||
@@ -29,7 +28,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():
|
||||
@@ -47,13 +46,13 @@ def catalogo(item):
|
||||
for scrapedurl,scrapedthumbnail,scrapedtitle in matches:
|
||||
scrapedplot = ""
|
||||
scrapedurl = urlparse.urljoin(item.url,scrapedurl) + "/movies"
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail , plot=scrapedplot , folder=True) )
|
||||
next_page_url = scrapertools.find_single_match(data,'<li class="arrow"><a rel="next" href="([^"]+)">»</a>')
|
||||
if next_page_url!="":
|
||||
next_page_url = urlparse.urljoin(item.url,next_page_url)
|
||||
itemlist.append( Item(channel=item.channel, action="lista", title=scrapedtitle, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail , plot=scrapedplot) )
|
||||
next_page = scrapertools.find_single_match(data,'<li class="arrow"><a rel="next" href="([^"]+)">»</a>')
|
||||
if next_page!="":
|
||||
next_page = urlparse.urljoin(item.url,next_page)
|
||||
itemlist.append( Item(channel=item.channel, action="catalogo", title="Página Siguiente >>", text_color="blue",
|
||||
url=next_page_url) )
|
||||
url=next_page) )
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -68,12 +67,12 @@ def categorias(item):
|
||||
scrapedplot = ""
|
||||
scrapedtitle = scrapedtitle
|
||||
scrapedurl = urlparse.urljoin(item.url,scrapedurl)
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=scrapedurl,
|
||||
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
|
||||
@@ -88,11 +87,10 @@ def peliculas(item):
|
||||
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,'<li class="arrow"><a rel="next" href="([^"]+)">»</a>')
|
||||
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) )
|
||||
next_page = scrapertools.find_single_match(data,'<li class="arrow"><a rel="next" href="([^"]+)">»</a>')
|
||||
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
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#------------------------------------------------------------
|
||||
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
|
||||
@@ -16,7 +15,7 @@ host ='http://www.coomelonitas.com'
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Peliculas" , action="peliculas", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Peliculas" , action="lista", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Buscar", action="search"))
|
||||
return itemlist
|
||||
@@ -27,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():
|
||||
@@ -43,12 +42,12 @@ def categorias(item):
|
||||
for scrapedurl,scrapedtitle in matches:
|
||||
scrapedplot = ""
|
||||
scrapedthumbnail = ""
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=scrapedurl,
|
||||
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
|
||||
@@ -61,9 +60,8 @@ def peliculas(item):
|
||||
thumbnail = scrapertools.find_single_match(match,'<img src="([^"]+)"')
|
||||
itemlist.append( Item(channel=item.channel, action="findvideos", title=title, fulltitle=title, url=url,
|
||||
thumbnail=thumbnail, plot=plot, viewmode="movie") )
|
||||
next_page_url = scrapertools.find_single_match(data,'<a href="([^"]+)" class="siguiente">')
|
||||
if next_page_url!="":
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title="Página Siguiente >>", text_color="blue",
|
||||
url=next_page_url) )
|
||||
next_page = scrapertools.find_single_match(data,'<a href="([^"]+)" class="siguiente">')
|
||||
if next_page!="":
|
||||
itemlist.append(item.clone(action="lista", title="Página Siguiente >>", text_color="blue", url=next_page) )
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -3,21 +3,18 @@
|
||||
|
||||
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://czechvideo.org'
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Ultimos" , action="peliculas", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Ultimos" , action="lista", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Buscar", action="search"))
|
||||
return itemlist
|
||||
@@ -28,7 +25,7 @@ def search(item, texto):
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = host + "/tags/%s/" % texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
return lista(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -40,45 +37,47 @@ def categorias(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = scrapertools.get_match(data,'<ul class="cat_menu" id="cat_menu_c0">(.*?)</ul>')
|
||||
data = scrapertools.get_match(data,'<div class="category">(.*?)</ul>')
|
||||
patron = '<li><a href="(.*?)".*?>(.*?)</a></li>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
scrapertools.printMatches(matches)
|
||||
for scrapedurl,scrapedtitle in matches:
|
||||
scrapedplot = ""
|
||||
scrapedthumbnail = ""
|
||||
scrapedtitle = str(scrapedtitle)
|
||||
scrapedurl = host + scrapedurl
|
||||
scrapedurl = urlparse.urljoin(item.url,scrapedurl)
|
||||
thumbnail = urlparse.urljoin(item.url,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
|
||||
patron = '<div class="short-story">.*?<a href="([^"]+)" title="([^"]+)"><img src="([^"]+)".*?div class="short-time">(.*?)</div>'
|
||||
patron = '<div class="short-story">.*?'
|
||||
patron += '<a href="([^"]+)" title="([^"]+)"><img src="([^"]+)".*?'
|
||||
patron += 'div class="short-time">(.*?)</div>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
scrapertools.printMatches(matches)
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail,scrapedtime in matches:
|
||||
title = "[COLOR yellow]" + scrapedtime + "[/COLOR] " + scrapedtitle
|
||||
scrapedthumbnail = urlparse.urljoin(item.url,scrapedthumbnail)
|
||||
scrapedplot = ""
|
||||
itemlist.append( Item(channel=item.channel, action="play", title=title , url=scrapedurl , thumbnail=scrapedthumbnail , plot=scrapedplot , folder=True) )
|
||||
next_page_url = scrapertools.find_single_match(data,'<del><a href="([^"]+)">Next</a></del>')
|
||||
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, fanart=scrapedthumbnail, plot=scrapedplot) )
|
||||
next_page = scrapertools.find_single_match(data,'<del><a href="([^"]+)">Next</a></del>')
|
||||
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
|
||||
|
||||
|
||||
def play(item):
|
||||
logger.info()
|
||||
data = scrapertools.cachePage(item.url)
|
||||
url = scrapertools.find_single_match(data,'<iframe src=.*?<iframe src="([^"]+)"')
|
||||
url = "http:" + url
|
||||
itemlist = servertools.find_video_items(data=url)
|
||||
|
||||
itemlist = servertools.find_video_items(data=data)
|
||||
for videoitem in itemlist:
|
||||
videoitem.title = item.title
|
||||
videoitem.fulltitle = item.fulltitle
|
||||
|
||||
@@ -167,7 +167,8 @@ def findvideos(item):
|
||||
headers = {"X-Requested-With":"XMLHttpRequest"}
|
||||
for scrapedserver, scrapeduser in matches:
|
||||
data1 = httptools.downloadpage("https://space.danimados.space/gilberto.php?id=%s&sv=mp4" %scrapeduser).data
|
||||
url = base64.b64decode(scrapertools.find_single_match(data1, 'hashUser = "([^"]+)'))
|
||||
data1 = re.sub(r"\n|\r|\t|\s{2}| ", "", data1)
|
||||
url = base64.b64decode(scrapertools.find_single_match(data1, '<iframe data-source="([^"]+)"'))
|
||||
url1 = devuelve_enlace(url)
|
||||
if "drive.google" in url1:
|
||||
url1 = url1.replace("view","preview")
|
||||
|
||||
@@ -525,7 +525,7 @@ def findvideos(item):
|
||||
|
||||
#Bajamos los datos de la página
|
||||
data = ''
|
||||
patron = '<a onclick="eventDownloadTorrent\(.*?\)".?class="linktorrent" href="([^"]+)">'
|
||||
patron = '<a onclick="eventDownloadTorrent\(.*?\)".?class="linktorrent" href="([^"]+)"'
|
||||
if item.contentType == 'movie': #Es una peli
|
||||
try:
|
||||
data = re.sub(r"\n|\r|\t|\s{2}|(<!--.*?-->)", "", httptools.downloadpage(item.url, timeout=timeout).data)
|
||||
@@ -588,7 +588,7 @@ def findvideos(item):
|
||||
#Buscamos si ya tiene tamaño, si no, los buscamos en el archivo .torrent
|
||||
size = scrapertools.find_single_match(item_local.quality, '\s\[(\d+,?\d*?\s\w\s?[b|B])\]')
|
||||
if not size and not item.armagedon:
|
||||
size = generictools.get_torrent_size(item_local.url) #Buscamos el tamaño en el .torrent
|
||||
size = generictools.get_torrent_size(scrapedurl) #Buscamos el tamaño en el .torrent
|
||||
if size:
|
||||
item_local.title = re.sub(r'\s\[\d+,?\d*?\s\w[b|B]\]', '', item_local.title) #Quitamos size de título, si lo traía
|
||||
item_local.title = '%s [%s]' % (item_local.title, size) #Agregamos size al final del título
|
||||
|
||||
@@ -16,7 +16,7 @@ from core.item import Item
|
||||
from platformcode import config, logger
|
||||
from channelselector import get_thumb
|
||||
|
||||
host = 'https://www3.doramasmp4.com/'
|
||||
host = 'https://www4.doramasmp4.com/'
|
||||
|
||||
IDIOMAS = {'sub': 'VOSE', 'VO': 'VO'}
|
||||
list_language = IDIOMAS.values()
|
||||
@@ -166,6 +166,8 @@ def findvideos(item):
|
||||
itemlist = []
|
||||
|
||||
data = get_source(item.url)
|
||||
new_dom=scrapertools.find_single_match(data,"var web = { domain: '(.*?)'")
|
||||
|
||||
patron = 'link="([^"]+)"'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
@@ -191,7 +193,7 @@ def findvideos(item):
|
||||
video_data = httptools.downloadpage(video_url, headers=headers).data
|
||||
url = scrapertools.find_single_match(video_data, "'file':'([^']+)'")
|
||||
else:
|
||||
video_url = 'https://www3.doramasmp4.com/api/redirect.php?token=%s' % token
|
||||
video_url = new_dom+'api/redirect.php?token=%s' % token
|
||||
video_data = httptools.downloadpage(video_url, headers=headers, follow_redirects=False).headers
|
||||
url = scrapertools.find_single_match(video_data['location'], '\d+@@@(.*?)@@@')
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"id": "library_add",
|
||||
"type": "bool",
|
||||
"label": "@70230",
|
||||
"default": true,
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
@@ -26,7 +26,7 @@
|
||||
"id": "library_move",
|
||||
"type": "bool",
|
||||
"label": "@70231",
|
||||
"default": true,
|
||||
"default": false,
|
||||
"enabled": "eq(-1,true)",
|
||||
"visible": true
|
||||
},
|
||||
@@ -34,7 +34,7 @@
|
||||
"id": "browser",
|
||||
"type": "bool",
|
||||
"label": "@70232",
|
||||
"default": false,
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
|
||||
@@ -6,8 +6,11 @@
|
||||
import os
|
||||
import re
|
||||
import time
|
||||
import unicodedata
|
||||
|
||||
|
||||
from core import filetools
|
||||
from core import jsontools
|
||||
from core import scraper
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
@@ -53,7 +56,7 @@ def mainlist(item):
|
||||
title = TITLE_TVSHOW % (
|
||||
STATUS_COLORS[i.downloadStatus], i.downloadProgress, i.contentSerieName, i.contentChannel)
|
||||
|
||||
itemlist.append(Item(title=title, channel="descargas", action="mainlist", contentType="tvshow",
|
||||
itemlist.append(Item(title=title, channel="downloads", action="mainlist", contentType="tvshow",
|
||||
contentSerieName=i.contentSerieName, contentChannel=i.contentChannel,
|
||||
downloadStatus=i.downloadStatus, downloadProgress=[i.downloadProgress],
|
||||
fanart=i.fanart, thumbnail=i.thumbnail))
|
||||
@@ -308,7 +311,6 @@ def update_json(path, params):
|
||||
|
||||
|
||||
def save_server_statistics(server, speed, success):
|
||||
from core import jsontools
|
||||
if os.path.isfile(STATS_FILE):
|
||||
servers = jsontools.load(open(STATS_FILE, "rb").read())
|
||||
else:
|
||||
@@ -330,7 +332,6 @@ def save_server_statistics(server, speed, success):
|
||||
|
||||
|
||||
def get_server_position(server):
|
||||
from core import jsontools
|
||||
if os.path.isfile(STATS_FILE):
|
||||
servers = jsontools.load(open(STATS_FILE, "rb").read())
|
||||
else:
|
||||
@@ -360,7 +361,6 @@ def get_match_list(data, match_list, order_list=None, only_ascii=False, ignoreca
|
||||
coincidira con "Idioma Español" pero no con "Español" ya que la coincidencia mas larga tiene prioridad.
|
||||
|
||||
"""
|
||||
import unicodedata
|
||||
match_dict = dict()
|
||||
matches = []
|
||||
|
||||
|
||||
@@ -208,7 +208,8 @@ def findvideos(item):
|
||||
data = scrapertools.unescape(data)
|
||||
data = scrapertools.decodeHtmlentities(data)
|
||||
|
||||
patron = 'id="(Opt\d+)">.*?src="([^"]+)" frameborder.*?</iframe>'
|
||||
# patron = 'id="(Opt\d+)">.*?src="([^"]+)" frameborder.*?</iframe>'
|
||||
patron = 'id="(Opt\d+)">.*?src="(?!about:blank)([^"]+)" frameborder.*?</iframe>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for option, scrapedurl in matches:
|
||||
|
||||
@@ -7,8 +7,6 @@ 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 = 'http://www.elreyx.com'
|
||||
|
||||
@@ -17,11 +15,11 @@ def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
itemlist.append( Item(channel=item.channel, title="Peliculas" , action="peliculas", url=host + "/peliculasporno.html"))
|
||||
itemlist.append( Item(channel=item.channel, title="Escenas" , action="escenas", url=host + "/index.html"))
|
||||
itemlist.append( Item(channel=item.channel, title="Productora" , action="productora", url=host + "/index.html"))
|
||||
itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host + "/peliculasporno.html"))
|
||||
itemlist.append( Item(channel=item.channel, title="Buscar", action="search"))
|
||||
itemlist.append( Item(channel=item.channel, title="Peliculas" , action="lista", url=host + "/peliculasporno.html") )
|
||||
itemlist.append( Item(channel=item.channel, title="Escenas" , action="lista", url=host + "/index.html"))
|
||||
itemlist.append( Item(channel=item.channel, title="Productora" , action="categorias", url=host + "/index.html") )
|
||||
itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host + "/peliculasporno.html") )
|
||||
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 + "/search-%s" % texto + ".html"
|
||||
try:
|
||||
return escenas(item)
|
||||
return lista(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -38,43 +36,33 @@ def search(item, texto):
|
||||
return []
|
||||
|
||||
|
||||
def productora(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<a href="([^<]+)" title="View Category ([^<]+)">(.*?)</a>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail in matches:
|
||||
scrapedplot = ""
|
||||
thumbnail="https:" + scrapedthumbnail
|
||||
url="https:" + scrapedurl
|
||||
itemlist.append( Item(channel=item.channel, action="escenas", title=scrapedtitle, url=url, thumbnail=thumbnail,
|
||||
plot=scrapedplot) )
|
||||
return itemlist
|
||||
|
||||
|
||||
def categorias(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<td><a href="([^<]+)" title="Movies ([^<]+)">.*?</a>'
|
||||
if item.title == "Categorias" :
|
||||
patron = '<td><a href="([^<]+)" title="Movies ([^<]+)">.*?</a>'
|
||||
else:
|
||||
patron = '<a href="([^<]+)" title="View Category ([^<]+)">.*?</a>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle in matches:
|
||||
scrapedplot = ""
|
||||
url="https:" + scrapedurl
|
||||
scrapedthumbnail = ""
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=url,
|
||||
itemlist.append( Item(channel=item.channel, action="lista", title=scrapedtitle, url=url,
|
||||
thumbnail=scrapedthumbnail, plot=scrapedplot) )
|
||||
return itemlist
|
||||
|
||||
|
||||
def escenas(item):
|
||||
def lista(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = '<div class="notice_image">.*?<a title="([^"]+)" href="([^"]+)">.*?<img src="(.*?)"'
|
||||
if not "/peliculasporno" in item.url:
|
||||
patron = '<div class="notice_image">.*?<a title="([^"]+)" href="([^"]+)">.*?<img src="(.*?)">'
|
||||
else:
|
||||
patron = '<div class="captura"><a title="([^"]+)" href="([^"]+)".*?><img src="(.*?)"'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedtitle,scrapedurl,scrapedthumbnail in matches:
|
||||
scrapedplot = ""
|
||||
@@ -87,28 +75,7 @@ def escenas(item):
|
||||
next_page = scrapertools.find_single_match(data,'<li><a href=\'([^\']+)\' title=\'Pagina \d+\'>»</a>')
|
||||
if next_page!= "":
|
||||
next_page = urlparse.urljoin(item.url,next_page)
|
||||
itemlist.append( Item(channel=item.channel, action="escenas", title="Página Siguiente >>", text_color="blue",
|
||||
url=next_page) )
|
||||
return itemlist
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = '<div class="captura"><a title="([^"]+)" href="([^"]+)".*?><img src="(.*?)"'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedtitle,scrapedurl,scrapedthumbnail in matches:
|
||||
scrapedplot = ""
|
||||
url="https:" + scrapedurl
|
||||
thumbnail="https:" + scrapedthumbnail
|
||||
itemlist.append( Item(channel=item.channel, action="play", title=scrapedtitle, url=url, thumbnail=thumbnail,
|
||||
plot=scrapedplot) )
|
||||
next_page = scrapertools.find_single_match(data,'<li><a href=\'([^\']+)\' title=\'Pagina \d+\'>»</a>')
|
||||
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
|
||||
|
||||
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
#------------------------------------------------------------
|
||||
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://www.eroticage.net'
|
||||
|
||||
@@ -16,7 +14,7 @@ host = 'http://www.eroticage.net'
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Novedades" , action="peliculas", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Novedades" , action="lista", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Buscar", action="search"))
|
||||
return itemlist
|
||||
@@ -27,7 +25,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():
|
||||
@@ -45,12 +43,12 @@ def categorias(item):
|
||||
for scrapedurl,scrapedtitle in matches:
|
||||
scrapedplot = ""
|
||||
scrapedthumbnail = ""
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=scrapedurl,
|
||||
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
|
||||
@@ -67,8 +65,7 @@ def peliculas(item):
|
||||
next_page = scrapertools.find_single_match(data,'<a class="nextpostslink" rel="next" href="([^"]+)">')
|
||||
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
|
||||
|
||||
|
||||
|
||||
@@ -7,15 +7,14 @@ 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 = 'http://www.peliculaseroticasonline.tv'
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Peliculas" , action="peliculas", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Peliculas" , action="lista", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Buscar", action="search"))
|
||||
return itemlist
|
||||
@@ -26,7 +25,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():
|
||||
@@ -43,12 +42,12 @@ def categorias(item):
|
||||
for scrapedurl,scrapedtitle in matches:
|
||||
scrapedplot = ""
|
||||
scrapedthumbnail = ""
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=scrapedurl,
|
||||
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
|
||||
@@ -63,8 +62,7 @@ def peliculas(item):
|
||||
next_page = scrapertools.find_single_match(data, '<div class="naviright"><a href="([^"]+)">Siguiente »</a>')
|
||||
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
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"id": "estrenosdoramas",
|
||||
"name": "Estrenos Doramas",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["VOSE","LAT"],
|
||||
"thumbnail": "https://www.estrenosdoramas.net/wp-content/uploads/2016/08/estrenos-doramasss-net3.png",
|
||||
"banner": "",
|
||||
"categories": [
|
||||
"tvshow",
|
||||
"vos"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostrar enlaces en idioma...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"No filtrar",
|
||||
"VOSE",
|
||||
"VO",
|
||||
"LAT"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,296 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- Channel Estreno Doramas -*-
|
||||
# -*- Created for Alfa-addon -*-
|
||||
# -*- By the BDamian (Based on channels from Alfa Develop Group) -*-
|
||||
|
||||
import re
|
||||
|
||||
from channels import autoplay
|
||||
from channels import filtertools
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core import jsontools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
from channelselector import get_thumb
|
||||
import ast
|
||||
|
||||
host = 'https://www.estrenosdoramas.net/'
|
||||
|
||||
IDIOMAS = {'Latino': 'LAT', 'Vo':'VO', 'Vose': 'VOSE'}
|
||||
IDIOMA = "no filtrar"
|
||||
list_language = IDIOMAS.values()
|
||||
list_quality = []
|
||||
list_servers = ['openload', 'streamango', 'netutv', 'okru', 'mp4upload']
|
||||
|
||||
def get_source(url, referer=None):
|
||||
logger.info()
|
||||
if referer is None:
|
||||
data = httptools.downloadpage(url).data
|
||||
else:
|
||||
data = httptools.downloadpage(url, headers={'Referer':referer}).data
|
||||
data = re.sub(r'\n|\r|\t| |<br>|\s{2,}', "", data)
|
||||
return data
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
itemlist = []
|
||||
|
||||
itemlist.append(Item(channel= item.channel, title="Doramas", action="list_all",
|
||||
url=host + 'category/doramas-online',
|
||||
thumbnail=get_thumb('doramas', auto=True), type='dorama'))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title="Películas", action="list_all",
|
||||
url=host + 'category/peliculas',
|
||||
thumbnail=get_thumb('movies', auto=True), type='movie'))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title="Últimos capítulos", action="list_all",
|
||||
url=host + 'category/ultimos-capitulos-online',
|
||||
thumbnail=get_thumb('doramas', auto=True), type='movie'))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title="Por Genero", action="menu_generos",
|
||||
url=host,
|
||||
thumbnail=get_thumb('doramas', auto=True), type='dorama'))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title="Doblado Latino", action="list_all",
|
||||
url=host + 'category/latino',
|
||||
thumbnail=get_thumb('doramas', auto=True), type='dorama'))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title = 'Buscar', action="search", url= host+'search/',
|
||||
thumbnail=get_thumb('search', auto=True)))
|
||||
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def menu_generos(item):
|
||||
logger.info()
|
||||
|
||||
data = get_source(item.url)
|
||||
data = scrapertools.find_single_match(data, '<div id="genuno">(.*?)</div>')
|
||||
|
||||
itemlist = []
|
||||
|
||||
patron = '<li><a.*?href="(.*?)">(.*?)</a>.*?</li>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
media_type = item.type
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
new_item = Item(channel=item.channel, title=scrapedtitle, url=scrapedurl,
|
||||
thumbnail=item.thumbnail, type=item.type, action="list_all")
|
||||
itemlist.append(new_item)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def list_all(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
data = get_source(item.url)
|
||||
data = scrapertools.find_single_match(data, '<h3 class="widgetitulo">Resultados</h3>.*?<div id="sidebar-wrapper">')
|
||||
|
||||
patron = '<div.*?<a href="(.*?)"><img src="(.*?)" alt="(.*?)".*?</a>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle in matches:
|
||||
new_item = Item(channel=item.channel, title=scrapedtitle, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail)
|
||||
if scrapedtitle.startswith("Pelicula") or item.type == "movie":
|
||||
new_item.action = 'findvideos'
|
||||
new_item.contentTitle = scrapedtitle
|
||||
else:
|
||||
new_item.contentSerieName=scrapedtitle
|
||||
new_item.action = 'episodios'
|
||||
itemlist.append(new_item)
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
# Paginacion
|
||||
patron = '<a class="nextpostslink" rel="next" href="(.*?)">'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
if matches:
|
||||
itemlist.append(Item(channel=item.channel, action="list_all", title='Siguiente >>>',
|
||||
url=matches[0], type=item.type))
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodios(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = get_source(item.url)
|
||||
|
||||
plot_regex = '(<span class="clms"><b>Nombre.*?)<\/div>'
|
||||
plot_match = re.compile(plot_regex, re.DOTALL).findall(data)
|
||||
if plot_match:
|
||||
plot = scrapertools.htmlclean(plot_match[0].replace('<br />', '\n'))
|
||||
|
||||
data = scrapertools.find_single_match(data, '<ul class="lcp_catlist".*?</ul>')
|
||||
patron = '<li.*?<a href="(.*?)" title="(.*?)">.*?(\d*?)<\/a>'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
infoLabels = item.infoLabels
|
||||
|
||||
for scrapedurl, scrapedtitle, scrapedep in matches:
|
||||
if item.url == scrapedurl:
|
||||
continue
|
||||
url = scrapedurl
|
||||
contentEpisodeNumber = scrapedep
|
||||
if contentEpisodeNumber == "":
|
||||
title = '1xEE - ' + scrapedtitle
|
||||
else:
|
||||
title = '1x' + ("0" + contentEpisodeNumber)[-2:] + " - " + scrapedtitle
|
||||
# title = ("0" + contentEpisodeNumber)[-2:]
|
||||
|
||||
infoLabels['season'] = 1
|
||||
infoLabels['episode'] = contentEpisodeNumber
|
||||
infoLabels = item.infoLabels
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action="findvideos", title=title, url=url, plot=plot,
|
||||
contentEpisodeNumber=contentEpisodeNumber, type='episode', infoLabels=infoLabels))
|
||||
|
||||
itemlist.sort(key=lambda x: x.title)
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||
itemlist.append(
|
||||
item.clone(title="Añadir esta serie a la videoteca", action="add_serie_to_library", extra="episodios", text_color='yellow'))
|
||||
return itemlist
|
||||
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
data = get_source(item.url)
|
||||
data = scrapertools.find_single_match(data, '<div id="marco-post">.*?<div id="sidebar">')
|
||||
data = scrapertools.unescape(data)
|
||||
data = scrapertools.decodeHtmlentities(data)
|
||||
|
||||
options_regex = '<a href="#tab.*?">.*?<b>(.*?)</b>'
|
||||
option_matches = re.compile(options_regex, re.DOTALL).findall(data)
|
||||
|
||||
video_regex = '<iframe.*?src="(.*?)".*?</iframe>'
|
||||
video_matches = re.compile(video_regex, re.DOTALL).findall(data)
|
||||
|
||||
# for option, scrapedurl in matches:
|
||||
for option, scrapedurl in map(None, option_matches, video_matches):
|
||||
if scrapedurl is None:
|
||||
continue
|
||||
|
||||
scrapedurl = scrapedurl.replace('"','').replace('&','&')
|
||||
logger.info(scrapedurl)
|
||||
try:
|
||||
data_video = get_source(scrapedurl)
|
||||
except Exception as e:
|
||||
logger.info('Error en url: ' + scrapedurl)
|
||||
continue
|
||||
|
||||
# logger.info(data_video)
|
||||
|
||||
# Este sitio pone multiples páginas intermedias, cada una con sus reglas.
|
||||
source_headers = dict()
|
||||
source_headers["Content-Type"] = "application/x-www-form-urlencoded; charset=UTF-8"
|
||||
source_headers["X-Requested-With"] = "XMLHttpRequest"
|
||||
if scrapedurl.find("https://repro") != 0:
|
||||
logger.info("Caso 0: url externa")
|
||||
url = scrapedurl
|
||||
itemlist.append(Item(channel=item.channel, title=option, url=url, action='play', language=IDIOMA))
|
||||
elif scrapedurl.find("pi76823.php") > 0:
|
||||
logger.info("Caso 1")
|
||||
source_data = get_source(scrapedurl)
|
||||
source_regex = 'post\( "(.*?)", { acc: "(.*?)", id: \'(.*?)\', tk: \'(.*?)\' }'
|
||||
source_matches = re.compile(source_regex, re.DOTALL).findall(source_data)
|
||||
for source_page, source_acc, source_id, source_tk in source_matches:
|
||||
source_url = scrapedurl[0:scrapedurl.find("pi76823.php")] + source_page
|
||||
source_result = httptools.downloadpage(source_url, 'acc=' + source_acc + '&id=' +
|
||||
source_id + '&tk=' + source_tk, source_headers)
|
||||
if source_result.code == 200:
|
||||
source_json = jsontools.load(source_result.data)
|
||||
itemlist.append(Item(channel=item.channel, title=option, url=source_json['urlremoto'], action='play', language=IDIOMA))
|
||||
elif scrapedurl.find("pi7.php") > 0:
|
||||
logger.info("Caso 2")
|
||||
source_data = get_source(scrapedurl)
|
||||
source_regex = 'post\( "(.*?)", { acc: "(.*?)", id: \'(.*?)\', tk: \'(.*?)\' }'
|
||||
source_matches = re.compile(source_regex, re.DOTALL).findall(source_data)
|
||||
for source_page, source_acc, source_id, source_tk in source_matches:
|
||||
source_url = scrapedurl[0:scrapedurl.find("pi7.php")] + source_page
|
||||
source_result = httptools.downloadpage(source_url, 'acc=' + source_acc + '&id=' +
|
||||
source_id + '&tk=' + source_tk, source_headers)
|
||||
if source_result.code == 200:
|
||||
source_json = jsontools.load(source_result.data)
|
||||
itemlist.append(Item(channel=item.channel, title=option, url=source_json['urlremoto'], action='play', language=IDIOMA))
|
||||
elif scrapedurl.find("reproducir120.php") > 0:
|
||||
logger.info("Caso 3")
|
||||
source_data = get_source(scrapedurl)
|
||||
|
||||
videoidn = scrapertools.find_single_match(source_data, 'var videoidn = \'(.*?)\';')
|
||||
tokensn = scrapertools.find_single_match(source_data, 'var tokensn = \'(.*?)\';')
|
||||
|
||||
source_regex = 'post\( "(.*?)", { acc: "(.*?)"'
|
||||
source_matches = re.compile(source_regex, re.DOTALL).findall(source_data)
|
||||
for source_page, source_acc in source_matches:
|
||||
source_url = scrapedurl[0:scrapedurl.find("reproducir120.php")] + source_page
|
||||
source_result = httptools.downloadpage(source_url, 'acc=' + source_acc + '&id=' +
|
||||
videoidn + '&tk=' + tokensn, source_headers)
|
||||
if source_result.code == 200:
|
||||
source_json = jsontools.load(source_result.data)
|
||||
urlremoto_regex = "file:'(.*?)'"
|
||||
urlremoto_matches = re.compile(urlremoto_regex, re.DOTALL).findall(source_json['urlremoto'])
|
||||
if len(urlremoto_matches) == 1:
|
||||
itemlist.append(Item(channel=item.channel, title=option, url=urlremoto_matches[0], action='play', language=IDIOMA))
|
||||
elif scrapedurl.find("reproducir14.php") > 0:
|
||||
logger.info("Caso 4")
|
||||
source_data = get_source(scrapedurl)
|
||||
|
||||
source_regex = '<div id="player-contenido" vid="(.*?)" name="(.*?)"'
|
||||
source_matches = re.compile(source_regex, re.DOTALL).findall(source_data)
|
||||
videoidn = source_matches[0][0]
|
||||
tokensn = source_matches[0][1]
|
||||
|
||||
source_regex = 'post\( "(.*?)", { acc: "(.*?)"'
|
||||
source_matches = re.compile(source_regex, re.DOTALL).findall(source_data)
|
||||
for source_page, source_acc in source_matches:
|
||||
source_url = scrapedurl[0:scrapedurl.find("reproducir14.php")] + source_page
|
||||
source_result = httptools.downloadpage(source_url, 'acc=' + source_acc + '&id=' +
|
||||
videoidn + '&tk=' + tokensn, source_headers)
|
||||
if source_result.code == 200:
|
||||
source_json = jsontools.load(source_result.data)
|
||||
itemlist.append(Item(channel=item.channel, title=option, url=source_json['urlremoto'], action='play', language=IDIOMA))
|
||||
else:
|
||||
logger.info("Caso nuevo")
|
||||
|
||||
itemlist = servertools.get_servers_itemlist(itemlist)
|
||||
|
||||
# Requerido para FilterTools
|
||||
itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
|
||||
# Requerido para AutoPlay
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos':
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]', url=item.url,
|
||||
action="add_pelicula_to_library", extra="findvideos", contentTitle=item.contentTitle))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info()
|
||||
import urllib
|
||||
itemlist = []
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = item.url + texto
|
||||
item.type = 'search'
|
||||
if texto != '':
|
||||
try:
|
||||
return list_all(item)
|
||||
except:
|
||||
itemlist.append(item.clone(url='', title='No hay elementos...', action=''))
|
||||
return itemlist
|
||||
@@ -7,8 +7,6 @@ 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://fapality.com'
|
||||
|
||||
@@ -16,9 +14,9 @@ host = 'https://fapality.com'
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Nuevas" , action="peliculas", url=host + "/newest/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas Vistas" , action="peliculas", url=host + "/popular/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mejor valorada" , action="peliculas", url=host + "/top/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Nuevas" , action="lista", url=host + "/newest/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas Vistas" , action="lista", url=host + "/popular/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mejor valorada" , action="lista", url=host + "/top/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Canal" , action="categorias", url=host + "/channels/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host + "/categories/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Buscar", action="search"))
|
||||
@@ -30,7 +28,7 @@ def search(item, texto):
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = host + "/search/?q=%s" % texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
return lista(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -51,12 +49,12 @@ def categorias(item):
|
||||
scrapedplot = ""
|
||||
scrapedtitle = scrapedtitle.replace("movies", "") + " (" + cantidad + ")"
|
||||
scrapedurl = urlparse.urljoin(item.url,scrapedurl)
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=scrapedurl,
|
||||
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
|
||||
@@ -75,8 +73,7 @@ def peliculas(item):
|
||||
next_page_url = scrapertools.find_single_match(data,'<li itemprop="url" class="current">.*?<a href="([^"]+)"')
|
||||
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) )
|
||||
itemlist.append(item.clone(action="lista", title="Página Siguiente >>", text_color="blue", url=next_page_url) )
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
@@ -7,8 +7,6 @@ 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.fetishshrine.com'
|
||||
|
||||
@@ -16,9 +14,9 @@ host = 'https://www.fetishshrine.com'
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Nuevas" , action="peliculas", url=host + "/latest-updates/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Popular" , action="peliculas", url=host + "/most-popular/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mejor Valorado" , action="peliculas", url=host + "/top-rated/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Nuevas" , action="lista", url=host + "/latest-updates/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Popular" , action="lista", url=host + "/most-popular/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mejor Valorado" , action="lista", url=host + "/top-rated/"))
|
||||
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
|
||||
@@ -29,7 +27,7 @@ def search(item, texto):
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = host + "/search/?q=%s" % texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
return lista(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -42,21 +40,26 @@ def categorias(item):
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<a href="([^"]+)" title="([^"]+) porn tube" class="thumb">.*?<img src="([^"]+)".*?<span class="total">([^"]+)</span>'
|
||||
patron = '<a href="([^"]+)" title="([^"]+)">.*?'
|
||||
patron += '<img src="([^"]+)".*?'
|
||||
patron += '<span class="vids">(\d+)</span>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail,cantidad in matches:
|
||||
scrapedplot = ""
|
||||
scrapedtitle = scrapedtitle + " (" + cantidad + ")"
|
||||
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 = scrapertools.cachePage(item.url)
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<a itemprop="url" href="([^"]+)">.*?<img src="([^"]+)".*?alt="([^"]+)">.*?<span class="duration">(.*?)</span>'
|
||||
patron = '<a href="([^"]+)" itemprop="url">.*?'
|
||||
patron += '<img src="([^"]+)" alt="([^"]+)">.*?'
|
||||
patron += '<span itemprop="duration" class="length">(.*?)</span>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedthumbnail,scrapedtitle,duracion in matches:
|
||||
url = scrapedurl
|
||||
@@ -65,11 +68,12 @@ def peliculas(item):
|
||||
thumbnail = scrapedthumbnail
|
||||
plot = ""
|
||||
year = ""
|
||||
itemlist.append( Item(channel=item.channel, action="play" , title=title , url=url, thumbnail=thumbnail, plot=plot, contentTitle = contentTitle, infoLabels={'year':year} ))
|
||||
next_page_url = scrapertools.find_single_match(data,'<li class="next"><a.*?href="([^"]+)" title="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="play", title=title, url=url, thumbnail=thumbnail,
|
||||
plot=plot, contentTitle = contentTitle, infoLabels={'year':year} ))
|
||||
next_page = scrapertools.find_single_match(data,'<li><a data=\'\d+\' href="([^"]+)" title="Next">')
|
||||
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
|
||||
|
||||
|
||||
|
||||
@@ -2,14 +2,11 @@
|
||||
#------------------------------------------------------------
|
||||
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
|
||||
from core import jsontools
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
@@ -19,19 +16,21 @@ def mainlist(item):
|
||||
item.url = "http://www.filmovix.net/videoscategory/porno/"
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = scrapertools.get_match(data,'<h1 class="cat_head">XXX</h1>(.*?)<h3> Novo dodato </h3>')
|
||||
patron = '<li class="clearfix">.*?src="([^"]+)".*?<p class="title"><a href="([^"]+)" rel="bookmark" title="([^"]+)">'
|
||||
patron = '<li class="clearfix">.*?'
|
||||
patron += 'src="([^"]+)".*?'
|
||||
patron += '<p class="title"><a href="([^"]+)" rel="bookmark" title="([^"]+)">'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedthumbnail,scrapedurl,scrapedtitle in matches:
|
||||
contentTitle = scrapedtitle
|
||||
title = scrapedtitle
|
||||
thumbnail = scrapedthumbnail
|
||||
plot = ""
|
||||
year = ""
|
||||
itemlist.append( Item(channel=item.channel, action="play" , title=title , url=scrapedurl, thumbnail=thumbnail, plot=plot, contentTitle=contentTitle, infoLabels={'year':year} ))
|
||||
itemlist.append( Item(channel=item.channel, action="play", title=title, url=scrapedurl,
|
||||
thumbnail=thumbnail, plot=plot, contentTitle=contentTitle))
|
||||
next_page_url = scrapertools.find_single_match(data,'<a class="nextpostslink" rel="next" href="([^"]+)">')
|
||||
if next_page_url!="":
|
||||
next_page_url = urlparse.urljoin(item.url,next_page_url)
|
||||
itemlist.append( Item(channel=item.channel , action="mainlist" , title="Página Siguiente >>" , text_color="blue", url=next_page_url , folder=True) )
|
||||
itemlist.append(item.clone(action="mainlist", title="Página Siguiente >>", text_color="blue", url=next_page_url) )
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -39,7 +38,6 @@ def play(item):
|
||||
logger.info()
|
||||
data = scrapertools.cachePage(item.url)
|
||||
itemlist = servertools.find_video_items(data=data)
|
||||
|
||||
for videoitem in itemlist:
|
||||
videoitem.title = item.title
|
||||
videoitem.fulltitle = item.fulltitle
|
||||
|
||||
@@ -2,14 +2,11 @@
|
||||
#------------------------------------------------------------
|
||||
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
|
||||
from core import jsontools
|
||||
|
||||
host = 'http://www.streamxxxx.com'
|
||||
|
||||
@@ -17,7 +14,7 @@ host = 'http://www.streamxxxx.com'
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Peliculas" , action="peliculas", url= host))
|
||||
itemlist.append( Item(channel=item.channel, title="Peliculas" , action="lista", url= host))
|
||||
itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url= host))
|
||||
return itemlist
|
||||
|
||||
@@ -32,11 +29,12 @@ def categorias(item):
|
||||
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
|
||||
@@ -48,10 +46,11 @@ def peliculas(item):
|
||||
scrapertools.printMatches(matches)
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail in matches:
|
||||
plot = ""
|
||||
itemlist.append( Item(channel=item.channel, action="findvideos", title=scrapedtitle , fulltitle=scrapedtitle, url=scrapedurl , thumbnail=scrapedthumbnail , plot=plot , viewmode="movie", folder=True) )
|
||||
next_page_url = scrapertools.find_single_match(data,'<a href="([^"]+)">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="findvideos", title=scrapedtitle, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail , plot=plot , viewmode="movie") )
|
||||
next_page = scrapertools.find_single_match(data,'<a href="([^"]+)">Next')
|
||||
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
|
||||
|
||||
|
||||
@@ -7,15 +7,13 @@ 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 = 'http://es.foxtube.com'
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Peliculas" , action="peliculas", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Ultimos" , action="lista", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Buscar", action="search"))
|
||||
return itemlist
|
||||
@@ -26,7 +24,7 @@ def search(item, texto):
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = host + "/buscador/%s" % texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
return lista(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -45,29 +43,37 @@ def categorias(item):
|
||||
for scrapedurl,scrapedtitle in matches:
|
||||
scrapedplot = ""
|
||||
scrapedthumbnail = ""
|
||||
scrapedurl = host + scrapedurl
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle , url=scrapedurl , thumbnail=scrapedthumbnail , plot=scrapedplot , folder=True) )
|
||||
scrapedurl = urlparse.urljoin(item.url,scrapedurl)
|
||||
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 = scrapertools.cachePage(item.url)
|
||||
patron = '<a class="thumb tco1" href="([^"]+)">.*?src="([^"]+)".*?alt="([^"]+)".*?<i class="m tc2">(.*?)</i>'
|
||||
patron = '<a class="thumb tco1" href="([^"]+)">.*?'
|
||||
patron += 'src="([^"]+)".*?'
|
||||
patron += 'alt="([^"]+)".*?'
|
||||
patron += '<span class="t">(.*?)</span>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedthumbnail,scrapedtitle,duracion in matches:
|
||||
url = host + scrapedurl
|
||||
title = "[COLOR yellow]" + duracion + "[/COLOR] " + scrapedtitle
|
||||
contentTitle = title
|
||||
url = urlparse.urljoin(item.url,scrapedurl)
|
||||
contentTitle = scrapedtitle
|
||||
time = scrapertools.find_single_match(duracion, '<i class="m tc2">([^"]+)</i>')
|
||||
if not 'HD' in duracion :
|
||||
title = "[COLOR yellow]" + time + "[/COLOR] " + scrapedtitle
|
||||
else:
|
||||
title = "[COLOR yellow]" + time + "[/COLOR] " + "[COLOR red]" + "HD" + "[/COLOR] " + scrapedtitle
|
||||
thumbnail = scrapedthumbnail + "|Referer=%s" %host
|
||||
plot = ""
|
||||
year = ""
|
||||
itemlist.append( Item(channel=item.channel, action="play" , title=title , url=url, thumbnail=thumbnail, plot=plot, contentTitle = contentTitle, infoLabels={'year':year} ))
|
||||
next_page_url = scrapertools.find_single_match(data,'<a class="bgco2 tco3" rel="next" href="([^"]+)">></a>')
|
||||
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=url, thumbnail=thumbnail,
|
||||
plot=plot, contentTitle = contentTitle))
|
||||
next_page = scrapertools.find_single_match(data,'<a class="bgco2 tco3" rel="next" href="([^"]+)">></a>')
|
||||
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
|
||||
|
||||
|
||||
@@ -76,7 +82,7 @@ def play(item):
|
||||
itemlist = []
|
||||
url = scrapertools.find_single_match(scrapertools.cachePage(item.url),'<iframe src="([^"]+)"')
|
||||
data = httptools.downloadpage(url).data
|
||||
patron = 'html5player.setVideoUrlHigh\\(\'([^\']+)\''
|
||||
patron = 'html5player.setVideoHLS\\(\'([^\']+)\''
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for scrapedurl in matches:
|
||||
scrapedurl = scrapedurl.replace("\/", "/")
|
||||
|
||||
@@ -7,16 +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://frprn.com'
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Nuevas" , action="peliculas", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Mejor valorada" , action="peliculas", url=host + "/top-raped/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Nuevas" , action="lista", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Mejor valorada" , action="lista", url=host + "/top-raped/"))
|
||||
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
|
||||
@@ -27,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():
|
||||
@@ -40,22 +39,30 @@ def categorias(item):
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<li class="thumb thumb-category">.*?<a href="([^"]+)">.*?<img class="lazy" data-original="([^"]+)">.*?<div class="name">([^"]+)</div>.*?<div class="count">(\d+)</div>'
|
||||
patron = '<li class="thumb thumb-category">.*?'
|
||||
patron += '<a href="([^"]+)">.*?'
|
||||
patron += '<img class="lazy" data-original="([^"]+)">.*?'
|
||||
patron += '<div class="name">([^"]+)</div>.*?'
|
||||
patron += '<div class="count">(\d+)</div>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedthumbnail,scrapedtitle,cantidad in matches:
|
||||
scrapedplot = ""
|
||||
scrapedtitle = scrapedtitle + " (" + cantidad + ")"
|
||||
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="lista", title=scrapedtitle, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail , plot=scrapedplot) )
|
||||
return itemlist
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
def lista(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = scrapertools.cachePage(item.url)
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<div class="thumb">.*?<a href="([^"]+)".*?<img class="lazy" data-original="([^"]+)" alt="([^"]+)".*?<span class="duration">([^"]+)</span>'
|
||||
patron = '<div class="thumb">.*?'
|
||||
patron += '<a href="([^"]+)".*?'
|
||||
patron += '<img class="lazy" data-original="([^"]+)" alt="([^"]+)".*?'
|
||||
patron += '<span class="duration">([^"]+)</span>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedthumbnail,scrapedtitle,duracion in matches:
|
||||
url = urlparse.urljoin(item.url,scrapedurl)
|
||||
@@ -64,11 +71,12 @@ def peliculas(item):
|
||||
thumbnail = scrapedthumbnail
|
||||
plot = ""
|
||||
year = ""
|
||||
itemlist.append( Item(channel=item.channel, action="play" , title=title , url=url, thumbnail=thumbnail, plot=plot, contentTitle = contentTitle, infoLabels={'year':year} ))
|
||||
next_page_url = scrapertools.find_single_match(data,'<li class="pagination-next"><a href="([^"]+)">')
|
||||
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=url, thumbnail=thumbnail,
|
||||
plot=plot, contentTitle = contentTitle))
|
||||
next_page = scrapertools.find_single_match(data,'<li class="pagination-next"><a href="([^"]+)">')
|
||||
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
|
||||
|
||||
|
||||
|
||||
@@ -2,14 +2,11 @@
|
||||
#------------------------------------------------------------
|
||||
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
|
||||
from core import jsontools
|
||||
|
||||
host = 'http://freepornstreams.org'
|
||||
|
||||
@@ -17,8 +14,8 @@ host = 'http://freepornstreams.org'
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Peliculas" , action="peliculas", url=host + "/free-full-porn-movies/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Videos" , action="peliculas", url=host + "/free-stream-porn/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Peliculas" , action="lista", url=host + "/free-full-porn-movies/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Videos" , action="lista", url=host + "/free-stream-porn/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Canal" , action="catalogo", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Categoria" , action="categorias", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Buscar", action="search"))
|
||||
@@ -30,7 +27,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():
|
||||
@@ -49,7 +46,7 @@ def catalogo(item):
|
||||
for scrapedurl,scrapedtitle in matches:
|
||||
scrapedplot = ""
|
||||
scrapedthumbnail = ""
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=scrapedurl,
|
||||
itemlist.append( Item(channel=item.channel, action="lista", title=scrapedtitle, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail, plot=scrapedplot) )
|
||||
return itemlist
|
||||
|
||||
@@ -65,12 +62,12 @@ def categorias(item):
|
||||
scrapedplot = ""
|
||||
scrapedthumbnail = ""
|
||||
scrapedurl = scrapedurl.replace ("http://freepornstreams.org/freepornst/stout.php?s=100,75,65:*&u=" , "")
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=scrapedurl,
|
||||
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
|
||||
@@ -85,11 +82,10 @@ def peliculas(item):
|
||||
plot = ""
|
||||
itemlist.append( Item(channel=item.channel, action="play", title=title, url=scrapedurl, thumbnail=thumbnail,
|
||||
plot=plot, fulltitle=title) )
|
||||
next_page_url = scrapertools.find_single_match(data, '<div class="nav-previous"><a href="([^"]+)"')
|
||||
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) )
|
||||
next_page = scrapertools.find_single_match(data, '<div class="nav-previous"><a href="([^"]+)"')
|
||||
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
|
||||
|
||||
|
||||
|
||||
@@ -4,35 +4,59 @@
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["cast", "lat"],
|
||||
"thumbnail": "http://www.gnula.mobi/wp-content/uploads/2018/05/Captura-1.png?%3E",
|
||||
"thumbnail": "https://gnula.mobi/wp-content/uploads/2018/12/gnula-logo.png",
|
||||
"banner": "",
|
||||
"categories": [
|
||||
"movie"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostrar enlaces en idioma...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"No filtrar",
|
||||
"LAT",
|
||||
"ESP",
|
||||
"VOSE"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "modo_grafico",
|
||||
"type": "bool",
|
||||
"label": "Buscar información extra",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "comprueba_enlaces",
|
||||
"type": "bool",
|
||||
"label": "Verificar si los enlaces existen",
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_castellano",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Castellano",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_latino",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Latino",
|
||||
"default": true,
|
||||
"id": "comprueba_enlaces_num",
|
||||
"type": "list",
|
||||
"label": "Número de enlaces a verificar",
|
||||
"default": 1,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
"visible": "eq(-1,true)",
|
||||
"lvalues": [ "5", "10", "15", "20" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -3,36 +3,60 @@
|
||||
# Alfa
|
||||
# ------------------------------------------------------------
|
||||
|
||||
import re
|
||||
import re, urllib, urlparse
|
||||
import base64
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core import tmdb
|
||||
from channels import autoplay
|
||||
from platformcode import config, logger, platformtools
|
||||
from core.item import Item
|
||||
from platformcode import logger
|
||||
from core import httptools, scrapertools, jsontools, tmdb
|
||||
from core import servertools
|
||||
from channels import filtertools
|
||||
|
||||
host = 'http://www.gnula.mobi'
|
||||
|
||||
IDIOMAS = {'Latino': 'LAT', 'Castellano': 'ESP', 'Subtitulado': 'VOSE'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['rapidvideo', 'streamgo', 'openload']
|
||||
|
||||
list_quality = ['HD', 'BR-S', 'TS']
|
||||
|
||||
__channel__='gmobi'
|
||||
__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', __channel__)
|
||||
__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', __channel__)
|
||||
|
||||
|
||||
try:
|
||||
__modo_grafico__ = config.get_setting('modo_grafico', __channel__)
|
||||
except:
|
||||
__modo_grafico__ = True
|
||||
|
||||
|
||||
host = 'http://www.gnula.mobi/'
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = list()
|
||||
itemlist.append(item.clone(title="Novedades", action="peliculas", url=host))
|
||||
itemlist.append(item.clone(title="Castellano", action="peliculas",
|
||||
url="http://www.gnula.mobi/tag/espanol/"))
|
||||
itemlist.append(item.clone(title="Latino", action="peliculas", url="http://gnula.mobi/tag/latino/"))
|
||||
itemlist.append(item.clone(title="VOSE", action="peliculas", url="http://gnula.mobi/tag/subtitulada/"))
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
itemlist.append(item.clone(title="Novedades", action="lista", url=host + "/categorias/estrenos"))
|
||||
itemlist.append(item.clone(title="Categorias" , action="categorias", url= host))
|
||||
itemlist.append(item.clone(title="Buscar", action="search"))
|
||||
itemlist.append(item.clone(title="Configurar canal...", text_color="gold", action="configuracion", folder=False))
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
def configuracion(item):
|
||||
ret = platformtools.show_channel_settings()
|
||||
platformtools.itemlist_refresh()
|
||||
return ret
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info()
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = "http://gnula.mobi/?s=%s" % texto
|
||||
item.url = host + "/?s=%s" % texto
|
||||
|
||||
try:
|
||||
return sub_search(item)
|
||||
return lista(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -40,55 +64,49 @@ def search(item, texto):
|
||||
return []
|
||||
|
||||
|
||||
def sub_search(item):
|
||||
def categorias(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
|
||||
patron = '<div class="row">.*?<a href="([^"]+)" title="([^"]+)">.*?<img src="(.*?)" title'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
|
||||
for url, name, img in matches:
|
||||
itemlist.append(item.clone(title=name, url=url, action="findvideos", thumbnail=img))
|
||||
|
||||
paginacion = scrapertools.find_single_match(data, '<a href="([^"]+)" ><i class="glyphicon '
|
||||
'glyphicon-chevron-right" aria-hidden="true"></i>')
|
||||
|
||||
if paginacion:
|
||||
itemlist.append(Item(channel=item.channel, action="sub_search", title="Next page >>", url=paginacion))
|
||||
|
||||
data = scrapertools.get_match(data,'<a>CATEGORÍAS</a>(.*?)</ul>')
|
||||
patron = '<a href="([^"]+)">([^"]+)</a>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle in matches:
|
||||
scrapedplot = ""
|
||||
scrapedthumbnail = ""
|
||||
itemlist.append(item.clone(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 = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<div class="col-mt-5 postsh">.*?href="(.*?)" title="(.*?)".*?<.*?src="(.*?)"'
|
||||
patron = '<article id="post-\d+".*?'
|
||||
patron += '<a href="([^"]+)".*?'
|
||||
patron += '<div class="Image">(.*?)</div>.*?'
|
||||
patron += '"Title">([^"]+)</h2>.*?'
|
||||
patron += '"Year">(\d+)</span>.*?'
|
||||
patron += '<span class="Qlty">\w+ \(([^"]+)\)</span>'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for scrapedurl, scrapedtitle, scrapedthumbnail in matches:
|
||||
filter_thumb = scrapedthumbnail.replace("http://image.tmdb.org/t/p/w300", "")
|
||||
filter_list = {"poster_path": filter_thumb}
|
||||
filter_list = filter_list.items()
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
title=scrapedtitle,
|
||||
fulltitle = scrapedtitle,
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail,
|
||||
infoLabels={'filtro': filter_list}))
|
||||
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedyear, calidad in matches:
|
||||
thumbnail = scrapertools.find_single_match(scrapedthumbnail, 'src="([^"]+)"')
|
||||
scrapedtitle = scrapedtitle.replace("(%s)" % scrapedyear, "")
|
||||
if not config.get_setting('unify'):
|
||||
title = title = '%s [COLOR red] %s [/COLOR] (%s)' % (scrapedtitle, calidad , scrapedyear)
|
||||
else:
|
||||
title = ''
|
||||
if not '>TV<' in scrapedthumbnail:
|
||||
itemlist.append(item.clone(action="findvideos", title=title, url=scrapedurl, thumbnail=thumbnail,
|
||||
contentTitle = scrapedtitle, quality=calidad, infoLabels={'year':scrapedyear}) )
|
||||
tmdb.set_infoLabels(itemlist, True)
|
||||
next_page_url = scrapertools.find_single_match(data, '<link rel="next" href="(.*?)"')
|
||||
next_page_url = scrapertools.find_single_match(data, '<a class="next page-numbers" href="([^"]+)"')
|
||||
if next_page_url != "":
|
||||
next_page_url = next_page_url
|
||||
itemlist.append(item.clone(action="peliculas", title="Siguiente >>", text_color="yellow",
|
||||
itemlist.append(item.clone(action="lista", title="Siguiente >>", text_color="yellow",
|
||||
url=next_page_url))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -96,50 +114,46 @@ def findvideos(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = 'data-src="([^"]+)".*?'
|
||||
patron += 'data-toggle="tab">([^<]+)'
|
||||
patron = '"server":"[^"]+",'
|
||||
patron += '"lang":"([^"]+)",'
|
||||
patron += '"quality":"\w+ \(([^"]+)\)",'
|
||||
patron += '"link":"https:.*?=([^"]+)"'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for url, language in matches:
|
||||
url = url.replace("&", "&")
|
||||
response = httptools.downloadpage(url, follow_redirects=False, add_referer=True)
|
||||
if response.data:
|
||||
url = scrapertools.find_single_match(response.data, 'src="([^"]+)"')
|
||||
for lang, quality, url in matches:
|
||||
if lang in IDIOMAS:
|
||||
lang = IDIOMAS[lang]
|
||||
url = base64.b64decode(url + "==")
|
||||
if not config.get_setting('unify'):
|
||||
title = '[COLOR red] %s [/COLOR] (%s)' % (quality , lang)
|
||||
else:
|
||||
url = response.headers.get("location", "")
|
||||
url = url.replace(""","")
|
||||
titulo = "Ver en %s (" + language + ")"
|
||||
itemlist.append(item.clone(
|
||||
action = "play",
|
||||
title = titulo,
|
||||
url = url,
|
||||
language = language))
|
||||
tmdb.set_infoLabels(itemlist, True)
|
||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||
title = ''
|
||||
itemlist.append(item.clone(action = "play", title = '%s'+ title, url = url, language=lang, quality=quality,
|
||||
fulltitle = item.title))
|
||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||
# Requerido para Filtrar enlaces
|
||||
if __comprueba_enlaces__:
|
||||
itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__)
|
||||
# Requerido para FilterTools
|
||||
itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
# Requerido para AutoPlay
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra !='findvideos' :
|
||||
itemlist.append(Item(channel=item.channel, action="add_pelicula_to_library",
|
||||
title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]', url=item.url,
|
||||
extra="findvideos", contentTitle=item.contentTitle))
|
||||
return itemlist
|
||||
|
||||
|
||||
def play(item):
|
||||
item.thumbnail = item.contentThumbnail
|
||||
return [item]
|
||||
|
||||
def newest(categoria):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
if categoria == 'peliculas':
|
||||
item.url = host
|
||||
elif categoria == 'castellano':
|
||||
item.url = host +'tag/espanol/'
|
||||
elif categoria == 'latino':
|
||||
item.url = host +'tag/latino/'
|
||||
itemlist = peliculas(item)
|
||||
if "Pagina" in itemlist[-1].title:
|
||||
itemlist.pop()
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
data = scrapertools.cachePage(item.url)
|
||||
itemlist = servertools.find_video_items(data=data)
|
||||
for videoitem in itemlist:
|
||||
videoitem.title = item.fulltitle
|
||||
videoitem.fulltitle = item.fulltitle
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
videoitem.channel = item.channel
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
{
|
||||
"id": "goodpelis",
|
||||
"name": "GoodPelis",
|
||||
"active": false,
|
||||
"adult": false,
|
||||
"language": ["lat"],
|
||||
"thumbnail": "http://goodpelis.net/wp-content/uploads/2017/11/Logo-GP.png",
|
||||
"banner": "",
|
||||
"categories": [
|
||||
"movie"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_latino",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Latino",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_peliculas",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Peliculas",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_infantiles",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Infantiles",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_terror",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Terror",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,354 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- Channel GoodPelis -*-
|
||||
# -*- Created for Alfa-addon -*-
|
||||
# -*- By the Alfa Develop Group -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
from channelselector import get_thumb
|
||||
|
||||
host = 'https://goodpelis.net/'
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
itemlist.append(item.clone(title="Peliculas",
|
||||
action="menu_peliculas",
|
||||
thumbnail=get_thumb('movies', auto=True),
|
||||
))
|
||||
|
||||
# itemlist.append(item.clone(title="Series",
|
||||
# action="menu_series",
|
||||
# thumbnail=get_thumb('tvshows', auto=True),
|
||||
# ))
|
||||
|
||||
itemlist.append(item.clone(title="Buscar", action="search",
|
||||
thumbnail=get_thumb('search', auto=True),
|
||||
url=host + '?s='
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def menu_peliculas(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
itemlist.append(item.clone(title="Todas",
|
||||
action="list_all",
|
||||
thumbnail=get_thumb('all', auto=True),
|
||||
url=host + 'page/1/?s'
|
||||
))
|
||||
|
||||
itemlist.append(item.clone(title="Generos",
|
||||
action="seccion",
|
||||
url=host + 'page/1/?s',
|
||||
thumbnail=get_thumb('genres', auto=True),
|
||||
seccion='generos-pelicula'
|
||||
))
|
||||
|
||||
itemlist.append(item.clone(title="Por Año",
|
||||
action="seccion",
|
||||
url=host + 'page/1/?s',
|
||||
thumbnail=get_thumb('year', auto=True),
|
||||
seccion='fecha-estreno'
|
||||
))
|
||||
|
||||
itemlist.append(item.clone(title="Calidad",
|
||||
action="seccion",
|
||||
url=host + 'page/1/?s',
|
||||
thumbnail=get_thumb('quality', auto=True),
|
||||
seccion='calidad'
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def menu_series(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
itemlist.append(item.clone(title="Todas",
|
||||
action="list_all", thumbnail=get_thumb('all', auto=True),
|
||||
url=host + 'series/page/1/',
|
||||
))
|
||||
|
||||
itemlist.append(item.clone(title="Generos",
|
||||
action="seccion",
|
||||
url=host + 'series/page/1/',
|
||||
thumbnail=get_thumb('genres', auto=True),
|
||||
seccion='generos-serie'
|
||||
))
|
||||
|
||||
itemlist.append(item.clone(title="Por Año",
|
||||
action="seccion",
|
||||
url=host + 'series/page/1/',
|
||||
thumbnail=get_thumb('year', auto=True),
|
||||
seccion='series-lanzamiento'
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def list_all(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
data = get_source(item.url)
|
||||
patron = 'class=item.*?<a href=(.*?)><div class=image.*?<img src=(.*?) alt=(.*?) (?:\(\d{4}|width).*?'
|
||||
patron += 'fixyear><h2>.*?<\/h2>.*?<span class=year>(.*?)<\/span><\/div>(.*?)<\/div>'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedyear, scrapedquality in matches:
|
||||
url = scrapedurl
|
||||
action = 'findvideos'
|
||||
thumbnail = scrapedthumbnail
|
||||
plot = ''
|
||||
contentSerieName = ''
|
||||
contentTitle = scrapedtitle
|
||||
title = contentTitle
|
||||
quality = 'Full HD'
|
||||
if scrapedquality != '':
|
||||
quality = scrapertools.find_single_match(scrapedquality, 'calidad2>(.*?)<')
|
||||
title = contentTitle + ' (%s)' % quality
|
||||
|
||||
year = scrapedyear
|
||||
|
||||
if 'series' in item.url or 'series' in url:
|
||||
action = 'seasons'
|
||||
contentSerieName = contentTitle
|
||||
quality = ''
|
||||
new_item = Item(channel=item.channel,
|
||||
action=action,
|
||||
title=title,
|
||||
url=url,
|
||||
thumbnail=thumbnail,
|
||||
plot=plot,
|
||||
quality=quality,
|
||||
infoLabels={'year': year}
|
||||
)
|
||||
if 'series' not in item.url:
|
||||
new_item.contentTitle = contentTitle
|
||||
else:
|
||||
new_item.contentSerieName = contentSerieName
|
||||
if 'temporada' not in url:
|
||||
itemlist.append(new_item)
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
# Paginacion
|
||||
|
||||
if itemlist != []:
|
||||
next_page = scrapertools.find_single_match(data,
|
||||
'<div class=pag_b><a href=(.*?)>Siguiente</a>')
|
||||
if next_page != '':
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
action="list_all",
|
||||
title='Siguiente >>>',
|
||||
url=next_page,
|
||||
))
|
||||
return itemlist
|
||||
|
||||
|
||||
def seccion(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = get_source(item.url)
|
||||
if item.seccion == 'generos-pelicula':
|
||||
patron = '<li class=cat-item cat-item-.*?><a href=(.*?)>(.*?<\/a> <span>.*?)<\/span><\/li>'
|
||||
elif item.seccion == 'generos-serie':
|
||||
patron = '<li class=cat-item cat-item-.*?><a href=(.*?\/series-genero\/.*?)>(.*?<\/a> <span>.*?)<\/span><\/li>'
|
||||
elif item.seccion in ['fecha-estreno', 'series-lanzamiento']:
|
||||
patron = '<li><a href=%sfecha-estreno(.*?)>(.*?)<\/a>' % host
|
||||
elif item.seccion == 'calidad':
|
||||
patron = '<li><a href=%scalidad(.*?)>(.*?)<\/a>' % host
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
thumbnail = ''
|
||||
if 'generos' in item.seccion:
|
||||
cantidad = scrapertools.find_single_match(scrapedtitle, '<span>(\d+)')
|
||||
title = scrapertools.find_single_match(scrapedtitle, '(.*?)<')
|
||||
url = scrapedurl
|
||||
title = scrapertools.decodeHtmlentities(title)
|
||||
title = title + ' (%s)' % cantidad
|
||||
elif item.seccion in ['series-lanzamiento', 'fecha-estreno', 'calidad']:
|
||||
title = scrapedtitle
|
||||
url = '%s%s%s' % (host, item.seccion, scrapedurl)
|
||||
|
||||
itemlist.append(item.clone(action='list_all',
|
||||
title=title,
|
||||
url=url,
|
||||
thumbnail=thumbnail
|
||||
))
|
||||
return itemlist
|
||||
|
||||
|
||||
def seasons(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
data = get_source(item.url)
|
||||
patron = '<span class=title>.*?- Temporada (.*?)<\/span>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for temporada in matches:
|
||||
title = 'Temporada %s' % temporada
|
||||
contentSeasonNumber = temporada
|
||||
item.infoLabels['season'] = contentSeasonNumber
|
||||
itemlist.append(item.clone(action='episodiosxtemp',
|
||||
title=title,
|
||||
contentSeasonNumber=contentSeasonNumber
|
||||
))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
title='[COLOR yellow]Añadir esta serie a la videoteca[/COLOR]',
|
||||
url=item.url,
|
||||
action="add_serie_to_library",
|
||||
extra="episodios",
|
||||
contentSerieName=item.contentSerieName,
|
||||
contentSeasonNumber=contentSeasonNumber
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodios(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
data = get_source(item.url)
|
||||
|
||||
patron = '<li><div class=numerando>(\d+).*?x.*?(\d+)<\/div>.*?<a href=(.*?)> (.*?)<\/a>.*?<\/i>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedtemp, scrapedep, scrapedurl, scrapedtitle in matches:
|
||||
temporada = scrapedtemp
|
||||
title = temporada + 'x%s %s' % (scrapedep, scrapedtitle)
|
||||
url = scrapedurl
|
||||
contentEpisodeNumber = scrapedep
|
||||
item.infoLabels['episode'] = contentEpisodeNumber
|
||||
itemlist.append(item.clone(action='findvideos',
|
||||
title=title,
|
||||
url=url,
|
||||
contentEpisodeNumber=contentEpisodeNumber,
|
||||
))
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodiosxtemp(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
data = get_source(item.url)
|
||||
temporada = item.contentSeasonNumber
|
||||
patron = '<li><div class=numerando>%s.*?x.*?(\d+)<\/div>.*?<a href=(.*?)> (.*?)<\/a>.*?<\/i>' % temporada
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedep, scrapedurl, scrapedtitle in matches:
|
||||
title = temporada + 'x%s %s' % (scrapedep, scrapedtitle)
|
||||
url = scrapedurl
|
||||
contentEpisodeNumber = scrapedep
|
||||
item.infoLabels['episode'] = contentEpisodeNumber
|
||||
itemlist.append(item.clone(action='findvideos',
|
||||
title=title,
|
||||
url=url,
|
||||
contentEpisodeNumber=contentEpisodeNumber,
|
||||
))
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
url_list = []
|
||||
itemlist = []
|
||||
duplicados = []
|
||||
data = get_source(item.url)
|
||||
src = data
|
||||
patron = '<(?:iframe|IFRAME).*?(?:src|SRC)=(.*?) (?:scrolling|frameborder|FRAMEBORDER)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for url in matches:
|
||||
lang = 'LAT'
|
||||
quality = item.quality
|
||||
title = '[%s] [%s]'
|
||||
if url != '':
|
||||
itemlist.append(item.clone(title=title, url=url, action='play', language=lang))
|
||||
|
||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % (i.server, i.language))
|
||||
|
||||
if item.infoLabels['mediatype'] == 'movie':
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos':
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]',
|
||||
url=item.url,
|
||||
action="add_pelicula_to_library",
|
||||
extra="findvideos",
|
||||
contentTitle=item.contentTitle
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info()
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = item.url + texto
|
||||
try:
|
||||
if texto != '':
|
||||
return list_all(item)
|
||||
else:
|
||||
return []
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
if categoria in ['peliculas', 'latino']:
|
||||
item.url = host + 'page/1/?s'
|
||||
|
||||
elif categoria == 'infantiles':
|
||||
item.url = host + 'category/animacion/'
|
||||
|
||||
elif categoria == 'terror':
|
||||
item.url = host + 'category/terror/'
|
||||
|
||||
itemlist = list_all(item)
|
||||
if itemlist[-1].title == 'Siguiente >>>':
|
||||
itemlist.pop()
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def get_source(url):
|
||||
logger.info()
|
||||
data = httptools.downloadpage(url).data
|
||||
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
||||
return data
|
||||
@@ -113,6 +113,14 @@
|
||||
"14",
|
||||
"15"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_4k",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - 4K",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1086,3 +1086,29 @@ def search(item, texto):
|
||||
for line in sys.exc_info():
|
||||
logger.error("ERROR: %s: SEARCH" % line)
|
||||
return []
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
item = Item()
|
||||
|
||||
try:
|
||||
if categoria == '4k':
|
||||
item.url = host + "categoria/4k/"
|
||||
item.extra = "peliculas"
|
||||
item.channel = channel
|
||||
item.category_new= 'newest'
|
||||
|
||||
itemlist = listado(item)
|
||||
if ">> Página siguiente" in itemlist[-1].title:
|
||||
itemlist.pop()
|
||||
|
||||
# Se captura la excepción, para no interrumpir al canal novedades si un canal falla
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
@@ -7,11 +7,10 @@ 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 = 'http://www.hclips.com'
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
@@ -41,12 +40,16 @@ def categorias(item):
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<a href="([^"]+)" class="thumb">.*?src="([^"]+)".*?<strong class="title">([^"]+)</strong>.*?<b>(.*?)</b>'
|
||||
patron = '<a href="([^"]+)" class="thumb">.*?'
|
||||
patron += 'src="([^"]+)".*?'
|
||||
patron += '<strong class="title">([^"]+)</strong>.*?'
|
||||
patron += '<b>(.*?)</b>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedthumbnail,scrapedtitle,vidnum in matches:
|
||||
scrapedplot = ""
|
||||
title = scrapedtitle + " \(" + vidnum + "\)"
|
||||
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
|
||||
|
||||
|
||||
@@ -54,19 +57,21 @@ def peliculas(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = scrapertools.cachePage(item.url)
|
||||
patron = '<a href="([^"]+)" class="thumb">.*?<img src="([^"]+)" alt="([^"]+)".*?<span class="dur">(.*?)</span>'
|
||||
patron = '<a href="([^"]+)" class="thumb">.*?'
|
||||
patron += '<img src="([^"]+)" alt="([^"]+)".*?'
|
||||
patron += '<span class="dur">(.*?)</span>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedthumbnail,scrapedtitle,time in matches:
|
||||
title = "[COLOR yellow]" + time + "[/COLOR] " + scrapedtitle
|
||||
contentTitle = title
|
||||
thumbnail = scrapedthumbnail
|
||||
plot = ""
|
||||
year = ""
|
||||
itemlist.append( Item(channel=item.channel, action="play" , title=title , url=scrapedurl, thumbnail=thumbnail, plot=plot, contentTitle = contentTitle, infoLabels={'year':year} ))
|
||||
itemlist.append( Item(channel=item.channel, action="play", title=title, url=scrapedurl,
|
||||
thumbnail=thumbnail, plot=plot, contentTitle = contentTitle))
|
||||
next_page_url = scrapertools.find_single_match(data,'<a href="([^"]+)" title="Next Page">Next</a>')
|
||||
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.clone(action="peliculas", title="Página Siguiente >>", text_color="blue", url=next_page_url) )
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
@@ -7,17 +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 = 'http://www.hdzog.com'
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Nuevos" , action="peliculas", url=host + "/new/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Popular" , action="peliculas", url=host + "/popular/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Longitud" , action="peliculas", url=host + "/longest/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Nuevos" , action="lista", url=host + "/new/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Popular" , action="lista", url=host + "/popular/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Longitud" , action="lista", url=host + "/longest/"))
|
||||
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
|
||||
@@ -27,7 +25,7 @@ def search(item, texto):
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = host + "/search/?q=%s" % texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
return lista(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -41,33 +39,40 @@ def categorias(item):
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = scrapertools.get_match(data,'<ul class="cf">(.*?)</ul>')
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<li>.*?<a href="([^"]+)".*?<img class="thumb" src="([^"]+)" alt="([^"]+)".*?<span class="videos-count">(\d+)</span>'
|
||||
patron = '<li>.*?<a href="([^"]+)".*?'
|
||||
patron += '<img class="thumb" src="([^"]+)" alt="([^"]+)".*?'
|
||||
patron += '<span class="videos-count">(\d+)</span>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedthumbnail,scrapedtitle,vidnum in matches:
|
||||
scrapedplot = ""
|
||||
|
||||
url= scrapedurl + "?sortby=post_date"
|
||||
title = scrapedtitle + " \(" + vidnum + "\)"
|
||||
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=url,
|
||||
thumbnail=scrapedthumbnail, plot=scrapedplot) )
|
||||
return itemlist
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
def lista(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = scrapertools.cachePage(item.url)
|
||||
data = scrapertools.get_match(data,'<ul class="cf">(.*?)<h2>Advertisement</h2>')
|
||||
patron = '<li>.*?<a href="([^"]+)".*?src="([^"]+)" alt="([^"]+)" />.*?<span class="time">(.*?)</span>'
|
||||
patron = '<li>.*?<a href="([^"]+)".*?'
|
||||
patron += 'src="([^"]+)" alt="([^"]+)".*?'
|
||||
patron += '<span class="time">(.*?)</span>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedthumbnail,scrapedtitle,time in matches:
|
||||
contentTitle = scrapedtitle
|
||||
title = "[COLOR yellow]" + time + "[/COLOR] " + scrapedtitle
|
||||
thumbnail = scrapedthumbnail
|
||||
plot = ""
|
||||
year = ""
|
||||
itemlist.append( Item(channel=item.channel, action="play" , title=title , url=scrapedurl, thumbnail=thumbnail, plot=plot, contentTitle = contentTitle, infoLabels={'year':year} ))
|
||||
next_page_url = scrapertools.find_single_match(data,'<a href="([^"]+)" title="Next Page" data-page-num="\d+">Next page »</a>')
|
||||
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=thumbnail, plot=plot, contentTitle = contentTitle))
|
||||
next_page = scrapertools.find_single_match(data,'<a href="([^"]+)" title="Next Page" data-page-num="\d+">Next page »</a>')
|
||||
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
|
||||
|
||||
|
||||
|
||||
@@ -7,15 +7,13 @@ 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 = 'http://hellporno.com'
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Nuevas" , action="peliculas", url=host + "/?page=1"))
|
||||
itemlist.append( Item(channel=item.channel, title="Nuevas" , action="lista", url=host + "/?page=1"))
|
||||
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
|
||||
@@ -26,7 +24,7 @@ def search(item, texto):
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = host + "/search/?q=%s" % texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
return lista(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -39,25 +37,30 @@ def categorias(item):
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<a href="([^"]+)">.*?<img src="([^"]+)" alt="([^"]+) - Porn videos">.*?<span>(\d+) videos</span>'
|
||||
patron = '<a href="([^"]+)">.*?'
|
||||
patron += '<img src="([^"]+)" alt="([^"]+) - Porn videos">.*?'
|
||||
patron += '<span>(\d+) videos</span>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedthumbnail,scrapedtitle,cantidad in matches:
|
||||
scrapedplot = ""
|
||||
scrapedtitle = scrapedtitle + " (" + cantidad + ")"
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle , url=scrapedurl , thumbnail=scrapedthumbnail , plot=scrapedplot , folder=True) )
|
||||
next_page_url = scrapertools.find_single_match(data,'<a href="([^"]+)" class="next">Next page »</a>')
|
||||
if next_page_url!="":
|
||||
next_page_url = urlparse.urljoin(item.url,next_page_url)
|
||||
itemlist.append( Item(channel=item.channel , action="categorias" , title="Página Siguiente >>" , text_color="blue", url=next_page_url , folder=True) )
|
||||
itemlist.append( Item(channel=item.channel, action="lista", title=scrapedtitle, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail , plot=scrapedplot) )
|
||||
next_page = scrapertools.find_single_match(data,'<a href="([^"]+)" class="next">Next page »</a>')
|
||||
if next_page!="":
|
||||
next_page = urlparse.urljoin(item.url,next_page)
|
||||
itemlist.append(item.clone(action="categorias" , title="Página Siguiente >>", text_color="blue", url=next_page) )
|
||||
return itemlist
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
def lista(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = scrapertools.cachePage(item.url)
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<div class="video-thumb"><a href="([^"]+)" class="title".*?>([^"]+)</a>.*?<span class="time">([^<]+)</span>.*?<video poster="([^"]+)"'
|
||||
patron = '<div class="video-thumb"><a href="([^"]+)" class="title".*?>([^"]+)</a>.*?'
|
||||
patron += '<span class="time">([^<]+)</span>.*?'
|
||||
patron += '<video poster="([^"]+)"'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle,duracion,scrapedthumbnail in matches:
|
||||
url = scrapedurl
|
||||
@@ -65,12 +68,12 @@ def peliculas(item):
|
||||
contentTitle = title
|
||||
thumbnail = scrapedthumbnail
|
||||
plot = ""
|
||||
year = ""
|
||||
itemlist.append( Item(channel=item.channel, action="play" , title=title , url=url, thumbnail=thumbnail, plot=plot, contentTitle = contentTitle, infoLabels={'year':year} ))
|
||||
next_page_url = scrapertools.find_single_match(data,'<a href="([^"]+)" class="next">Next page »</a>')
|
||||
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=url, thumbnail=thumbnail,
|
||||
plot=plot, contentTitle = contentTitle))
|
||||
next_page = scrapertools.find_single_match(data,'<a href="([^"]+)" class="next">Next page »</a>')
|
||||
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
|
||||
|
||||
|
||||
@@ -78,10 +81,6 @@ def play(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = scrapertools.cachePage(item.url)
|
||||
|
||||
#<source src="https://hellporno.com/get_file/6/b44b40165f7e95e4aeff4d9c33100447/202000/202198/202198_360p.mp4/?br=390" title="360p" type="video/mp4" />
|
||||
#<source data-fluid-hd src="https://hellporno.com/get_file/6/4ec6bbf8288123603094c76d9cd8ede4/202000/202198/202198.mp4/?br=1440" title="720p" type="video/mp4" />
|
||||
|
||||
scrapedurl = scrapertools.find_single_match(data,'<source data-fluid-hd src="([^"]+)/?br=\d+"')
|
||||
if scrapedurl=="":
|
||||
scrapedurl = scrapertools.find_single_match(data,'<source src="([^"]+)/?br=\d+"')
|
||||
|
||||
@@ -7,17 +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://hotmovs.com'
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Nuevas" , action="peliculas", url=host + "/latest-updates/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas Vistas" , action="peliculas", url=host + "/most-popular/?sort_by=video_viewed_week"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mejor valorada" , action="peliculas", url=host + "/top-rated/?sort_by=rating_week"))
|
||||
itemlist.append( Item(channel=item.channel, title="Nuevas" , action="lista", url=host + "/latest-updates/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas Vistas" , action="lista", url=host + "/most-popular/?sort_by=video_viewed_week"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mejor valorada" , action="lista", url=host + "/top-rated/?sort_by=rating_week"))
|
||||
itemlist.append( Item(channel=item.channel, title="Canal" , action="catalogo", url=host + "/channels/?sort_by=cs_viewed"))
|
||||
itemlist.append( Item(channel=item.channel, title="Pornstars" , action="categorias", url=host + "/models/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host + "/categories/?sort_by=title"))
|
||||
@@ -30,7 +28,7 @@ def search(item, texto):
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = host + "/search/?q=%s" % texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
return lista(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -43,18 +41,22 @@ def catalogo(item):
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<a class="thumbnail" href="([^"]+)">.*?<img src="([^"]+)".*?<span class="thumbnail__info__right">\s+([^"]+)\s+</span>.*?<h5>([^"]+)</h5>'
|
||||
patron = '<a class="thumbnail" href="([^"]+)">.*?'
|
||||
patron += '<img src="([^"]+)".*?'
|
||||
patron += '<span class="thumbnail__info__right">\s+([^"]+)\s+</span>.*?'
|
||||
patron += '<h5>([^"]+)</h5>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedthumbnail,cantidad,scrapedtitle in matches:
|
||||
scrapedplot = ""
|
||||
cantidad = cantidad.replace(" ", "")
|
||||
scrapedtitle = scrapedtitle + " (" + cantidad +")"
|
||||
scrapedurl = urlparse.urljoin(item.url,scrapedurl)
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle , url=scrapedurl , thumbnail=scrapedthumbnail , plot=scrapedplot , folder=True) )
|
||||
next_page_url = scrapertools.find_single_match(data,'<li class="next"><a href="([^"]+)"')
|
||||
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="lista", title=scrapedtitle, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail , plot=scrapedplot) )
|
||||
next_page = scrapertools.find_single_match(data,'<li class="next"><a href="([^"]+)"')
|
||||
if next_page!="":
|
||||
next_page = urlparse.urljoin(item.url,next_page)
|
||||
itemlist.append(item.clone(action="catalogo", title="Página Siguiente >>", text_color="blue", url=next_page) )
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -63,22 +65,25 @@ def categorias(item):
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<a class="thumbnail" href="([^"]+)" title="([^"]+)">.*?<img src="([^"]+)".*?<i class="mdi mdi-video"></i>([^"]+)</div>'
|
||||
patron = '<a class="thumbnail" href="([^"]+)" title="([^"]+)">.*?'
|
||||
patron += '<img src="([^"]+)".*?'
|
||||
patron += '<i class="mdi mdi-video"></i>([^"]+)</div>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail,cantidad in matches:
|
||||
scrapedplot = ""
|
||||
cantidad = cantidad.replace(" ", "")
|
||||
scrapedtitle = scrapedtitle + " (" + cantidad +")"
|
||||
scrapedurl = urlparse.urljoin(item.url,scrapedurl)
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle , url=scrapedurl , thumbnail=scrapedthumbnail , plot=scrapedplot , folder=True) )
|
||||
next_page_url = scrapertools.find_single_match(data,'<li class="next"><a href="([^"]+)"')
|
||||
if next_page_url!="":
|
||||
next_page_url = urlparse.urljoin(item.url,next_page_url)
|
||||
itemlist.append( Item(channel=item.channel , action="categorias" , title="Página Siguiente >>" , text_color="blue", url=next_page_url , folder=True) )
|
||||
itemlist.append( Item(channel=item.channel, action="lista", title=scrapedtitle, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail, plot=scrapedplot) )
|
||||
next_page = scrapertools.find_single_match(data,'<li class="next"><a href="([^"]+)"')
|
||||
if next_page!="":
|
||||
next_page = urlparse.urljoin(item.url,next_page)
|
||||
itemlist.append(item.clone(action="categorias", title="Página Siguiente >>", text_color="blue", url=next_page) )
|
||||
return itemlist
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
def lista(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = scrapertools.cachePage(item.url)
|
||||
@@ -90,12 +95,12 @@ def peliculas(item):
|
||||
title = "[COLOR yellow]" + scrapedtime + "[/COLOR] " + scrapedtitle
|
||||
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} ))
|
||||
next_page_url = scrapertools.find_single_match(data,'<li class="next"><a href="([^"]+)"')
|
||||
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=url, thumbnail=thumbnail,
|
||||
plot=plot, contentTitle = title))
|
||||
next_page = scrapertools.find_single_match(data,'<li class="next"><a href="([^"]+)"')
|
||||
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
|
||||
|
||||
|
||||
|
||||
@@ -38,9 +38,6 @@ def mainlist(item):
|
||||
thumbnail=get_thumb('all', auto=True)))
|
||||
itemlist.append(Item(channel= item.channel, title="Generos", action="genres", url=host + 'ultimas-series-agregadas/',
|
||||
thumbnail=get_thumb('genres', auto=True)))
|
||||
itemlist.append(Item(channel= item.channel, title="Recomendadas", action="list_all",
|
||||
url=host + 'ultimas-series-agregadas/', type='recomended',
|
||||
thumbnail=get_thumb('recomended', auto=True)))
|
||||
itemlist.append(Item(channel=item.channel, title="Buscar", action="search", url=host+'?s=',
|
||||
thumbnail=get_thumb('search', auto=True)))
|
||||
|
||||
@@ -54,18 +51,9 @@ def list_all(item):
|
||||
|
||||
itemlist = []
|
||||
data = get_source(item.url)
|
||||
if item.type != 'search':
|
||||
if item.type == 'recomended':
|
||||
class_type = 'list_mt'
|
||||
else:
|
||||
class_type = 'info'
|
||||
|
||||
patron = '<a class=poster href=(.*?) title=(.*?)> <img src=(.*?) alt.*?class=%s' % class_type
|
||||
else:
|
||||
patron = 'item> <a class=poster href=(.*?) title=(.*?)> <img src=(.*?) alt.*?class=info'
|
||||
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
data1 = scrapertools.find_single_match(data, '<div class=col-md-80 lado2(.*?)</div></div></div>')
|
||||
patron = '<a class=poster href=(.*?) title=(.*?)> <img.*?src=(.*?) alt'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data1)
|
||||
|
||||
for scrapedurl, scrapedtitle, scrapedthumbnail in matches:
|
||||
url = scrapedurl
|
||||
@@ -82,7 +70,7 @@ def list_all(item):
|
||||
|
||||
if itemlist != []:
|
||||
actual_page_url = item.url
|
||||
next_page = scrapertools.find_single_match(data, '<li><a href=([^ ]+) ><span aria-hidden=true>»</span>')
|
||||
next_page = scrapertools.find_single_match(data, '<li><a href=([^ ]+)><span aria-hidden=true>»</span>')
|
||||
if next_page != '':
|
||||
itemlist.append(Item(channel=item.channel, action="list_all", title='Siguiente >>>', url=next_page,
|
||||
thumbnail='https://s16.postimg.cc/9okdu7hhx/siguiente.png'))
|
||||
@@ -160,13 +148,13 @@ def genres(item):
|
||||
itemlist = []
|
||||
norep = []
|
||||
data = get_source(item.url)
|
||||
patron = '<a href=([^>]+)><span.*?<i>(.*?)</i>'
|
||||
patron = '<a href=([^>]+)><span.*?<i>(.*?)</i>.*?>(.*?)</b>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
for scrapedurl, scrapedtitle, cantidad in matches:
|
||||
|
||||
url = scrapedurl
|
||||
title = scrapedtitle.capitalize()
|
||||
title = "%s - %s" % (scrapedtitle.capitalize(), cantidad)
|
||||
itemactual = Item(channel=item.channel, action='list_all', title=title, url=url)
|
||||
|
||||
if title not in norep:
|
||||
|
||||
@@ -2,14 +2,11 @@
|
||||
#------------------------------------------------------------
|
||||
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://javl.in'
|
||||
|
||||
@@ -17,7 +14,7 @@ host = 'http://javl.in'
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Peliculas" , action="peliculas", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="lista" , action="lista", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Buscar" , action="search"))
|
||||
return itemlist
|
||||
@@ -28,7 +25,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():
|
||||
@@ -48,11 +45,12 @@ def categorias(item):
|
||||
scrapedtitle = str(scrapedtitle) + " ("+ str(number) + ")"
|
||||
scrapedurl = "http://javl.in/?cat=" + scrapedurl
|
||||
thumbnail = urlparse.urljoin(item.url,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
|
||||
@@ -60,23 +58,12 @@ def peliculas(item):
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail in matches:
|
||||
scrapedplot = ""
|
||||
itemlist.append( Item(channel=item.channel, action="play", title=scrapedtitle , url=scrapedurl , thumbnail=scrapedthumbnail , plot=scrapedplot , folder=True) )
|
||||
next_page_url = scrapertools.find_single_match(data,'<span class=\'currenttext\'>.*?href=\'([^\']+)\' class=\'inactive\'>')
|
||||
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) )
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def play(item):
|
||||
logger.info()
|
||||
data = scrapertools.cachePage(item.url)
|
||||
itemlist = servertools.find_video_items(data=data)
|
||||
for videoitem in itemlist:
|
||||
videoitem.title = item.title
|
||||
videoitem.fulltitle = item.fulltitle
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
videoitem.channel = item.channel
|
||||
itemlist.append( Item(channel=item.channel, action="findvideos", title=scrapedtitle, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail, plot=scrapedplot) )
|
||||
next_page = scrapertools.find_single_match(data,'<span class=\'currenttext\'>.*?href=\'([^\']+)\' class=\'inactive\'')
|
||||
if next_page!="":
|
||||
next_page = urlparse.urljoin(item.url,next_page)
|
||||
itemlist.append( Item(channel=item.channel , action="lista", title="Página Siguiente >>", text_color="blue",
|
||||
url=next_page) )
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -7,8 +7,6 @@ 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.javwhores.com/'
|
||||
@@ -17,10 +15,9 @@ host = 'https://www.javwhores.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="Nuevos" , action="lista", url=host + "/latest-updates/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mejor valorados" , action="lista", url=host + "/top-rated/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas vistos" , action="lista", 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
|
||||
@@ -31,7 +28,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():
|
||||
@@ -51,30 +48,35 @@ 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="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
|
||||
patron = '<div class="video-item ">.*?'
|
||||
patron += '<a href="([^"]+)" title="([^"]+)" class="thumb">.*?'
|
||||
patron += 'data-original="([^"]+)".*?'
|
||||
patron += '<i class="fa fa-clock-o"></i>(.*?)</div>'
|
||||
patron += '<span class="ico-fav-1(.*?)<p class="inf">'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail,scrapedtime in matches:
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail,duracion in matches:
|
||||
url = urlparse.urljoin(item.url,scrapedurl)
|
||||
title = "[COLOR yellow]" + scrapedtime + "[/COLOR] " + scrapedtitle
|
||||
time = scrapertools.find_single_match(duracion, '<i class="fa fa-clock-o"></i>([^"]+)</div>')
|
||||
if not 'HD' in duracion :
|
||||
title = "[COLOR yellow]" + time + "[/COLOR] " + scrapedtitle
|
||||
else:
|
||||
title = "[COLOR yellow]" + time + "[/COLOR] " + "[COLOR red]" + "HD" + "[/COLOR] " + scrapedtitle
|
||||
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))
|
||||
next_page = scrapertools.find_single_match(data, '<li class="next"><a href="([^"]+)"')
|
||||
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
|
||||
|
||||
|
||||
|
||||
@@ -7,8 +7,6 @@ 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 = 'http://jizzbunker.com/es'
|
||||
|
||||
@@ -42,14 +40,17 @@ def categorias(item):
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<li><figure>.*?<a href="([^"]+)".*?<img class="lazy" data-original="([^"]+)" alt="([^"]+)".*?<span class="score">(\d+)</span>'
|
||||
patron = '<li><figure>.*?<a href="([^"]+)".*?'
|
||||
patron += '<img class="lazy" data-original="([^"]+)" alt="([^"]+)".*?'
|
||||
patron += '<span class="score">(\d+)</span>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
scrapertools.printMatches(matches)
|
||||
for scrapedurl,scrapedthumbnail,scrapedtitle,cantidad in matches:
|
||||
scrapedplot = ""
|
||||
scrapedurl = scrapedurl.replace("channel", "channel30")
|
||||
scrapedtitle = scrapedtitle + " (" + cantidad + ")"
|
||||
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
|
||||
|
||||
|
||||
@@ -58,7 +59,9 @@ def peliculas(item):
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<li><figure>.*?<a href="([^"]+)/([^"]+).html".*?<img class="lazy" data-original="([^"]+)".*?<time datetime=".*?">([^"]+)</time>'
|
||||
patron = '<li><figure>.*?<a href="([^"]+)/([^"]+).html".*?'
|
||||
patron += '<img class="lazy" data-original="([^"]+)".*?'
|
||||
patron += '<time datetime=".*?">([^"]+)</time>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail,duracion in matches:
|
||||
url = scrapedurl + "/" + scrapedtitle + ".html"
|
||||
@@ -66,12 +69,12 @@ def peliculas(item):
|
||||
contentTitle = title
|
||||
thumbnail = scrapedthumbnail
|
||||
plot = ""
|
||||
year = ""
|
||||
itemlist.append( Item(channel=item.channel, action="play" , title=title , url=url, thumbnail=thumbnail, plot=plot, contentTitle = contentTitle, infoLabels={'year':year} ))
|
||||
itemlist.append( Item(channel=item.channel, action="play" , title=title , url=url, thumbnail=thumbnail,
|
||||
plot=plot, contentTitle = contentTitle))
|
||||
next_page_url = scrapertools.find_single_match(data,'<li><a href="([^"]+)" rel="next">→</a>')
|
||||
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.clone(action="peliculas", title="Página Siguiente >>", text_color="blue", url=next_page_url) )
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
@@ -2,14 +2,11 @@
|
||||
#------------------------------------------------------------
|
||||
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
|
||||
from core import jsontools
|
||||
|
||||
host = 'http://xxx.justporno.tv'
|
||||
|
||||
@@ -17,9 +14,9 @@ host = 'http://xxx.justporno.tv'
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Ultimos" , action="peliculas", url=host + "/latest-updates/1/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mejor valoradas" , action="peliculas", url=host + "/top-rated/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas Vistas", action="peliculas", url=host + "/most-popular/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Ultimos" , action="lista", url=host + "/latest-updates/1/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mejor valoradas" , action="lista", url=host + "/top-rated/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas Vistas", action="lista", 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
|
||||
@@ -27,10 +24,11 @@ def mainlist(item):
|
||||
|
||||
def search(item, texto):
|
||||
logger.info()
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = host + "/search/%s" % texto
|
||||
item.url = "%s/search/%s/" % (host, texto.replace("+", "-"))
|
||||
item.extra = texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
return lista(item)
|
||||
# Se captura la excepción, para no interrumpir al buscador global si un canal falla
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -42,33 +40,62 @@ def categorias(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = '<a class="item" href="([^"]+)" title="([^"]+)">.*?<div class="videos">(\d+) video.*?</div>'
|
||||
patron = '<a class="item" href="([^"]+)" title="([^"]+)">.*?'
|
||||
patron += '<div class="videos">(\d+) video.*?</div>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle,numero in matches:
|
||||
scrapedplot = ""
|
||||
scrapedthumbnail = ""
|
||||
scrapedtitle = scrapedtitle + " (" + numero + ")"
|
||||
thumbnail = urlparse.urljoin(item.url,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
|
||||
patron = '<a href="http://xxx.justporno.tv/videos/(\d+)/.*?" title="([^"]+)" >.*?data-original="([^"]+)".*?<div class="duration">(.*?)</div>'
|
||||
patron = '<a href="http://xxx.justporno.tv/videos/(\d+)/.*?" title="([^"]+)" >.*?'
|
||||
patron += 'data-original="([^"]+)".*?'
|
||||
patron += '<div class="duration">(.*?)</div>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail,scrapedtime in matches:
|
||||
scrapedplot = ""
|
||||
scrapedtitle = "[COLOR yellow]" + (scrapedtime) + "[/COLOR] " + scrapedtitle
|
||||
scrapedurl = "http://xxx.justporno.tv/embed/" + scrapedurl
|
||||
itemlist.append( Item(channel=item.channel, action="play", title=scrapedtitle , url=scrapedurl , thumbnail=scrapedthumbnail , plot=scrapedplot , folder=True) )
|
||||
next_page_url = scrapertools.find_single_match(data,'<li class="next"><a href="([^"]+)"')
|
||||
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=scrapedtitle, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail , plot=scrapedplot) )
|
||||
|
||||
if item.extra:
|
||||
next_page = scrapertools.find_single_match(data, '<li class="next">.*?from_videos\+from_albums:(.*?)>')
|
||||
if next_page:
|
||||
if "from_videos=" in item.url:
|
||||
next_page = re.sub(r'&from_videos=(\d+)', '&from_videos=%s' % next_page, item.url)
|
||||
else:
|
||||
next_page = "%s?mode=async&function=get_block&block_id=list_videos_videos_list_search_result"\
|
||||
"&q=%s&category_ids=&sort_by=post_date&from_videos=%s" % (item.url, item.extra, next_page)
|
||||
itemlist.append(item.clone(action="lista", title="Página Siguiente >>", text_color="blue", url=next_page))
|
||||
else:
|
||||
next_page = scrapertools.find_single_match(data,'<li class="next"><a href="([^"]+)"')
|
||||
if next_page and not next_page.startswith("#"):
|
||||
next_page = urlparse.urljoin(host, next_page)
|
||||
itemlist.append(item.clone(action="lista", title="Página Siguiente >>", text_color="blue", url=next_page))
|
||||
else:
|
||||
next_page = scrapertools.find_single_match(data, '<li class="next">.*?from:(\d+)')
|
||||
if next_page:
|
||||
if "from" in item.url:
|
||||
next_page = re.sub(r'&from=(\d+)', '&from=%s' % next_page, item.url)
|
||||
else:
|
||||
next_page = "%s?mode=async&function=get_block&block_id=list_videos_common_videos_list" \
|
||||
"&sort_by=post_date&from=%s" % (item.url, next_page)
|
||||
itemlist.append(item.clone(action="lista", title="Página Siguiente >>", text_color="blue", url=next_page))
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,27 @@
|
||||
{
|
||||
"id": "maxipelis24",
|
||||
"id": "maxipelis24",
|
||||
"name": "Maxipelis24",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["lat"],
|
||||
"language": ["cast", "lat", "vose"],
|
||||
"thumbnail": "maxipelis24.png",
|
||||
"banner": "",
|
||||
"categories": [
|
||||
"movie"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostrar enlaces en idioma...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"No filtrar",
|
||||
"Latino",
|
||||
"CAST",
|
||||
"VOSE"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import urlparse
|
||||
import urllib
|
||||
|
||||
from channels import autoplay
|
||||
from channels import filtertools
|
||||
from core import tmdb
|
||||
from core import servertools
|
||||
from core import httptools
|
||||
@@ -14,19 +14,32 @@ from channelselector import get_thumb
|
||||
|
||||
host = "https://maxipelis24.tv"
|
||||
|
||||
IDIOMAS = {'Latino': 'Latino', 'Subtitulado': 'VOSE', 'Español': 'CAST'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_quality = []
|
||||
list_servers = ['rapidvideo', 'vidoza', 'openload', 'streamango']
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist.append(Item(channel = item.channel, title = "peliculas", action = "movies", url = host, thumbnail = get_thumb('movies', auto = True)))
|
||||
itemlist.append(Item(channel = item.channel, action = "category", title = "Año de Estreno", url = host, cat = 'year', thumbnail = get_thumb('year', auto = True)))
|
||||
itemlist.append(Item(channel = item.channel, action = "category", title = "Géneros", url = host, cat = 'genre', thumbnail = get_thumb('genres', auto = True)))
|
||||
itemlist.append(Item(channel = item.channel, action = "category", title = "Calidad", url = host, cat = 'quality', thumbnail = get_thumb("quality", auto = True)))
|
||||
itemlist.append(Item(channel = item.channel, title = "Buscar", action = "search", url = host + "?s=", thumbnail = get_thumb("search", auto = True)))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title="Peliculas",
|
||||
action="movies", url=host, page=0, thumbnail=get_thumb('movies', auto=True)))
|
||||
itemlist.append(Item(channel=item.channel, action="category", title="Año de Estreno",
|
||||
url=host, cat='year', page=0, thumbnail=get_thumb('year', auto=True)))
|
||||
itemlist.append(Item(channel=item.channel, action="category", title="Géneros",
|
||||
url=host, cat='genre', page=0, thumbnail=get_thumb('genres', auto=True)))
|
||||
itemlist.append(Item(channel=item.channel, action="category", title="Calidad",
|
||||
url=host, cat='quality', page=0, thumbnail=get_thumb("quality", auto=True)))
|
||||
itemlist.append(Item(channel=item.channel, title="Buscar", action="search",
|
||||
url=host + "?s=", page=0, thumbnail=get_thumb("search", auto=True)))
|
||||
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info()
|
||||
texto = texto.replace(" ", "+")
|
||||
@@ -34,105 +47,120 @@ def search(item, texto):
|
||||
if texto != '':
|
||||
return movies(item)
|
||||
|
||||
|
||||
def category(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ","", data)
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
if item.cat == 'genre':
|
||||
data = scrapertools.find_single_match(data, '<h3>Géneros <span class="icon-sort">.*?</ul>')
|
||||
data = scrapertools.find_single_match(
|
||||
data, '<h3>Géneros <span class="icon-sort">.*?</ul>')
|
||||
patron = '<li class="cat-item cat-item.*?<a href="([^"]+)" >([^<]+)<'
|
||||
elif item.cat == 'year':
|
||||
data = scrapertools.find_single_match(data, '<h3>Año de estreno.*?</div>')
|
||||
data = scrapertools.find_single_match(
|
||||
data, '<h3>Año de estreno.*?</div>')
|
||||
patron = 'li><a href="([^"]+)">([^<]+).*?<'
|
||||
elif item.cat == 'quality':
|
||||
data = scrapertools.find_single_match(data, '<h3>Calidad.*?</div>')
|
||||
patron = 'li><a href="([^"]+)">([^<]+)<'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
itemlist.append(Item(channel = item.channel, action = 'movies', title =scrapedtitle, url = scrapedurl, type = 'cat', first = 0))
|
||||
itemlist.append(Item(channel=item.channel, action='movies',
|
||||
title=scrapedtitle, url=scrapedurl, type='cat', page=0))
|
||||
return itemlist
|
||||
|
||||
|
||||
def movies(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ","", data)
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
patron = '<div id="mt.+?href="([^"]+)".+?'
|
||||
patron += '<img src="([^"]+)" alt="([^"]+)".+?'
|
||||
patron += '<span class="ttx">([^<]+).*?'
|
||||
patron += 'class="year">([^<]+).+?class="calidad2">([^<]+)<'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
for scrapedurl, img, scrapedtitle, resto, year, quality in matches:
|
||||
scrapedtitle = re.sub(r'\d{4}|[()]','', scrapedtitle)
|
||||
for scrapedurl, img, scrapedtitle, resto, year, quality in matches[item.page:item.page + 30]:
|
||||
scrapedtitle = re.sub(r' \((\d+)\)', '', scrapedtitle)
|
||||
plot = scrapertools.htmlclean(resto).strip()
|
||||
title = ' %s [COLOR red][%s][/COLOR]' % (scrapedtitle, quality)
|
||||
itemlist.append(Item(channel = item.channel,
|
||||
title = title,
|
||||
url = scrapedurl,
|
||||
action = "findvideos",
|
||||
plot = plot,
|
||||
thumbnail = img,
|
||||
contentTitle = scrapedtitle,
|
||||
contentType = "movie",
|
||||
quality = quality,
|
||||
infoLabels = {'year': year}))
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb = True)
|
||||
#Paginacion
|
||||
matches = re.compile('class="respo_pag"><div class="pag.*?<a href="([^"]+)" >Siguiente</a><', re.DOTALL).findall(data)
|
||||
if matches:
|
||||
url = urlparse.urljoin(item.url, matches[0])
|
||||
itemlist.append(Item(channel = item.channel, action = "movies", title = "Página siguiente >>", url = url))
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
title=title,
|
||||
url=scrapedurl,
|
||||
action="findvideos",
|
||||
plot=plot,
|
||||
thumbnail=img,
|
||||
contentTitle=scrapedtitle,
|
||||
contentType="movie",
|
||||
quality=quality,
|
||||
infoLabels={'year': year}))
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
# Paginacion
|
||||
if item.page + 30 < len(matches):
|
||||
itemlist.append(item.clone(page=item.page + 30, title=">> Siguiente"))
|
||||
else:
|
||||
next_page = scrapertools.find_single_match(
|
||||
data, 'class="respo_pag"><div class="pag.*?<a href="([^"]+)" >Siguiente</a><')
|
||||
if next_page:
|
||||
itemlist.append(item.clone(
|
||||
url=next_page, page=0, title=">> Siguiente"))
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ","", data)
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
data1= scrapertools.find_single_match(data,'<ul class="idTabs">.*?</ul></div>')
|
||||
patron = "li>.*?href=.*?>([^\s]+)"
|
||||
matches1 = re.compile(patron, re.DOTALL).findall(data1)
|
||||
for lang in matches1:
|
||||
idioma = lang
|
||||
|
||||
patron = '<div id="div.*?<div class="movieplay".*?(?:iframe.*?src|IFRAME SRC)="([^&]+)&'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
for link in matches:
|
||||
if 'maxipelis24.tv/hideload/?' in link:
|
||||
if 'id=' in link:
|
||||
id_type = 'id'
|
||||
ir_type = 'ir'
|
||||
elif 'ud=' in link:
|
||||
id_type = 'ud'
|
||||
ir_type = 'ur'
|
||||
elif 'od=' in link:
|
||||
id_type = 'od'
|
||||
ir_type = 'or'
|
||||
elif 'ad=' in link:
|
||||
id_type = 'ad'
|
||||
ir_type = 'ar'
|
||||
elif 'ed=' in link:
|
||||
id_type = 'ed'
|
||||
ir_type = 'er'
|
||||
id_letter = scrapertools.find_single_match(link, '?(\w)d')
|
||||
id_type = '%sd' % id_letter
|
||||
ir_type = '%sr' % id_letter
|
||||
id = scrapertools.find_single_match(link, '%s=(.*)' % id_type)
|
||||
base_link = scrapertools.find_single_match(link, '(.*?)%s=' % id_type)
|
||||
base_link = scrapertools.find_single_match(
|
||||
link, '(.*?)%s=' % id_type)
|
||||
ir = id[::-1]
|
||||
referer = base_link+'%s=%s&/' % (id_type, ir)
|
||||
video_data = httptools.downloadpage('%s%s=%s' % (base_link, ir_type, ir), headers={'Referer':referer},
|
||||
follow_redirects=False)
|
||||
video_data = httptools.downloadpage('%s%s=%s' % (base_link, ir_type, ir), headers={'Referer': referer},
|
||||
follow_redirects=False)
|
||||
url = video_data.headers['location']
|
||||
title = '%s'
|
||||
new_item = Item(channel=item.channel, title=title, url=url, action='play', language = '', infoLabels=item.infoLabels)
|
||||
itemlist.append(new_item)
|
||||
|
||||
|
||||
else:
|
||||
patron = '<div id="div.*?<div class="movieplay".*?(?:iframe.*?src|IFRAME SRC)="([^"]+)"'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
for link in matches:
|
||||
url = link
|
||||
title = '%s'
|
||||
new_item = Item(channel=item.channel, title=title, url=url, action='play', language = '', infoLabels=item.infoLabels)
|
||||
itemlist.append(new_item)
|
||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda x: x.title % x.server.capitalize())
|
||||
new_item = Item(channel=item.channel, title=title, url=url,
|
||||
action='play', language= IDIOMAS[idioma], infoLabels=item.infoLabels)
|
||||
itemlist.append(new_item)
|
||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % '%s [%s]'%(i.server.capitalize(),i.language))
|
||||
#itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||
if itemlist:
|
||||
if config.get_videolibrary_support():
|
||||
itemlist.append(Item(channel = item.channel, action = ""))
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green",
|
||||
action="add_pelicula_to_library", url=item.url, thumbnail = item.thumbnail,
|
||||
contentTitle = item.contentTitle
|
||||
))
|
||||
return itemlist
|
||||
itemlist.append(Item(channel=item.channel, action=""))
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green",
|
||||
action="add_pelicula_to_library", url=item.url, thumbnail=item.thumbnail,
|
||||
contentTitle=item.contentTitle
|
||||
))
|
||||
# Requerido para FilterTools
|
||||
|
||||
itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
|
||||
# Requerido para AutoPlay
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"id": "domain_name",
|
||||
"type": "text",
|
||||
"label": "URL actual de la Web Mejor Torrent",
|
||||
"default": "https://mejortorrent1.com/",
|
||||
"default": "https://mejortorrent1.net/",
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
|
||||
@@ -809,10 +809,10 @@ def listado_busqueda(item):
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist_t = [] #Itemlist total de enlaces
|
||||
itemlist_f = [] #Itemlist de enlaces filtrados
|
||||
itemlist_t = [] #Itemlist total de enlaces
|
||||
itemlist_f = [] #Itemlist de enlaces filtrados
|
||||
if not item.language:
|
||||
item.language = ['CAST'] #Castellano por defecto
|
||||
item.language = ['CAST'] #Castellano por defecto
|
||||
matches = []
|
||||
|
||||
#logger.debug(item)
|
||||
@@ -827,7 +827,7 @@ def findvideos(item):
|
||||
#Si es un lookup para cargar las urls de emergencia en la Videoteca...
|
||||
if item.videolibray_emergency_urls:
|
||||
item.emergency_urls = []
|
||||
item.emergency_urls.append([]) #Reservamos el espacio para los .torrents locales
|
||||
item.emergency_urls.append([]) #Reservamos el espacio para los .torrents locales
|
||||
|
||||
#Bajamos los datos de la página de todo menos de Documentales y Varios
|
||||
if not item.post:
|
||||
@@ -836,7 +836,7 @@ def findvideos(item):
|
||||
data = data.replace('"', "'")
|
||||
patron = "<form (?:.*?)?"
|
||||
patron += "name='episodios'.+action='([^']+)' method='post'>.*?"
|
||||
patron += "<input.+type='[^']+'.+name='([^']+)'.+value='([^']+)'>.*<input.+type='hidden'.+value='([^']+)'.+name='([^']+)'>"
|
||||
patron += "<input\s*type='[^']+'\s*name='([^']+)'\s*value='([^']+)'>\s*<input\s*type='[^']+'\s*value='([^']+)'\s*name='([^']+)'>(?:\s*<input\s*type='[^']+'\s*value='([^']+)'\s*name='([^']+)'\s*id='([^']+)'>)?"
|
||||
except:
|
||||
pass
|
||||
if not data:
|
||||
@@ -846,10 +846,10 @@ def findvideos(item):
|
||||
matches = item.emergency_urls[1] #Restauramos matches
|
||||
item.armagedon = True #Marcamos la situación como catastrófica
|
||||
else:
|
||||
if item.videolibray_emergency_urls: #Si es llamado desde creación de Videoteca...
|
||||
if item.videolibray_emergency_urls: #Si es llamado desde creación de Videoteca...
|
||||
return item #Devolvemos el Item de la llamada
|
||||
else:
|
||||
return itemlist #si no hay más datos, algo no funciona, pintamos lo que tenemos
|
||||
return itemlist #si no hay más datos, algo no funciona, pintamos lo que tenemos
|
||||
|
||||
if not item.armagedon: #Si es un proceso normal, seguimos
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
@@ -878,55 +878,72 @@ def findvideos(item):
|
||||
if item.videolibray_emergency_urls:
|
||||
item.emergency_urls.append(matches) #Salvamnos matches...
|
||||
|
||||
for scrapedurl, name1, value1, value2, name2 in matches: #Hacemos el FOR aunque solo habrá un item
|
||||
#Generamos una copia de Item para trabajar sobre ella
|
||||
item_local = item.clone()
|
||||
for scrapedurl, name1, value1, value2, name2, value3, name3, id3 in matches: #Hacemos el FOR aunque solo habrá un item
|
||||
url = scrapedurl
|
||||
|
||||
# Localiza el .torrent en el siguiente link con Post
|
||||
post = '%s=%s&%s=%s' % (name1, value1, name2, value2)
|
||||
#post = '%s=%s&%s=%s&%s=%s' % (name1, value1, name2, value2, name3, value3)
|
||||
if not item.armagedon:
|
||||
try:
|
||||
torrent_data = httptools.downloadpage(url, post=post, headers=headers, follow_redirects=False)
|
||||
except: #error
|
||||
pass
|
||||
|
||||
|
||||
else:
|
||||
#Viene de SERIES y DOCUMENTALES. Generamos una copia de Item para trabajar sobre ella
|
||||
item_local = item.clone()
|
||||
try: #Localiza el .torrent en el siguiente link con Post. Viene de Documentales y Varios
|
||||
url = item.url_post
|
||||
torrent_data = httptools.downloadpage(url, post=item.post, headers=headers, follow_redirects=False)
|
||||
del item.url_post
|
||||
post = item.post
|
||||
torrent_data = httptools.downloadpage(url, post=post, headers=headers, follow_redirects=False)
|
||||
except:
|
||||
pass
|
||||
|
||||
if not torrent_data or not 'location' in torrent_data.headers or not torrent_data.headers['location']:
|
||||
if not torrent_data and not ('location' in torrent_data.headers or 'zip' in torrent_data.headers['content-type']):
|
||||
item = generictools.web_intervenida(item, data) #Verificamos que no haya sido clausurada
|
||||
if item.intervencion: #Sí ha sido clausurada judicialmente
|
||||
item, itemlist = generictools.post_tmdb_findvideos(item, itemlist) #Llamamos al método para el pintado del error
|
||||
elif not item.armagedon:
|
||||
logger.error("ERROR 02: FINDVIDEOS: El archivo Torrent no existe o ha cambiado la estructura de la Web " + " / URL: " + url + " / DATA: " + data)
|
||||
logger.error("ERROR 02: FINDVIDEOS: El archivo Torrent no existe o ha cambiado la estructura de la Web " + " / URL: " + url + " / POST: " + post + " / DATA: " + str(torrent_data.headers))
|
||||
itemlist.append(item.clone(action='', title=item.channel.capitalize() + ': ERROR 02: FINDVIDEOS: El archivo Torrent no existe o ha cambiado la estructura de la Web. Verificar en la Web y reportar el error con el log'))
|
||||
|
||||
|
||||
if item.emergency_urls and not item.videolibray_emergency_urls: #Hay urls de emergencia?
|
||||
item_local.url = item.emergency_urls[0][0] #Restauramos la url del .torrent
|
||||
item.url = item.emergency_urls[0][0] #Restauramos la url del .torrent
|
||||
item.armagedon = True #Marcamos la situación como catastrófica
|
||||
else:
|
||||
if item.videolibray_emergency_urls: #Si es llamado desde creación de Videoteca...
|
||||
return item #Devolvemos el Item de la llamada
|
||||
else:
|
||||
return itemlist #si no hay más datos, algo no funciona, pintamos lo que tenemos
|
||||
return itemlist #si no hay más datos, algo no funciona, pintamos lo que tenemos
|
||||
|
||||
#Si el torrent viene en un .zip en vez de desde una url, lo preparamos todo para el play
|
||||
referer_zip = None
|
||||
post_zip = None
|
||||
if 'location' not in torrent_data.headers and 'zip' in torrent_data.headers['content-type'] and not item.armagedon:
|
||||
item.referer = item.url
|
||||
referer_zip = item.referer
|
||||
item.url = url
|
||||
item.post = post
|
||||
post_zip = item.post
|
||||
|
||||
#Generamos una copia de Item para trabajar sobre ella
|
||||
item_local = item.clone()
|
||||
|
||||
#Capturamos la url del .torrent desde el Header
|
||||
if not item.armagedon:
|
||||
item_local.url = torrent_data.headers['location'] if 'location' in torrent_data.headers else item.url_post
|
||||
item_local.url = torrent_data.headers['location'] if 'location' in torrent_data.headers else item.url
|
||||
item_local.url = item_local.url.replace(" ", "%20") #Quitamos espacios
|
||||
if item.emergency_urls:
|
||||
item_local.torrent_alt = item.emergency_urls[0][0] #Guardamos la url del .Torrent ALTERNATIVA
|
||||
|
||||
#Si es un lookup para cargar las urls de emergencia en la Videoteca...
|
||||
if item.videolibray_emergency_urls:
|
||||
item.emergency_urls[0].append(item_local.url) #Salvamnos la url...
|
||||
if 'location' in torrent_data.headers or config.get_setting("emergency_urls_torrents", item_local.channel):
|
||||
item.emergency_urls[0].append(item_local.url) #Salvamnos la url...
|
||||
elif not config.get_setting("emergency_urls_torrents", item_local.channel):
|
||||
item.emergency_urls[0].append(item_local.referer) #Salvamnos el referer...
|
||||
return item #... y nos vamos
|
||||
|
||||
# Poner la calidad, si es necesario
|
||||
@@ -947,7 +964,7 @@ def findvideos(item):
|
||||
size = scrapertools.find_single_match(item_local.url, '(\d{1,3},\d{1,2}?\w+)\.torrent')
|
||||
size = size.upper().replace(".", ",").replace("G", " G ").replace("M", " M ") #sustituimos . por , porque Unify lo borra
|
||||
if not size and not item.armagedon:
|
||||
size = generictools.get_torrent_size(item_local.url) #Buscamos el tamaño en el .torrent
|
||||
size = generictools.get_torrent_size(item_local.url, referer_zip, post_zip) #Buscamos el tamaño en el .torrent
|
||||
if size:
|
||||
item_local.title = re.sub('\s\[\d+,?\d*?\s\w[b|B]\]', '', item_local.title) #Quitamos size de título, si lo traía
|
||||
item_local.title = '%s [%s]' % (item_local.title, size) #Agregamos size al final del título
|
||||
@@ -1021,7 +1038,7 @@ def episodios(item):
|
||||
# Prepara el patrón de búsqueda
|
||||
patron = "<form (?:style='[^']+'\s)?name='episodios' action='([^']+)'"
|
||||
url = scrapertools.find_single_match(data, patron) #Salvamos la url de descarga
|
||||
url = url.replace('descargar_series.php', 'descargar.php') #ESTA DESCARGARÍA EL TORRENT EN VEZ DEL ENLACE
|
||||
url = url.replace('descargar_tv.php', 'descargar_post.php') #ESTA DESCARGARÍA EL TORRENT EN VEZ DEL ENLACE
|
||||
patron = "<form (?:style='[^']+'\s)?name='episodios' action='[^']+'.*?<input type='hidden' value='([^']+)' name='([^']+)'>"
|
||||
value2 = '' #Patrón general para Documentales (1)
|
||||
name2 = ''
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"id": "mirapeliculas",
|
||||
"name": "MiraPeliculas",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["cast", "lat"],
|
||||
"thumbnail": "http://mirapeliculas.net/favicon.ico",
|
||||
"banner": "",
|
||||
"categories": [
|
||||
"movie"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostrar enlaces en idioma...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"No filtrar",
|
||||
"LAT",
|
||||
"ESP",
|
||||
"VOSE"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "modo_grafico",
|
||||
"type": "bool",
|
||||
"label": "Buscar información extra",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "comprueba_enlaces",
|
||||
"type": "bool",
|
||||
"label": "Verificar si los enlaces existen",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "comprueba_enlaces_num",
|
||||
"type": "list",
|
||||
"label": "Número de enlaces a verificar",
|
||||
"default": 1,
|
||||
"enabled": true,
|
||||
"visible": "eq(-1,true)",
|
||||
"lvalues": [ "5", "10", "15", "20" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#------------------------------------------------------------
|
||||
import re, urllib, urlparse
|
||||
|
||||
from channels import autoplay
|
||||
from platformcode import config, logger, platformtools
|
||||
from core.item import Item
|
||||
from core import httptools, scrapertools, jsontools, tmdb
|
||||
from core import servertools
|
||||
from channels import filtertools
|
||||
|
||||
host = 'http://mirapeliculas.net'
|
||||
|
||||
IDIOMAS = {'Latino': 'LAT', 'Español': 'ESP', 'Subtitulado': 'VOSE'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['streamango', 'streamplay', 'openload', 'okru']
|
||||
list_quality = ['BR-Rip', 'HD-Rip', 'DVD-Rip', 'TS-HQ', 'TS-Screner', 'Cam']
|
||||
|
||||
__channel__='mirapeliculas'
|
||||
__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', __channel__)
|
||||
__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', __channel__)
|
||||
try:
|
||||
__modo_grafico__ = config.get_setting('modo_grafico', __channel__)
|
||||
except:
|
||||
__modo_grafico__ = True
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist.append(item.clone(title="Novedades" , action="lista", url= host))
|
||||
itemlist.append(item.clone(title="Castellano" , action="lista", url= host + "/repelis/castellano/"))
|
||||
itemlist.append(item.clone(title="Latino" , action="lista", url= host + "/repelis/latino/"))
|
||||
itemlist.append(item.clone(title="Subtituladas" , action="lista", url= host + "/repelis/subtituladas/"))
|
||||
itemlist.append(item.clone(title="Categorias" , action="categorias", url= host))
|
||||
itemlist.append(item.clone(title="Buscar", action="search"))
|
||||
|
||||
itemlist.append(item.clone(title="Configurar canal...", text_color="gold", action="configuracion", folder=False))
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
def configuracion(item):
|
||||
ret = platformtools.show_channel_settings()
|
||||
platformtools.itemlist_refresh()
|
||||
return ret
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info()
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = host + "/buscar/?q=%s" % texto
|
||||
try:
|
||||
return lista(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 = '<li class="cat-item cat-item-3"><a href="([^"]+)" title="([^"]+)">'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle in matches:
|
||||
scrapedplot = ""
|
||||
scrapedthumbnail = ""
|
||||
itemlist.append(item.clone(channel=item.channel, action="lista", title=scrapedtitle , url=scrapedurl ,
|
||||
thumbnail=scrapedthumbnail , plot=scrapedplot) )
|
||||
return itemlist
|
||||
|
||||
|
||||
def lista(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
patron = '<div class="col-mt-5 postsh">.*?<a href="([^"]+)".*?'
|
||||
patron += '<span class="under-title-gnro">([^"]+)</span>.*?'
|
||||
patron += '<p>(\d+)</p>.*?'
|
||||
patron += '<img src="([^"]+)".*?'
|
||||
patron += 'title="([^"]+)"'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl, calidad, scrapedyear, scrapedthumbnail, scrapedtitle in matches:
|
||||
scrapedplot = ""
|
||||
title = '%s [COLOR red] %s [/COLOR] (%s)' % (scrapedtitle, calidad , scrapedyear)
|
||||
itemlist.append(item.clone(action="findvideos", title=title , url=scrapedurl ,
|
||||
thumbnail=scrapedthumbnail , contentTitle = scrapedtitle, plot=scrapedplot ,
|
||||
quality=calidad, infoLabels={'year':scrapedyear}) )
|
||||
|
||||
tmdb.set_infoLabels(itemlist, True)
|
||||
|
||||
next_page_url = scrapertools.find_single_match(data,'<span class="current">\d+</span>.*?<a href="([^"]+)"')
|
||||
if next_page_url!="":
|
||||
next_page_url = urlparse.urljoin(item.url,next_page_url)
|
||||
itemlist.append(item.clone(channel=item.channel , action="lista" , title="Next page >>" ,
|
||||
text_color="blue", url=next_page_url) )
|
||||
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = '<td><a rel="nofollow" href=.*?'
|
||||
patron += '<td>([^<]+)</td>.*?'
|
||||
patron += '<td>([^<]+)</td>.*?'
|
||||
patron += '<img src=".*?=([^"]+)"'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for lang, calidad, url in matches:
|
||||
if lang in IDIOMAS:
|
||||
lang = IDIOMAS[lang]
|
||||
if not config.get_setting('unify'):
|
||||
title = '[COLOR red] %s [/COLOR] (%s)' % (calidad , lang)
|
||||
else:
|
||||
title = ''
|
||||
itemlist.append(item.clone(action="play", title='%s'+title, url=url, language=lang, quality=calidad ))
|
||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||
# Requerido para Filtrar enlaces
|
||||
if __comprueba_enlaces__:
|
||||
itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__)
|
||||
# Requerido para FilterTools
|
||||
itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
# Requerido para AutoPlay
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra !='findvideos' :
|
||||
itemlist.append(Item(channel=item.channel, action="add_pelicula_to_library",
|
||||
title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]', url=item.url,
|
||||
extra="findvideos", contentTitle=item.contentTitle))
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"id": "mixtoon",
|
||||
"name": "MixToon",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["cast"],
|
||||
"thumbnail": "http://i.imgur.com/iZzF8gE.png",
|
||||
"banner": "http://i.imgur.com/c1YTgNT.png",
|
||||
"categories": [
|
||||
"tvshow"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from channels import renumbertools
|
||||
from channelselector import get_thumb
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
from channels import filtertools
|
||||
from channels import autoplay
|
||||
from lib import gktools
|
||||
|
||||
IDIOMAS = {'castellano': 'Castellano'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['openload'
|
||||
]
|
||||
list_quality = ['default']
|
||||
|
||||
|
||||
host = "https://mixtoon.com"
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
thumb_series = get_thumb("channels_tvshow.png")
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist = list()
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="lista", title="Series", url=host, thumbnail=thumb_series, page=0))
|
||||
itemlist = renumbertools.show_option(item.channel, itemlist)
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
def lista(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
patron = '<a href="([^"]+)" '
|
||||
patron += 'class="link">.+?<img src="([^"]+)".*?'
|
||||
patron += 'title="([^"]+)">'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
# Paginacion
|
||||
num_items_x_pagina = 30
|
||||
min = item.page * num_items_x_pagina
|
||||
min=min-item.page
|
||||
max = min + num_items_x_pagina - 1
|
||||
b=0
|
||||
for link, img, name in matches[min:max]:
|
||||
b=b+1
|
||||
if " y " in name:
|
||||
title=name.replace(" y "," & ")
|
||||
else:
|
||||
title = name
|
||||
url = host + link
|
||||
scrapedthumbnail = host + img
|
||||
context = renumbertools.context(item)
|
||||
context2 = autoplay.context
|
||||
context.extend(context2)
|
||||
itemlist.append(item.clone(title=title, url=url, action="episodios", thumbnail=scrapedthumbnail, show=title,contentSerieName=title,
|
||||
context=context))
|
||||
if b<29:
|
||||
pass
|
||||
else:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, title="[COLOR cyan]Página Siguiente >>[/COLOR]", url=item.url, action="lista", page=item.page + 1))
|
||||
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodios(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
# obtener el numero total de episodios
|
||||
total_episode = 0
|
||||
|
||||
patron_caps = '<li><a href="(.*?)">(.*?)-(.*?)<\/a><\/li>'
|
||||
matches = scrapertools.find_multiple_matches(data, patron_caps)
|
||||
patron_info = '<img src="([^"]+)"><div class="ds"><p>(.*?)<\/p>'
|
||||
scrapedthumbnail, scrapedplot = scrapertools.find_single_match(data, patron_info)
|
||||
show = item.title
|
||||
scrapedthumbnail = host + scrapedthumbnail
|
||||
|
||||
for link, cap, name in matches:
|
||||
|
||||
title = ""
|
||||
pat = "/"
|
||||
if "Mike, Lu & Og"==item.title:
|
||||
pat="&/"
|
||||
if "KND" in item.title:
|
||||
pat="-"
|
||||
# varios episodios en un enlace
|
||||
if len(name.split(pat)) > 1:
|
||||
i = 0
|
||||
for pos in name.split(pat):
|
||||
i = i + 1
|
||||
total_episode += 1
|
||||
season, episode = renumbertools.numbered_for_tratk(item.channel, item.contentSerieName, 1, total_episode)
|
||||
if len(name.split(pat)) == i:
|
||||
title += "%sx%s " % (season, str(episode).zfill(2))
|
||||
else:
|
||||
title += "%sx%s_" % (season, str(episode).zfill(2))
|
||||
else:
|
||||
total_episode += 1
|
||||
season, episode = renumbertools.numbered_for_tratk(item.channel,item.contentSerieName, 1, total_episode)
|
||||
|
||||
title += "%sx%s " % (season, str(episode).zfill(2))
|
||||
|
||||
url = host + "/" + link
|
||||
if "disponible" in link:
|
||||
title += "No Disponible aún"
|
||||
else:
|
||||
title += name
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="findvideos", title=title, url=url, show=show, plot=scrapedplot,
|
||||
thumbnail=scrapedthumbnail))
|
||||
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||
itemlist.append(Item(channel=item.channel, title="[COLOR yellow]Añadir esta serie a la videoteca[/COLOR]", url=item.url,
|
||||
action="add_serie_to_library", extra="episodios", show=show))
|
||||
|
||||
return itemlist
|
||||
|
||||
def findvideos(item):
|
||||
import base64
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
_sl = scrapertools.find_single_match(data, 'var _dt=([^;]+);')
|
||||
sl = eval(_sl)
|
||||
buttons = [0,1]
|
||||
for id in buttons:
|
||||
new_url = "https://videoeb.xyz/" + "eb/" + sl[0] + "/" + sl[1] + "/" + str(id) + "/" + sl[2]
|
||||
data_new = httptools.downloadpage(new_url).data
|
||||
valor1, valor2 = scrapertools.find_single_match(data_new, 'var x0x = \["[^"]*","([^"]+)","[^"]*","[^"]*","([^"]+)')
|
||||
try:
|
||||
url = base64.b64decode(gktools.transforma_gsv(valor2, base64.b64decode(valor1)))
|
||||
if 'download' in url:
|
||||
url = url.replace('download', 'preview')
|
||||
title = '%s'
|
||||
itemlist.append(Item(channel=item.channel, title=title, url=url, action='play', language='latino',
|
||||
infoLabels=item.infoLabels))
|
||||
except Exception as e:
|
||||
logger.info(e)
|
||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||
# Requerido para FilterTools
|
||||
itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
# Requerido para AutoPlay
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
@@ -2,24 +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
|
||||
from core import jsontools
|
||||
|
||||
host = 'http://mporno.tv'
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Novedades" , action="peliculas", url=host + "/most-recent/", plot="/most-recent/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mejor valoradas" , action="peliculas", url=host + "/top-rated/", plot="/top-rated/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas vistas" , action="peliculas", url=host + "/most-viewed/", plot="/most-viewed/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Longitud" , action="peliculas", url=host + "/longest/", plot="/longest/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Novedades" , action="peliculas", url=host + "/most-recent/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mejor valoradas" , action="peliculas", url=host + "/top-rated/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas vistas" , action="peliculas", url=host + "/most-viewed/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Longitud" , action="peliculas", url=host + "/longest/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host + "/channels/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Buscar", action="search"))
|
||||
return itemlist
|
||||
@@ -45,10 +42,11 @@ def categorias(item):
|
||||
patron = '<h3><a href="([^"]+)">(.*?)</a> <small>(.*?)</small></h3>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle,cantidad in matches:
|
||||
scrapedplot = scrapedurl.replace("http://mporno.unblckd.org/", "").replace("page1.html", "")
|
||||
scrapedplot = ""
|
||||
scrapedthumbnail = ""
|
||||
scrapedtitle = scrapedtitle + " " + cantidad
|
||||
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
|
||||
|
||||
|
||||
@@ -64,13 +62,13 @@ def peliculas(item):
|
||||
title = scrapedtitle
|
||||
scrapedurl = scrapedurl.replace("/thumbs/", "/videos/") + ".mp4"
|
||||
thumbnail = scrapedthumbnail
|
||||
plot = item.plot
|
||||
year = ""
|
||||
itemlist.append( Item(channel=item.channel, action="play" , title=title , url=scrapedurl, thumbnail=thumbnail, plot=plot, contentTitle=contentTitle, infoLabels={'year':year} ))
|
||||
plot = ""
|
||||
itemlist.append( Item(channel=item.channel, action="play", title=title, url=scrapedurl, thumbnail=thumbnail,
|
||||
plot=plot, contentTitle=contentTitle))
|
||||
next_page_url = scrapertools.find_single_match(data,'<a href=\'([^\']+)\' class="next">Next >></a>')
|
||||
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.clone(action="peliculas", title="Página Siguiente >>", text_color="blue", url=next_page_url) )
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -7,15 +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.muchoporno.xxx'
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Nuevas" , action="peliculas", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Nuevas" , action="lista", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Pornstars" , action="categorias", url=host + "/pornstars/"))
|
||||
#itemlist.append( Item(channel=item.channel, title="Canal" , action="categorias", url=host + "/sitios/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host + "/categorias/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Buscar", action="search"))
|
||||
return itemlist
|
||||
@@ -26,7 +26,7 @@ def search(item, texto):
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = host + "/search/?q=%s" % texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
return lista(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -39,22 +39,47 @@ def categorias(item):
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<a class="muestra-escena muestra-categoria" href="([^"]+)" title="([^"]+)">.*?src="([^"]+)"'
|
||||
if "/sitios/" in item.url:
|
||||
patron = '<div class="muestra-escena muestra-canales">.*?href="(.*?)">.*?'
|
||||
patron += 'src="(.*?)".*?'
|
||||
patron += '<a title="(.*?)".*?'
|
||||
patron += '</span> (.*?) videos</span>'
|
||||
if "/pornstars/" in item.url:
|
||||
patron = '<a class="muestra-escena muestra-pornostar" href="([^"]+)">.*?'
|
||||
patron += 'src="([^"]+)".*?'
|
||||
patron += 'alt="([^"]+)".*?'
|
||||
patron += '</span> (\d+) videos</span>'
|
||||
else:
|
||||
patron = '<a class="muestra-escena muestra-categoria" href="([^"]+)" title="[^"]+">.*?'
|
||||
patron += 'src="([^"]+)".*?'
|
||||
patron += '</span> ([^"]+) </h2>(.*?)>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail in matches:
|
||||
for scrapedurl,scrapedthumbnail,scrapedtitle,cantidad in matches:
|
||||
scrapedplot = ""
|
||||
scrapedtitle = scrapedtitle
|
||||
cantidad = " (" + cantidad + ")"
|
||||
if "</a" in cantidad:
|
||||
cantidad = ""
|
||||
scrapedtitle = scrapedtitle + cantidad
|
||||
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="lista", title=scrapedtitle, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail , plot=scrapedplot) )
|
||||
next_page = scrapertools.find_single_match(data,'<li><a href="([^"]+)">Siguiente</a></li>')
|
||||
if next_page!="":
|
||||
next_page = urlparse.urljoin(item.url,next_page)
|
||||
itemlist.append(item.clone(action="categorias", title="Página Siguiente >>", text_color="blue", url=next_page) )
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
def lista(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = scrapertools.cachePage(item.url)
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<a class="muestra-escena"\s*href="([^"]+)".*?data-stats-video-name="([^"]+)".*?<img src="([^"]+)".*?<span class="ico-minutos sprite" title="Length"></span>([^"]+)</span>'
|
||||
patron = '<a class="muestra-escena"\s*href="([^"]+)".*?'
|
||||
patron += 'data-stats-video-name="([^"]+)".*?'
|
||||
patron += '<img src="([^"]+)".*?'
|
||||
patron += '<span class="ico-minutos sprite" title="Length"></span>([^"]+)</span>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail,duracion in matches:
|
||||
url = urlparse.urljoin(item.url,scrapedurl)
|
||||
@@ -63,11 +88,12 @@ def peliculas(item):
|
||||
thumbnail = scrapedthumbnail
|
||||
plot = ""
|
||||
year = ""
|
||||
itemlist.append( Item(channel=item.channel, action="play" , title=title , url=url, thumbnail=thumbnail, plot=plot, contentTitle = contentTitle, infoLabels={'year':year} ))
|
||||
next_page_url = scrapertools.find_single_match(data,'<li><a href="([^"]+)">Siguiente</a></li>')
|
||||
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=url, thumbnail=thumbnail,
|
||||
plot=plot, contentTitle = contentTitle))
|
||||
next_page = scrapertools.find_single_match(data,'<li><a href="([^"]+)">Siguiente</a></li>')
|
||||
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
|
||||
|
||||
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
{
|
||||
"id": "mundoflv",
|
||||
"name": "MundoFlv",
|
||||
"active": false,
|
||||
"adult": false,
|
||||
"language": ["lat"],
|
||||
"thumbnail": "https://s32.postimg.cc/h1ewz9hhx/mundoflv.png",
|
||||
"banner": "mundoflv.png",
|
||||
"categories": [
|
||||
"tvshow"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostrar enlaces en idioma...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"No filtrar",
|
||||
"Latino",
|
||||
"Español",
|
||||
"VOS",
|
||||
"VOSE",
|
||||
"VO"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,655 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import urlparse
|
||||
|
||||
from channels import autoplay
|
||||
from channels import filtertools
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
from channelselector import get_thumb
|
||||
|
||||
host = "http://mundoflv.com"
|
||||
thumbmx = 'http://flags.fmcdn.net/data/flags/normal/mx.png'
|
||||
thumbes = 'http://flags.fmcdn.net/data/flags/normal/es.png'
|
||||
thumben = 'http://flags.fmcdn.net/data/flags/normal/gb.png'
|
||||
thumbsub = 'https://s32.postimg.cc/nzstk8z11/sub.png'
|
||||
thumbtodos = 'https://s29.postimg.cc/4p8j2pkdj/todos.png'
|
||||
patrones = ['<<meta property="og:image" content="([^"]+)" \/>" \/>', '\/><\/a>([^*]+)<p><\/p>.*']
|
||||
|
||||
IDIOMAS = {'la': 'Latino',
|
||||
'es': 'Español',
|
||||
'sub': 'VOS',
|
||||
'vosi': 'VOSE',
|
||||
'en': 'VO'
|
||||
}
|
||||
list_language = IDIOMAS.values()
|
||||
list_quality = []
|
||||
list_servers = [
|
||||
'openload',
|
||||
'gamovideo',
|
||||
'powvideo',
|
||||
'streamplay',
|
||||
'streamin',
|
||||
'streame',
|
||||
'flashx',
|
||||
'nowvideo'
|
||||
]
|
||||
|
||||
list_quality = ['default']
|
||||
|
||||
audio = {'la': '[COLOR limegreen]LATINO[/COLOR]', 'es': '[COLOR yellow]ESPAÑOL[/COLOR]',
|
||||
'sub': '[COLOR orange]ORIGINAL SUBTITULADO[/COLOR]', 'en': '[COLOR red]Original[/COLOR]',
|
||||
'vosi': '[COLOR red]ORIGINAL SUBTITULADO INGLES[/COLOR]'
|
||||
}
|
||||
|
||||
headers = [['User-Agent', 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'],
|
||||
['Referer', host]]
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
itemlist = []
|
||||
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
title="Series",
|
||||
action="todas",
|
||||
url=host,
|
||||
thumbnail=get_thumb('tvshows', auto=True),
|
||||
fanart='https://s27.postimg.cc/iahczwgrn/series.png'
|
||||
))
|
||||
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
title="Alfabetico",
|
||||
action="letras",
|
||||
url=host,
|
||||
thumbnail=get_thumb('alphabet', auto=True),
|
||||
fanart='https://s17.postimg.cc/fwi1y99en/a-z.png'
|
||||
))
|
||||
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
title="Mas vistas",
|
||||
action="masvistas",
|
||||
url=host,
|
||||
thumbnail=get_thumb('more watched', auto=True),
|
||||
fanart='https://s9.postimg.cc/wmhzu9d7z/vistas.png'
|
||||
))
|
||||
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
title="Recomendadas",
|
||||
action="recomendadas",
|
||||
url=host,
|
||||
thumbnail=get_thumb('recomended', auto=True),
|
||||
fanart='https://s12.postimg.cc/s881laywd/recomendadas.png'
|
||||
))
|
||||
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
title="Ultimas Agregadas",
|
||||
action="ultimas",
|
||||
url=host, thumbnail=get_thumb('last', auto=True),
|
||||
fanart='https://s22.postimg.cc/cb7nmhwv5/ultimas.png'
|
||||
))
|
||||
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
title="Buscar",
|
||||
action="search",
|
||||
url='http://mundoflv.com/?s=',
|
||||
thumbnail=get_thumb('search', auto=True),
|
||||
fanart='https://s30.postimg.cc/pei7txpa9/buscar.png'
|
||||
))
|
||||
|
||||
if autoplay.context:
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def todas(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
|
||||
patron = 'class="item"><a href="(.*?)" title="(.*?)(?:\|.*?|\(.*?|- )(\d{4})(?:\)|-)".*?'
|
||||
patron += '<div class="img">.*?'
|
||||
patron += '<img src="([^"]+)" alt.*?>'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedtitle, scrapedyear, scrapedthumbnail in matches:
|
||||
url = scrapedurl
|
||||
title = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
title = title.rstrip(' ')
|
||||
thumbnail = scrapedthumbnail
|
||||
year = scrapedyear
|
||||
plot = ''
|
||||
|
||||
fanart = 'https://s32.postimg.cc/h1ewz9hhx/mundoflv.png'
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="temporadas",
|
||||
title=title,
|
||||
url=url,
|
||||
thumbnail=thumbnail,
|
||||
plot=plot,
|
||||
fanart=fanart,
|
||||
contentSerieName=title,
|
||||
infoLabels={'year': year},
|
||||
show=title,
|
||||
list_language=list_language,
|
||||
context=autoplay.context
|
||||
))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
itemlist = fail_tmdb(itemlist)
|
||||
# Paginacion
|
||||
next_page_url = scrapertools.find_single_match(data, '<link rel="next" href="([^"]+)" />')
|
||||
|
||||
if next_page_url != "":
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
action="todas",
|
||||
title=">> Página siguiente",
|
||||
url=next_page_url,
|
||||
thumbnail='https://s16.postimg.cc/9okdu7hhx/siguiente.png'
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def letras(item):
|
||||
thumbletras = {'0-9': 'https://s32.postimg.cc/drojt686d/image.png',
|
||||
'0 - 9': 'https://s32.postimg.cc/drojt686d/image.png',
|
||||
'#': 'https://s32.postimg.cc/drojt686d/image.png',
|
||||
'a': 'https://s32.postimg.cc/llp5ekfz9/image.png',
|
||||
'b': 'https://s32.postimg.cc/y1qgm1yp1/image.png',
|
||||
'c': 'https://s32.postimg.cc/vlon87gmd/image.png',
|
||||
'd': 'https://s32.postimg.cc/3zlvnix9h/image.png',
|
||||
'e': 'https://s32.postimg.cc/bgv32qmsl/image.png',
|
||||
'f': 'https://s32.postimg.cc/y6u7vq605/image.png',
|
||||
'g': 'https://s32.postimg.cc/9237ib6jp/image.png',
|
||||
'h': 'https://s32.postimg.cc/812yt6pk5/image.png',
|
||||
'i': 'https://s32.postimg.cc/6nbbxvqat/image.png',
|
||||
'j': 'https://s32.postimg.cc/axpztgvdx/image.png',
|
||||
'k': 'https://s32.postimg.cc/976yrzdut/image.png',
|
||||
'l': 'https://s32.postimg.cc/fmal2e9yd/image.png',
|
||||
'm': 'https://s32.postimg.cc/m19lz2go5/image.png',
|
||||
'n': 'https://s32.postimg.cc/b2ycgvs2t/image.png',
|
||||
'o': 'https://s32.postimg.cc/c6igsucpx/image.png',
|
||||
'p': 'https://s32.postimg.cc/jnro82291/image.png',
|
||||
'q': 'https://s32.postimg.cc/ve5lpfv1h/image.png',
|
||||
'r': 'https://s32.postimg.cc/nmovqvqw5/image.png',
|
||||
's': 'https://s32.postimg.cc/zd2t89jol/image.png',
|
||||
't': 'https://s32.postimg.cc/wk9lo8jc5/image.png',
|
||||
'u': 'https://s32.postimg.cc/w8s5bh2w5/image.png',
|
||||
'v': 'https://s32.postimg.cc/e7dlrey91/image.png',
|
||||
'w': 'https://s32.postimg.cc/fnp49k15x/image.png',
|
||||
'x': 'https://s32.postimg.cc/dkep1w1d1/image.png',
|
||||
'y': 'https://s32.postimg.cc/um7j3zg85/image.png',
|
||||
'z': 'https://s32.postimg.cc/jb4vfm9d1/image.png'}
|
||||
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
patron = '<li><a.*?href="([^"]+)">([^<]+)<\/a><\/li>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
url = urlparse.urljoin(item.url, scrapedurl)
|
||||
title = scrapedtitle
|
||||
if scrapedtitle.lower() in thumbletras:
|
||||
thumbnail = thumbletras[scrapedtitle.lower()]
|
||||
else:
|
||||
thumbnail = ''
|
||||
plot = ""
|
||||
fanart = item.fanart
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="todas",
|
||||
title=title,
|
||||
url=url,
|
||||
thumbnail=thumbnail,
|
||||
plot=plot,
|
||||
fanart=fanart,
|
||||
contentSerieName=title
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def fail_tmdb(itemlist):
|
||||
logger.info()
|
||||
realplot = ''
|
||||
for item in itemlist:
|
||||
if item.infoLabels['plot'] == '':
|
||||
data = httptools.downloadpage(item.url).data
|
||||
if item.thumbnail == '':
|
||||
item.thumbnail = scrapertools.find_single_match(data, patrones[0])
|
||||
realplot = scrapertools.find_single_match(data, patrones[1])
|
||||
item.plot = scrapertools.remove_htmltags(realplot)
|
||||
return itemlist
|
||||
|
||||
|
||||
def masvistas(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
|
||||
patron = '<li><a href="(?!http:\/\/mundoflv\.com\/tag\/)(.*?)">.*?'
|
||||
patron += 'div class="im">.*?'
|
||||
patron += '<img src=".*?" alt="(.*?)(?:\|.*?|\(.*?|- )(\d{4})|-" \/>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedtitle, scrapedyear in matches:
|
||||
url = scrapedurl
|
||||
title = scrapedtitle
|
||||
fanart = item.fanart
|
||||
contentSerieName = scrapedtitle
|
||||
year = scrapedyear
|
||||
thumbnail = ''
|
||||
plot = 'nada'
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="temporadas",
|
||||
title=title,
|
||||
url=url,
|
||||
thumbnail=thumbnail,
|
||||
plot=plot,
|
||||
fanart=fanart,
|
||||
contentSerieName=contentSerieName,
|
||||
infoLabels={'year': year},
|
||||
context=autoplay.context
|
||||
))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
itemlist = fail_tmdb(itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
def recomendadas(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
realplot = ''
|
||||
patron = '<li><A HREF="([^"]+)"><.*?>Ver ([^<]+)<\/A><\/li>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
url = urlparse.urljoin(item.url, scrapedurl)
|
||||
data = httptools.downloadpage(scrapedurl).data
|
||||
thumbnail = scrapertools.get_match(data, '<meta property="og:image" content="([^"]+)".*?>')
|
||||
realplot = scrapertools.find_single_match(data, '\/><\/a>([^*]+)<p><\/p>.*')
|
||||
plot = scrapertools.remove_htmltags(realplot)
|
||||
title = scrapedtitle.replace('online', '')
|
||||
title = scrapertools.decodeHtmlentities(title)
|
||||
fanart = item.fanart
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="temporadas",
|
||||
title=title,
|
||||
url=url,
|
||||
thumbnail=thumbnail,
|
||||
plot=plot,
|
||||
fanart=fanart,
|
||||
contentSerieName=title,
|
||||
context=autoplay.context
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def ultimas(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
realplot = ''
|
||||
patron = '<li><A HREF="([^"]+)"> <.*?>Ver ([^<]+)<\/A><\/li>'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
url = urlparse.urljoin(item.url, scrapedurl)
|
||||
data = httptools.downloadpage(scrapedurl).data
|
||||
thumbnail = scrapertools.get_match(data, '<meta property="og:image" content="([^"]+)".*?>')
|
||||
realplot = scrapertools.find_single_match(data, '\/><\/a>([^*]+)<p><\/p>.*')
|
||||
plot = scrapertools.remove_htmltags(realplot)
|
||||
plot = ""
|
||||
title = scrapedtitle.replace('online', '')
|
||||
title = scrapertools.decodeHtmlentities(title)
|
||||
fanart = item.fanart
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="idioma",
|
||||
title=title,
|
||||
url=url,
|
||||
thumbnail=thumbnail,
|
||||
plot=plot,
|
||||
fanart=fanart,
|
||||
contentSerieName=title,
|
||||
context=autoplay.context
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def temporadas(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
templist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = data.replace ('"',"'")
|
||||
realplot = ''
|
||||
patron = "<button class='classnamer' onclick='javascript: mostrarcapitulos.*?blank'>([^<]+)<\/button>"
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
serieid = scrapertools.find_single_match(data, "data-nonce='(.*?)'")
|
||||
item.thumbnail = item.thumbvid
|
||||
infoLabels = item.infoLabels
|
||||
for scrapedtitle in matches:
|
||||
url = 'http://mundoflv.com/wp-content/themes/wpRafael/includes/capitulos.php?serie=' + serieid + \
|
||||
'&temporada=' + scrapedtitle
|
||||
title = 'Temporada ' + scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
contentSeasonNumber = scrapedtitle
|
||||
thumbnail = item.thumbnail
|
||||
realplot = scrapertools.find_single_match(data, '\/><\/a>([^*]+)<p><\/p>.*')
|
||||
plot = ''
|
||||
fanart = ''
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="episodiosxtemp",
|
||||
title=title,
|
||||
fulltitle=item.title,
|
||||
url=url,
|
||||
thumbnail=thumbnail,
|
||||
plot=plot,
|
||||
fanart=fanart,
|
||||
extra1=item.extra1,
|
||||
contentSerieName=item.contentSerieName,
|
||||
contentSeasonNumber=contentSeasonNumber,
|
||||
infoLabels={'season': contentSeasonNumber},
|
||||
context=item.context
|
||||
))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
title='[COLOR yellow]Añadir esta serie a la videoteca[/COLOR]',
|
||||
url=item.url,
|
||||
action="add_serie_to_library",
|
||||
extra="episodios",
|
||||
contentSerieName=item.contentSerieName,
|
||||
extra1=item.extra1
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodios(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
templist = temporadas(item)
|
||||
for tempitem in templist:
|
||||
itemlist += episodiosxtemp(tempitem)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodiosxtemp(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = data.replace('"', "'")
|
||||
patron = "<button class='classnamer' onclick='javascript: mostrarenlaces\(([^\)]+)\).*?<"
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedtitle in matches:
|
||||
item.url = item.url.replace("&sr", "")
|
||||
item.url = item.url.replace("capitulos", "enlaces")
|
||||
url = item.url + '&capitulo=' + scrapedtitle
|
||||
contentEpisodeNumber = scrapedtitle
|
||||
title = item.contentSerieName + ' ' + item.contentSeasonNumber + 'x' + contentEpisodeNumber
|
||||
thumbnail = item.thumbnail
|
||||
plot = ''
|
||||
infoLabels = item.infoLabels
|
||||
infoLabels['episode'] = contentEpisodeNumber
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
title=title,
|
||||
fulltitle=item.fulltitle,
|
||||
url=url,
|
||||
thumbnail=thumbnail,
|
||||
plot=plot,
|
||||
extra1=item.extra1,
|
||||
idioma='',
|
||||
contentSerieName=item.contentSerieName,
|
||||
contentSeasonNumber=item.contentSeasonNumber,
|
||||
infoLabels=infoLabels,
|
||||
show=item.contentSerieName,
|
||||
list_language=list_language,
|
||||
context=item.context
|
||||
))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
|
||||
|
||||
def idioma(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
thumbvid = item.thumbnail
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
title="Latino",
|
||||
action="temporadas",
|
||||
url=item.url,
|
||||
thumbnail=thumbmx,
|
||||
fanart='',
|
||||
extra1='la',
|
||||
fulltitle=item.title,
|
||||
thumbvid=thumbvid,
|
||||
contentSerieName=item.contentSerieName,
|
||||
infoLabels=item.infoLabels,
|
||||
language='la'
|
||||
))
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
title="Español",
|
||||
action="temporadas",
|
||||
url=item.url,
|
||||
thumbnail=thumbes,
|
||||
fanart='',
|
||||
extra1='es',
|
||||
fulltitle=item.title,
|
||||
thumbvid=thumbvid,
|
||||
contentSerieName=item.contentSerieName,
|
||||
language='es'
|
||||
))
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
title="Subtitulado",
|
||||
action="temporadas",
|
||||
url=item.url,
|
||||
thumbnail=thumbsub,
|
||||
fanart='',
|
||||
extra1='sub',
|
||||
fulltitle=item.title,
|
||||
thumbvid=thumbvid,
|
||||
contentSerieName=item.contentSerieName,
|
||||
language='sub'
|
||||
))
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
title="Original",
|
||||
action="temporadas",
|
||||
url=item.url,
|
||||
thumbnail=thumben,
|
||||
fanart='',
|
||||
extra1='en',
|
||||
fulltitle=item.title,
|
||||
thumbvid=thumbvid,
|
||||
contentSerieName=item.contentSerieName,
|
||||
language='en'
|
||||
))
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
title="Original Subtitulado en Ingles",
|
||||
action="temporadas",
|
||||
url=item.url,
|
||||
thumbnail=thumben,
|
||||
fanart='',
|
||||
extra1='vosi',
|
||||
fulltitle=item.title,
|
||||
thumbvid=thumbvid,
|
||||
contentSerieName=item.contentSerieName,
|
||||
language='vosi'
|
||||
))
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
title="Todo",
|
||||
action="temporadas",
|
||||
url=item.url,
|
||||
thumbnail=thumbtodos,
|
||||
fanart='',
|
||||
extra1='all',
|
||||
fulltitle=item.title,
|
||||
thumbvid=thumbvid,
|
||||
contentSerieName=item.contentSerieName,
|
||||
language='all'
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def busqueda(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
|
||||
patron = '<img class=.*?src="([^"]+)" alt="(.*?)(?:\|.*?|\(.*?|")>.*?h3><a href="(.*?)".*?class="year">(' \
|
||||
'.*?)<\/span>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
scrapertools.printMatches(matches)
|
||||
|
||||
for scrapedthumbnail, scrapedtitle, scrapedurl, scrapedyear in matches:
|
||||
url = scrapedurl
|
||||
title = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
thumbnail = scrapedthumbnail
|
||||
plot = ''
|
||||
year = scrapedyear
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="idioma",
|
||||
title=title,
|
||||
fulltitle=title,
|
||||
url=url,
|
||||
thumbnail=thumbnail,
|
||||
plot=plot,
|
||||
contentSerieName=title,
|
||||
infoLabels={'year': year},
|
||||
context=autoplay.context
|
||||
))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
itemlist = fail_tmdb(itemlist)
|
||||
|
||||
# Paginacion
|
||||
next_page_url = scrapertools.find_single_match(data,
|
||||
"<a rel='nofollow' class=previouspostslink' href='(["
|
||||
"^']+)'>Siguiente ›</a>")
|
||||
if next_page_url != "":
|
||||
item.url = next_page_url
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="busqueda",
|
||||
title=">> Página siguiente",
|
||||
url=next_page_url,
|
||||
thumbnail='https://s16.postimg.cc/9okdu7hhx/siguiente.png'
|
||||
))
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info()
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = item.url + texto
|
||||
if texto != '':
|
||||
return busqueda(item)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = 'href="([^"]+)".*?domain=.*?>([^<]+).*?gold">([^<]+)<'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedserver, scrapedidioma in matches:
|
||||
url = scrapedurl
|
||||
idioma = audio[scrapedidioma]
|
||||
server = scrapedserver.strip(' ')
|
||||
if server == 'streamin':
|
||||
server = 'streaminto'
|
||||
title = item.contentSerieName + ' ' + str(item.contentSeasonNumber) + 'x' + str(
|
||||
item.contentEpisodeNumber) + ' ' + idioma + ' (' + server + ')'
|
||||
|
||||
new_item = item.clone(title=title,
|
||||
url=url,
|
||||
action="play",
|
||||
language=IDIOMAS[scrapedidioma],
|
||||
server=server,
|
||||
quality='default',
|
||||
fulltitle=item.ContentSeriename,
|
||||
)
|
||||
|
||||
# Requerido para FilterTools
|
||||
|
||||
itemlist = filtertools.get_link(itemlist, new_item, list_language)
|
||||
|
||||
import os
|
||||
for videoitem in itemlist:
|
||||
videoitem.infoLabels = item.infoLabels
|
||||
videoitem.thumbnail = os.path.join(config.get_runtime_path(), "resources", "media", "servers",
|
||||
"server_%s.png" % videoitem.server)
|
||||
|
||||
# Requerido para AutoPlay
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def play(item):
|
||||
logger.info()
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
if item.server not in ['streamplay','streame', 'clipwatching', 'vidoza']:
|
||||
url = scrapertools.find_single_match(data, '<(?:IFRAME|iframe).*?(?:SRC|src)=*([^ ]+) (?!style|STYLE)')
|
||||
else:
|
||||
url = scrapertools.find_single_match(data, '<meta http-equiv="refresh" content="0; url=([^"]+)">')
|
||||
|
||||
itemlist = servertools.find_video_items(data=url)
|
||||
for videoitem in itemlist:
|
||||
videoitem.infoLabels = item.infoLabels
|
||||
videoitem.title = item.title
|
||||
videoitem.thumbnail = videoitem.infoLabels['thumbnail']
|
||||
|
||||
return itemlist
|
||||
@@ -93,7 +93,7 @@
|
||||
"id": "clonenewpct1_channels_list",
|
||||
"type": "text",
|
||||
"label": "Lista de clones de NewPct1 y orden de uso",
|
||||
"default": "('1', 'descargas2020', 'http://descargas2020.com/', 'movie, tvshow, season, episode', ''), ('1', 'tumejortorrent', 'http://tumejortorrent.com/', 'movie, tvshow, season, episode', ''), ('1', 'torrentrapid', 'http://torrentrapid.com/', 'movie, tvshow, season, episode', 'serie_episodios'), ('1', 'pctnew', 'http://pctnew.com/', 'movie, tvshow, season, episode', ''), ('1', 'torrentlocura', 'http://torrentlocura.com/', 'movie, tvshow, season, episode', ''), ('1', 'tvsinpagar', 'http://www.tvsinpagar.com/', 'tvshow, season, episode', ''), ('1', 'planetatorrent', 'http://planetatorrent.com/', 'movie, tvshow, season, episode', ''), ('1', 'mispelisyseries', 'http://mispelisyseries.com/', 'movie', 'search, listado_busqueda')",
|
||||
"default": "('1', 'descargas2020', 'https://descargas2020.com/', 'movie, tvshow, season, episode', ''), ('1', 'tumejortorrent', 'https://tumejortorrent.com/', 'movie, tvshow, season, episode', ''), ('1', 'torrentrapid', 'https://torrentrapid.com/', 'movie, tvshow, season, episode', 'serie_episodios'), ('1', 'pctnew', 'https://pctnew.com/', 'movie, tvshow, season, episode', ''), ('1', 'torrentlocura', 'http://torrentlocura.com/', 'movie, tvshow, season, episode', ''), ('1', 'tvsinpagar', 'http://www.tvsinpagar.com/', 'tvshow, season, episode', ''), ('1', 'planetatorrent', 'http://planetatorrent.com/', 'movie, tvshow, season, episode', ''), ('1', 'mispelisyseries', 'http://mispelisyseries.com/', 'movie', 'search, listado_busqueda')",
|
||||
"enabled": true,
|
||||
"visible": false
|
||||
},
|
||||
|
||||
@@ -172,7 +172,7 @@ def submenu(item):
|
||||
except:
|
||||
pass
|
||||
|
||||
patron = '<li><a\s?class="[^"]+"\s?href="http:[^"]+"><i\s?class=.*><\/i>.*Inicio<\/a><\/li>(.+)<\/ul>\s?<\/nav>'
|
||||
patron = '<li><a\s*class="[^"]+"\s*href="http.*:[^"]+"><i\s*class=.*><\/i>.*Inicio<\/a><\/li>(.+)<\/ul>\s*<\/nav>'
|
||||
#Verificamos si se ha cargado una página, y si además tiene la estructura correcta
|
||||
if not data or not scrapertools.find_single_match(data, patron):
|
||||
item = generictools.web_intervenida(item, data) #Verificamos que no haya sido clausurada
|
||||
@@ -264,6 +264,7 @@ def submenu_novedades(item):
|
||||
itemlist = []
|
||||
itemlist_alt = []
|
||||
item.extra2 = ''
|
||||
thumb_buscar = get_thumb("search.png")
|
||||
|
||||
#Renombramos el canal al nombre de clone inicial desde la URL
|
||||
item.channel_host = host
|
||||
@@ -327,6 +328,9 @@ def submenu_novedades(item):
|
||||
item.post = "date=%s" % value
|
||||
itemlist.append(item.clone(action="listado_busqueda", title=title, url=item.url, post=item.post))
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="search", title="Buscar", url=item.channel_host + "buscar", thumbnail=thumb_buscar, category=item.category, channel_host=item.channel_host))
|
||||
|
||||
itemlist.append(item.clone(action='', title="[COLOR yellow]Lo Último en la Categoría:[/COLOR]"))
|
||||
for value, title in matches:
|
||||
if value.isdigit():
|
||||
@@ -1430,9 +1434,9 @@ def findvideos(item):
|
||||
data = data.replace("$!", "#!").replace("'", "\"").replace("ñ", "ñ").replace("//pictures", "/pictures")
|
||||
url_servidores = item.url
|
||||
category_servidores = item.category
|
||||
data_servidores = data #salvamos data para verificar servidores, si es necesario
|
||||
data_servidores = data #salvamos data para verificar servidores, si es necesario
|
||||
data_servidores_stat = False
|
||||
except: #La web no responde. Probemos las urls de emergencia
|
||||
except: #La web no responde. Probemos las urls de emergencia
|
||||
pass
|
||||
|
||||
patron = 'class="btn-torrent">.*?window.location.href = "(.*?)";' #Patron para .torrent
|
||||
@@ -1441,8 +1445,11 @@ def findvideos(item):
|
||||
patron_alt = '<a href="([^"]+)"\s?title="[^"]+"\s?class="btn-torrent"' #Patron para .torrent (planetatorrent)
|
||||
if scrapertools.find_single_match(data, patron):
|
||||
patron = patron_alt
|
||||
url_torr = scrapertools.find_single_match(data, patron)
|
||||
if not url_torr.startswith("http"): #Si le falta el http.: lo ponemos
|
||||
url_torr = scrapertools.find_single_match(host, '(\w+:)//') + url_torr
|
||||
#Verificamos si se ha cargado una página, y si además tiene la estructura correcta
|
||||
if not data or not scrapertools.find_single_match(data, patron) or not videolibrarytools.verify_url_torrent(scrapertools.find_single_match(data, patron)): # Si no hay datos o url, error
|
||||
if not data or not scrapertools.find_single_match(data, patron) or not videolibrarytools.verify_url_torrent(url_torr): # Si no hay datos o url, error
|
||||
item = generictools.web_intervenida(item, data) #Verificamos que no haya sido clausurada
|
||||
if item.intervencion: #Sí ha sido clausurada judicialmente
|
||||
item, itemlist = generictools.post_tmdb_findvideos(item, itemlist) #Llamamos al método para el pintado del error
|
||||
@@ -1462,7 +1469,7 @@ def findvideos(item):
|
||||
#Si no hay datos consistentes, llamamos al método de fail_over para que encuentre un canal que esté activo y pueda gestionar el vídeo
|
||||
item, data = generictools.fail_over_newpct1(item, patron_mult)
|
||||
|
||||
if not data: #Si no ha logrado encontrar nada, verificamos si hay servidores
|
||||
if not data: #Si no ha logrado encontrar nada, verificamos si hay servidores
|
||||
cnt_servidores = 0
|
||||
item.category = category_servidores #restauramos valores originales
|
||||
item.url = url_servidores
|
||||
@@ -1474,8 +1481,8 @@ def findvideos(item):
|
||||
enlaces_ver = re.compile(patron, re.DOTALL).findall(data_servidores)
|
||||
enlaces_descargar = enlaces_ver
|
||||
|
||||
for logo, servidor, idioma, calidad, enlace, title in enlaces_ver: #buscamos enlaces de servidores de ver-online
|
||||
if ver_enlaces_veronline == 0: #Si no se quiere Ver Online, se sale del bloque
|
||||
for logo, servidor, idioma, calidad, enlace, title in enlaces_ver: #buscamos enlaces de servidores de ver-online
|
||||
if ver_enlaces_veronline == 0: #Si no se quiere Ver Online, se sale del bloque
|
||||
break
|
||||
if "ver" in title.lower():
|
||||
cnt_servidores += 1
|
||||
@@ -1484,13 +1491,13 @@ def findvideos(item):
|
||||
item, data_servidores = generictools.fail_over_newpct1(item, patron) #intentamos recuperar servidores
|
||||
|
||||
#Miramos si ha servidores
|
||||
if not data_servidores: #Si no ha logrado encontrar nada nos vamos
|
||||
if not data_servidores: #Si no ha logrado encontrar nada nos vamos
|
||||
itemlist.append(item.clone(action='', title="[COLOR yellow]" + item.channel.capitalize() + '[/COLOR]: Ningún canal NewPct1 activo'))
|
||||
itemlist.append(item.clone(action='', title=item.category + ': ERROR 01: FINDVIDEOS:. La Web no responde o la URL es erronea. Si la Web está activa, reportar el error con el log'))
|
||||
if item.videolibray_emergency_urls:
|
||||
return item
|
||||
else:
|
||||
return itemlist #si no hay más datos, algo no funciona, pintamos lo que tenemos
|
||||
return itemlist #si no hay más datos, algo no funciona, pintamos lo que tenemos
|
||||
|
||||
data = data_servidores #restauramos los datos
|
||||
data_servidores_stat = True #Marcamos como que los hemos usado
|
||||
@@ -1510,8 +1517,8 @@ def findvideos(item):
|
||||
size = size.replace(".", ",") #sustituimos . por , porque Unify lo borra
|
||||
if not size:
|
||||
size = scrapertools.find_single_match(item.quality, '\s?\[(\d+.?\d*?\s?\w\s?[b|B])\]')
|
||||
if not size and not item.armagedon:
|
||||
size = generictools.get_torrent_size(scrapertools.find_single_match(data, patron)) #Buscamos el tamaño en el .torrent
|
||||
if not size and not item.armagedon and not item.videolibray_emergency_urls:
|
||||
size = generictools.get_torrent_size(url_torr) #Buscamos el tamaño en el .torrent
|
||||
if size:
|
||||
item.title = re.sub(r'\s\[\d+,?\d*?\s\w[b|B]\]', '', item.title) #Quitamos size de título, si lo traía
|
||||
item.title = '%s [%s]' % (item.title, size) #Agregamos size al final del título
|
||||
@@ -1527,13 +1534,13 @@ def findvideos(item):
|
||||
|
||||
# Verificamos la url torrent o usamos la de emergencia
|
||||
if not item.armagedon:
|
||||
item_local.url = scrapertools.find_single_match(data, patron)
|
||||
item_local.url = url_torr
|
||||
if item_local.url == 'javascript:;':
|
||||
item_local.url = '' #evitamos url vacías
|
||||
item_local.url = item_local.url.replace(" ", "%20") #sustituimos espacios por %20, por si acaso
|
||||
|
||||
if item_local.url and item.emergency_urls: #la url no está verificada
|
||||
item_local.torrent_alt = item.emergency_urls[0][0] #Guardamos la url del .Torrent ALTERNATIVA
|
||||
item_local.torrent_alt = item.emergency_urls[0][0] #Guardamos la url del .Torrent ALTERNATIVA
|
||||
|
||||
if not item_local.url: #error en url?
|
||||
logger.error("ERROR 02: FINDVIDEOS: El archivo Torrent no existe o ha cambiado la estructura de la Web " + " / PATRON: " + patron + " / DATA: " + data)
|
||||
@@ -2098,7 +2105,7 @@ def episodios(item):
|
||||
if season > max_temp:
|
||||
max_temp = season
|
||||
|
||||
if match['quality'] and not item_local.quality and estado == True:
|
||||
if match['quality'] and estado == True:
|
||||
item_local.quality = match['quality'] #Si hay quality se coge, si no, la de la serie
|
||||
item_local.quality = item_local.quality.replace("ALTA DEFINICION", "HDTV")
|
||||
|
||||
|
||||
@@ -534,7 +534,7 @@ def show_channels(item):
|
||||
def menu_opciones(item):
|
||||
itemlist = list()
|
||||
itemlist.append(Item(channel=item.channel, title=config.get_localized_string(60525),
|
||||
thumbnail=get_thumb("setting_0.png"),
|
||||
text_bold = True, thumbnail=get_thumb("setting_0.png"),
|
||||
folder=False))
|
||||
itemlist.append(Item(channel=item.channel, action="setting_channel", extra="peliculas", title=config.get_localized_string(60526),
|
||||
thumbnail=get_thumb("channels_movie.png"),
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
#------------------------------------------------------------
|
||||
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= 'https://pandamovies.pw'
|
||||
|
||||
@@ -16,7 +14,7 @@ host= 'https://pandamovies.pw'
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Peliculas" , action="peliculas", url=host + "/list-movies"))
|
||||
itemlist.append( Item(channel=item.channel, title="Peliculas" , action="lista", url=host + "/list-movies"))
|
||||
itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host + "/list-movies"))
|
||||
itemlist.append( Item(channel=item.channel, title="Canal" , action="categorias", url=host + "/list-movies"))
|
||||
itemlist.append( Item(channel=item.channel, title="Buscar", action="search"))
|
||||
@@ -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():
|
||||
@@ -51,11 +49,12 @@ def categorias(item):
|
||||
scrapedthumbnail = ""
|
||||
scrapedurl = scrapedurl.replace("https:", "")
|
||||
scrapedurl = "https:" + 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 = scrapertools.cachePage(item.url)
|
||||
@@ -67,13 +66,13 @@ def peliculas(item):
|
||||
title = 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} ))
|
||||
next_page_url = scrapertools.find_single_match(data,'<a class="nextpostslink" rel="next" href="([^"]+)">')
|
||||
if next_page_url =="":
|
||||
next_page_url = scrapertools.find_single_match(data,'<a.*?href="([^"]+)" >Next »</a>')
|
||||
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="findvideos" , title=title , url=url, thumbnail=thumbnail,
|
||||
plot=plot, contentTitle = title))
|
||||
next_page = scrapertools.find_single_match(data,'<a class="nextpostslink" rel="next" href="([^"]+)">')
|
||||
if next_page =="":
|
||||
next_page = scrapertools.find_single_match(data,'<a.*?href="([^"]+)" >Next »</a>')
|
||||
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
|
||||
|
||||
|
||||
@@ -1,293 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core.item import Item
|
||||
from core.scrapertools import decodeHtmlentities as dhe
|
||||
from platformcode import logger
|
||||
from platformcode import config
|
||||
from core import tmdb
|
||||
from channelselector import get_thumb
|
||||
|
||||
from channels import filtertools
|
||||
from channels import autoplay
|
||||
|
||||
|
||||
__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'peliculasdk')
|
||||
__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'peliculasdk')
|
||||
__adult_mode__ = config.get_setting("adult_mode")
|
||||
|
||||
host = "http://www.peliculasdk.com"
|
||||
|
||||
|
||||
IDIOMAS = {'es': 'Español', 'la': 'Latino', 'su': 'Subtitulado', 'in': 'Inglés'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_quality = ['HD-1080', 'HD-720', 'HD-320', 'BR-R', 'BR-S', 'DVD-R', 'DVD-S', 'TS-HQ', 'TS', 'CAM'] # -R:Rip, -S:Screener
|
||||
list_servers = ['directo', 'streamango', 'powvideo', 'datoporn', 'gamovideo', 'streamplay', 'okru', 'rapidvideo', 'openload']
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist = []
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title='Estrenos', action='peliculas', url= host + "/ver/estrenos/",
|
||||
thumbnail=get_thumb('newest', auto=True), type='movies'))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title='Por géneros', action='section',
|
||||
thumbnail=get_thumb('genres', auto=True), type='movies'))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title='Por calidades', action='section',
|
||||
thumbnail=get_thumb('quality', auto=True), type='movies'))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title='Por idiomas', action='section',
|
||||
thumbnail=get_thumb('language', auto=True), type='movies'))
|
||||
|
||||
if __adult_mode__ != 0:
|
||||
itemlist.append(Item(channel=item.channel, title='Adultos +18', action='peliculas', url= host + "/genero/adultos/",
|
||||
thumbnail=get_thumb('adults', auto=True), type='movies'))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title='Buscar...', action='search',
|
||||
thumbnail=get_thumb('search', auto=True), type='movies'))
|
||||
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def section(item):
|
||||
logger.info()
|
||||
itemlist=[]
|
||||
duplicados=[]
|
||||
data = httptools.downloadpage(host).data
|
||||
|
||||
if 'Por géneros' in item.title:
|
||||
patron = '<li><a href="(\/genero\/[^"]*)">([^<]*)<\/a><\/li>' #<li><a href="/genero/accion">Acción</a></li>
|
||||
elif 'Por calidades' in item.title:
|
||||
patron = "<li><a href='(\/calidad\/[^']*)'>([^<]*)<\/a><\/li>" #<li><a href='/calidad/HD-1080/'>HD 1080</a></li>
|
||||
elif 'Por idiomas' in item.title:
|
||||
patron = "<li><a href='(\/idioma\/[^']*)'>([^<]*)<\/a><\/li>" #<li><a href='/idioma/Espanol/'>Español</a></li>
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
if scrapedtitle not in duplicados:
|
||||
itemlist.append(Item(channel=item.channel, url=host + scrapedurl, title=scrapedtitle, action='peliculas',
|
||||
type=item.type))
|
||||
duplicados.append(scrapedtitle)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info()
|
||||
texto = texto.replace(" ", "+")
|
||||
|
||||
item.url = host + "/index.php?s=%s&x=0&y=0" % (texto)
|
||||
|
||||
try:
|
||||
return buscador(item)
|
||||
# Se captura la excepciÛn, para no interrumpir al buscador global si un canal falla
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def buscador(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| |&#.*?;", "", data)
|
||||
|
||||
patron = 'style="position:relative"> '
|
||||
patron += '<a href="([^"]+)">'
|
||||
patron += '<img src="([^"]+)" alt="([^"]+)"></a><br>'
|
||||
patron += '<div class="titulope">([^<]+)</div>.*?'
|
||||
patron += 'Audio: (.+?)</div>.*?'
|
||||
patron += 'Calidad: (.+?)</div>.*?'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedtitleorig, scrapedlenguaje, scrapedcalidad in matches:
|
||||
|
||||
year = scrapertools.find_single_match(scrapedtitle, '\((\d+)\)')
|
||||
scrapedtitle = re.sub(r"\(\d+\)", "", scrapedtitle).strip()
|
||||
|
||||
audios = scrapertools.find_multiple_matches(scrapedlenguaje, '<a href="[^"]*" rel="[^"]*">([^<]*)</a>')
|
||||
calidad = scrapertools.find_single_match(scrapedcalidad, '<a href="[^"]*" rel="[^"]*">([^<]*)</a>')
|
||||
|
||||
titulo = '%s [%s][%s]' % (scrapedtitle, ','.join([a[:3] for a in audios]), calidad)
|
||||
|
||||
# Parece que las pelis de adultos se mezclan en la búsqueda y lo único que las diferencia es que no tienen Calidad y Audios
|
||||
if (calidad and audios) or __adult_mode__ != 0:
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
action="findvideos", url=scrapedurl,
|
||||
title=titulo, contentTitle=scrapedtitle,
|
||||
thumbnail=scrapedthumbnail,
|
||||
language=audios,
|
||||
quality=calidad,
|
||||
infoLabels={'year':year}
|
||||
))
|
||||
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
|
||||
# Paginación
|
||||
url_next_page = scrapertools.find_single_match(data,'<a href="([^"]*)">Siguiente »</a>')
|
||||
if url_next_page:
|
||||
itemlist.append(item.clone(title="Siguiente >>", url=url_next_page))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| |&#.*?;", "", data)
|
||||
|
||||
patron = 'style="position:relative"> '
|
||||
patron += '<a href="([^"]+)">'
|
||||
patron += '<img src="([^"]+)" alt="([^"]+)"></a><br>'
|
||||
patron += '<div class="titulope">([^<]+)</div>.*?'
|
||||
patron += 'Audio: (.+?)</div>.*?'
|
||||
patron += 'Calidad: (.+?)</div>.*?'
|
||||
patron += 'Género: (.+?)</div>'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedtitleorig, scrapedlenguaje, scrapedcalidad, scrapedgenero in matches:
|
||||
|
||||
year = scrapertools.find_single_match(scrapedtitle, '\((\d+)\)')
|
||||
scrapedtitle = re.sub(r"\(\d+\)", "", scrapedtitle).strip()
|
||||
|
||||
audios = scrapertools.find_multiple_matches(scrapedlenguaje, '<a href="[^"]*" rel="[^"]*">([^<]*)</a>')
|
||||
calidad = scrapertools.find_single_match(scrapedcalidad, '<a href="[^"]*" rel="[^"]*">([^<]*)</a>')
|
||||
generos = scrapertools.find_multiple_matches(scrapedgenero, '<a href="[^"]*" rel="[^"]*">([^<]*)</a>')
|
||||
|
||||
titulo = '%s [%s][%s]' % (scrapedtitle, ','.join([a[:3] for a in audios]), calidad)
|
||||
|
||||
if 'Adultos' not in generos or __adult_mode__ != 0:
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
action="findvideos", url=scrapedurl,
|
||||
title=titulo, contentTitle=scrapedtitle,
|
||||
thumbnail=scrapedthumbnail,
|
||||
language=audios,
|
||||
quality=calidad,
|
||||
infoLabels={'year':year}
|
||||
))
|
||||
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
|
||||
# Paginación
|
||||
url_next_page = scrapertools.find_single_match(data,'<a href="([^"]*)">Siguiente »</a>')
|
||||
if url_next_page:
|
||||
itemlist.append(item.clone(title="Siguiente >>", url=url_next_page))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
tmdb.set_infoLabels(item, True) # para refrescar infolabels y obtener más datos en "segunda pasada"
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
patron = '<li><a href="#(tab\d+)"><span class="re">\d<\/span><span class="([^"]+)"><\/span><span class=.*?>([^<]+)<\/span>'
|
||||
check = re.compile(patron, re.DOTALL).findall(data)
|
||||
if not check:
|
||||
patron = '<li><a href="#(tab\d+)">'
|
||||
check = re.compile(patron, re.DOTALL).findall(data)
|
||||
for i, valor in enumerate(check):
|
||||
check[i] = [valor, '', '']
|
||||
|
||||
patron = '<div id="(tab\d+)" class="tab_content">(.*?)</div>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
servers_data_list = []
|
||||
for i, match in enumerate(matches):
|
||||
if match[0] == check[i][0]:
|
||||
if '<iframe' in match[1]:
|
||||
src = scrapertools.find_single_match(match[1], ' src="([^"]*)"')
|
||||
servers_data_list.append([check[i][1], check[i][2], 'iframe', src]) # idioma, calidad, 'iframe', src
|
||||
|
||||
elif '<script' in match[1]:
|
||||
src = scrapertools.find_single_match(match[1], '<script>(.*?)<\/script>')
|
||||
if src:
|
||||
func, parm = scrapertools.find_single_match(src, '(.*?)\("([^"]*)"\)')
|
||||
servers_data_list.append([check[i][1], check[i][2], func, parm ]) # idioma, calidad, func, parm
|
||||
|
||||
data = httptools.downloadpage(host + '/Js/videod.js').data
|
||||
patron = 'function (\w+)\(id\){(.*?)}'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for idioma, calidad, func, parm in servers_data_list:
|
||||
if func == 'iframe':
|
||||
title = "Ver en: %s [" + idioma + "][" + calidad + "]"
|
||||
itemlist.append(
|
||||
item.clone(title=title, url=parm, action="play",
|
||||
thumbnail=item.category,
|
||||
language=idioma, quality=calidad))
|
||||
|
||||
else:
|
||||
for funcion, contenido in matches:
|
||||
if funcion == func:
|
||||
if '<script' in contenido: continue
|
||||
if '<iframe' in contenido:
|
||||
src = scrapertools.find_single_match(contenido, 'src="([^"]*)"')
|
||||
else:
|
||||
src = scrapertools.find_single_match(contenido, 'href="([^"]*)"')
|
||||
if "'+codigo+'" not in src: continue
|
||||
src = src.replace("'+codigo+'", parm)
|
||||
|
||||
title = "Ver en: %s [" + idioma + "][" + calidad + "]"
|
||||
itemlist.append(
|
||||
item.clone(title=title, url=src, action="play",
|
||||
thumbnail=item.category,
|
||||
language=idioma, quality=calidad))
|
||||
break
|
||||
|
||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||
|
||||
if __comprueba_enlaces__:
|
||||
itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__)
|
||||
|
||||
if item.library and config.get_videolibrary_support() and len(itemlist) > 0:
|
||||
infoLabels = {'tmdb_id': item.infoLabels['tmdb_id'],
|
||||
'title': item.fulltitle}
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir esta película a la videoteca",
|
||||
action="add_pelicula_to_library", url=item.url, infoLabels=infoLabels,
|
||||
text_color="0xFFff6666",
|
||||
thumbnail='http://imgur.com/0gyYvuC.png'))
|
||||
|
||||
itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
if categoria == 'castellano':
|
||||
item.url = host + "idioma/Espanol/"
|
||||
item.action = "peliculas"
|
||||
itemlist = peliculas(item)
|
||||
if itemlist[-1].action == "peliculas":
|
||||
itemlist.pop()
|
||||
# Se captura la excepción, para no interrumpir al canal novedades si un canal falla
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
return itemlist
|
||||
+63
-49
@@ -1,49 +1,63 @@
|
||||
{
|
||||
"id": "peliculasdk",
|
||||
"name": "PeliculasDK",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["cast"],
|
||||
"thumbnail": "http://s29.postimg.cc/wzw749oon/pldklog.jpg",
|
||||
"banner": "peliculasdk.png",
|
||||
"categories": [
|
||||
"movie",
|
||||
"vos",
|
||||
"adult"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_castellano",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Castellano",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "comprueba_enlaces",
|
||||
"type": "bool",
|
||||
"label": "Verificar si los enlaces existen",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "comprueba_enlaces_num",
|
||||
"type": "list",
|
||||
"label": "Número de enlaces a verificar",
|
||||
"default": 1,
|
||||
"enabled": true,
|
||||
"visible": "eq(-1,true)",
|
||||
"lvalues": [ "5", "10", "15", "20" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"id": "pelis123",
|
||||
"name": "Pelis123",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["cast", "lat"],
|
||||
"thumbnail": "pelis123.png",
|
||||
"banner": "",
|
||||
"categories": [
|
||||
"movie",
|
||||
"tvshow",
|
||||
"vos"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostrar enlaces en idioma...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"No filtrar",
|
||||
"LAT",
|
||||
"ESP",
|
||||
"VOSE"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "modo_grafico",
|
||||
"type": "bool",
|
||||
"label": "Buscar información extra",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "comprueba_enlaces",
|
||||
"type": "bool",
|
||||
"label": "Verificar si los enlaces existen",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "comprueba_enlaces_num",
|
||||
"type": "list",
|
||||
"label": "Número de enlaces a verificar",
|
||||
"default": 1,
|
||||
"enabled": true,
|
||||
"visible": "eq(-1,true)",
|
||||
"lvalues": [ "5", "10", "15", "20" ]
|
||||
} ]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,359 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re, urllib
|
||||
|
||||
from channels import autoplay
|
||||
from platformcode import config, logger, platformtools
|
||||
from core.item import Item
|
||||
from core import httptools, scrapertools, jsontools, tmdb
|
||||
from core import servertools
|
||||
from channels import filtertools
|
||||
|
||||
|
||||
host = 'https://pelis123.tv/'
|
||||
|
||||
|
||||
IDIOMAS = {'LAT': 'LAT', 'ESP':'ESP', 'VOSE': 'VOSE'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['openload', 'fembed', 'directo']
|
||||
list_quality = []
|
||||
|
||||
__channel__='pelis123'
|
||||
__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', __channel__)
|
||||
__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', __channel__)
|
||||
try:
|
||||
__modo_grafico__ = config.get_setting('modo_grafico', __channel__)
|
||||
except:
|
||||
__modo_grafico__ = True
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist.append(item.clone( title = 'Películas', action = 'mainlist_pelis' ))
|
||||
itemlist.append(item.clone( title = 'Series', action = 'mainlist_series' ))
|
||||
|
||||
itemlist.append(item.clone( title = 'Buscar ...', action = 'search', search_type = 'all' ))
|
||||
itemlist.append(item.clone(title="Configurar canal...", text_color="gold", action="configuracion", folder=False))
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def mainlist_pelis(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
itemlist.append(item.clone( title = 'Nuevas películas', action = 'list_all', url = host + 'film.html', search_type = 'movie' ))
|
||||
itemlist.append(item.clone( title = 'Destacadas', action = 'list_all', url = host + 'featured.html', search_type = 'movie' ))
|
||||
# ~ itemlist.append(item.clone( title = 'Estrenos de cine', action = 'list_all', url = host + 'cinema.html', search_type = 'movie' ))
|
||||
|
||||
itemlist.append(item.clone( title = 'Por género', action = 'generos', search_type = 'movie' ))
|
||||
itemlist.append(item.clone( title = 'Por idioma', action = 'idiomas', search_type = 'movie' ))
|
||||
itemlist.append(item.clone( title = 'Por país', action = 'paises', search_type = 'movie' ))
|
||||
itemlist.append(item.clone( title = 'Por año', action = 'anios', search_type = 'movie' ))
|
||||
|
||||
itemlist.append(item.clone( title = 'Buscar película ...', action = 'search', search_type = 'movie' ))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def mainlist_series(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
itemlist.append(item.clone( title = 'Nuevas series', action = 'list_all', url = host + 'series.html', search_type = 'tvshow' ))
|
||||
|
||||
itemlist.append(item.clone( title = 'Por género', action = 'generos', search_type = 'tvshow' ))
|
||||
|
||||
itemlist.append(item.clone( title = 'Buscar serie ...', action = 'search', search_type = 'tvshow' ))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def anios(item):
|
||||
logger.info()
|
||||
return extraer_opciones(item, 'year')
|
||||
|
||||
def generos(item):
|
||||
logger.info()
|
||||
return extraer_opciones(item, 'genre')
|
||||
|
||||
def idiomas(item):
|
||||
logger.info()
|
||||
return extraer_opciones(item, 'lang')
|
||||
|
||||
def paises(item):
|
||||
logger.info()
|
||||
return extraer_opciones(item, 'country')
|
||||
|
||||
def extraer_opciones(item, select_id):
|
||||
itemlist = []
|
||||
|
||||
url = host + 'search.html'
|
||||
data = httptools.downloadpage(url).data
|
||||
# ~ logger.debug(data)
|
||||
url += '?type=' + ('series' if item.search_type == 'tvshow' else 'movies')
|
||||
url += '&order=last_update&order_by=desc'
|
||||
|
||||
bloque = scrapertools.find_single_match(data, '<select name="%s"[^>]*>(.*?)</select>' % select_id)
|
||||
|
||||
matches = re.compile('<option value="([^"]+)">([^<]+)', re.DOTALL).findall(bloque)
|
||||
for valor, titulo in matches:
|
||||
itemlist.append(item.clone( title=titulo.capitalize(), url= url + '&' + select_id + '=' + valor, action='list_all' ))
|
||||
|
||||
if select_id == 'year': # años en orden inverso
|
||||
return sorted(itemlist, key=lambda it: it.title, reverse=True)
|
||||
else:
|
||||
return sorted(itemlist, key=lambda it: it.title)
|
||||
|
||||
|
||||
def configuracion(item):
|
||||
ret = platformtools.show_channel_settings()
|
||||
platformtools.itemlist_refresh()
|
||||
return ret
|
||||
|
||||
|
||||
def detectar_idiomas(txt):
|
||||
languages = []
|
||||
if 'Castellano' in txt: languages.append('ESP')
|
||||
if 'Latino' in txt: languages.append('LAT')
|
||||
if 'Subtitulado' in txt: languages.append('VOSE')
|
||||
return languages
|
||||
|
||||
def detectar_idioma(txt):
|
||||
languages = detectar_idiomas(txt)
|
||||
if len(languages) > 0: return languages[0]
|
||||
return '?'
|
||||
|
||||
def list_all(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
es_busqueda = '&q=' in item.url
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
# ~ logger.debug(data)
|
||||
|
||||
patron = '<div class="tray-item" episode-tag="([^"]+)">\s*<div class="tray-item-content">'
|
||||
patron += '\s*<a href="([^"]+)">\s*<img class="[^"]*" src="([^"]+)">'
|
||||
patron += '.*?<div class="tray-item-title">([^<]+)</div>'
|
||||
patron += '.*?<div class="tray-item-title-en">([^<]+)</div>'
|
||||
patron += '.*?<div class="tray-item-quality">([^<]+)</div>'
|
||||
patron += '.*?<div class="tray-item-episode">([^<]+)</div>'
|
||||
patron += '.*? data-original-title=".*? \((\d+)\)"'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
for langs, url, thumb, title, title_en, quality, episode, year in matches:
|
||||
th = scrapertools.find_single_match(thumb, r'poster%2F(.*?)$')
|
||||
thumb = 'https://cdn.pelis123.tv/poster/' + th
|
||||
|
||||
languages = detectar_idiomas(langs)
|
||||
|
||||
tipo = 'movie' if 'MIN' in episode else 'tvshow'
|
||||
if item.search_type not in ['all', tipo]: continue
|
||||
|
||||
if tipo == 'tvshow':
|
||||
m = re.match('(.*?) S\d+$', title)
|
||||
if m: title = m.group(1)
|
||||
|
||||
title = title.strip()
|
||||
quality = quality.strip().upper()
|
||||
|
||||
titulo = title
|
||||
if len(languages) > 0:
|
||||
titulo += ' [COLOR pink][%s][/COLOR]' % ','.join(languages)
|
||||
if quality != '':
|
||||
titulo += ' [COLOR pink][%s][/COLOR]' % quality
|
||||
if item.search_type == 'all':
|
||||
titulo += ' [COLOR %s](%s)[/COLOR]' % ('red' if tipo == 'tvshow' else 'green', tipo)
|
||||
|
||||
if tipo == 'movie':
|
||||
itemlist.append(item.clone( action='findvideos', url=url, title=titulo, thumbnail=thumb,
|
||||
contentType='movie', contentTitle=title, infoLabels={'year': year} ))
|
||||
else:
|
||||
if es_busqueda: # descartar series que se repiten con diferentes temporadas
|
||||
if title in [it.contentSerieName for it in itemlist]: continue
|
||||
|
||||
itemlist.append(item.clone( action='temporadas', url=url, title=titulo, thumbnail=thumb,
|
||||
contentType='tvshow', contentSerieName=title, infoLabels={'year': year} ))
|
||||
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
|
||||
next_page_link = scrapertools.find_single_match(data, 'active">\d+</a>(?:\s*</div>\s*<div class="btn-group">|)\s*<a href="([^"]+)')
|
||||
if next_page_link:
|
||||
itemlist.append(item.clone( title='>> Página siguiente', url=next_page_link ))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def temporadas(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
# ~ logger.debug(data)
|
||||
|
||||
matches = re.compile('href="([^"]+)" class="[^"]*">Temporada (\d+)</a>', re.DOTALL).findall(data)
|
||||
for url, numtempo in matches:
|
||||
itemlist.append(item.clone( action='episodesxseason', title='Temporada %s' % numtempo, url = url,
|
||||
contentType='season', contentSeason=numtempo ))
|
||||
|
||||
m = re.match('.*?-season-(\d+)-[a-z0-9A-Z]+-[a-z0-9A-Z]+\.html$', item.url)
|
||||
if m:
|
||||
itemlist.append(item.clone( action='episodesxseason', title='Temporada %s' % m.group(1), url = item.url,
|
||||
contentType='season', contentSeason=m.group(1) ))
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
|
||||
# if len(itemlist) == 1:
|
||||
# itemlist = seasons_episodes(itemlist[0])
|
||||
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, title='[COLOR yellow]Añadir esta serie a la videoteca[/COLOR]', url=item.url,
|
||||
action="add_serie_to_library", extra="episodios", contentSerieName=item.contentSerieName))
|
||||
|
||||
|
||||
# return sorted(itemlist, key=lambda it: it.title)
|
||||
return itemlist
|
||||
|
||||
|
||||
# ~ # Si una misma url devuelve los episodios de todas las temporadas, definir rutina tracking_all_episodes para acelerar el scrap en trackingtools.
|
||||
# ~ def tracking_all_episodes(item):
|
||||
# ~ return episodios(item)
|
||||
|
||||
|
||||
def episodios(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
templist = temporadas(item)
|
||||
for tempitem in templist:
|
||||
itemlist += episodesxseason(tempitem)
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodesxseason(item):
|
||||
# def episodios(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
# ~ logger.debug(data)
|
||||
|
||||
url = scrapertools.find_single_match(data, 'href="([^"]+)" action="watch"')
|
||||
data = httptools.downloadpage(url).data
|
||||
# ~ logger.debug(data)
|
||||
|
||||
patron = '<div class="watch-playlist-item(?: playing|) " data-season="(\d+)" data-episode="(\d+)">'
|
||||
patron += '\s*<a href="([^"]+)"'
|
||||
patron += '.*?<img src="([^"]+)"'
|
||||
patron += '.*?<span class="watch-playlist-title">([^<]+)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for season, episode, url, thumb, title in matches:
|
||||
if item.contentSeason and item.contentSeason != int(season):
|
||||
continue
|
||||
|
||||
titulo = '%sx%s %s' % (season, episode, title)
|
||||
itemlist.append(item.clone( action='findvideos', url=url, title=titulo, thumbnail=thumb,
|
||||
contentType='episode', contentSeason=season, contentEpisodeNumber=episode ))
|
||||
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def detectar_server(servidor):
|
||||
servidor = servidor.lower()
|
||||
if 'server ' in servidor: return 'directo'
|
||||
elif servidor == 'fast': return 'fembed'
|
||||
# ~ elif 'server 1' in servidor: return 'fastproxycdn' # inexistente
|
||||
# ~ elif 'server 4' in servidor: return '404' # error 404 !?
|
||||
return servidor
|
||||
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
# ~ logger.debug(data)
|
||||
|
||||
token = scrapertools.find_single_match(data, '<meta name="csrf-token" content="([^"]+)')
|
||||
|
||||
# ~ https://pelis123.tv/watch/blackkklansman-2018-ocffc-ux2.html
|
||||
# ~ https://pelis123.tv/watch/lethal-weapon-season-1-episode-18-oa06e-fds.html
|
||||
movie_id = scrapertools.find_single_match(item.url, '([a-z0-9A-Z]+-[a-z0-9A-Z]+)\.html$')
|
||||
m = re.match('.*?-episode-(\d+)-[a-z0-9A-Z]+-[a-z0-9A-Z]+\.html$', item.url)
|
||||
episode = m.group(1) if m else ''
|
||||
|
||||
url = host + 'ajax/watch/list'
|
||||
post = 'movie_id=%s&episode=%s' % (movie_id, episode)
|
||||
headers = { 'X-CSRF-TOKEN': token }
|
||||
data = jsontools.load(httptools.downloadpage(url, post=post, headers=headers).data)
|
||||
# ~ logger.debug(data)
|
||||
for idioma, enlaces in data['list'].items():
|
||||
for servidor, url in enlaces.items():
|
||||
titulo = detectar_server(servidor)
|
||||
titulo += ' [%s]' % detectar_idioma(idioma)
|
||||
titulo += item.quality
|
||||
for url_play in url:
|
||||
itemlist.append(item.clone( channel = item.channel, action = 'play', server = detectar_server(servidor),
|
||||
title = titulo, url = url_play,
|
||||
language = detectar_idioma(idioma), quality = 'HD' #, other = servidor
|
||||
))
|
||||
|
||||
# Requerido para Filtrar enlaces
|
||||
if __comprueba_enlaces__:
|
||||
itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__)
|
||||
# Requerido para FilterTools
|
||||
itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
# Requerido para AutoPlay
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra !='findvideos' :
|
||||
itemlist.append(Item(channel=item.channel, action="add_pelicula_to_library",
|
||||
title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]', url=item.url,
|
||||
extra="findvideos", contentTitle=item.contentTitle))
|
||||
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def play(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url, ignore_response_code=True).data
|
||||
# ~ logger.debug(data)
|
||||
|
||||
url = scrapertools.find_single_match(data, '<iframe src="([^"]+)')
|
||||
if url == '':
|
||||
url = scrapertools.find_single_match(data, '<source src="([^"]+)')
|
||||
|
||||
if 'fastproxycdn.net' in url: url = '' # ya no existe
|
||||
|
||||
# ~ logger.debug(url)
|
||||
if url != '':
|
||||
itemlist.append(item.clone(url = url))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info("texto: %s" % texto)
|
||||
if item.search_type == "" :
|
||||
item.search_type = 'all'
|
||||
try:
|
||||
item.url = host + 'search.html'
|
||||
item.url += '?type=' + ('series' if item.search_type == 'tvshow' else 'movies' if item.search_type == 'movie' else '')
|
||||
item.url += '&order=last_update&order_by=desc'
|
||||
item.url += '&q=' + texto.replace(" ", "+")
|
||||
return list_all(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
@@ -137,11 +137,11 @@ def peliculas(item):
|
||||
# logger.info(data)
|
||||
|
||||
# img, title
|
||||
patron = '(?is)movie-img img-box.*?alt="([^"]+).*?'
|
||||
patron += 'src="([^"]+).*?'
|
||||
patron += 'href="([^"]+).*?'
|
||||
patron += 'fechaestreno">([^<]+).*?'
|
||||
patron += 'quality">([^<]+)'
|
||||
patron = '(?is)movie-img img-box.*?alt="([^"]+)".*?'
|
||||
patron += 'src="([^"]+)".*?'
|
||||
patron += 'href="([^"]+)".*?'
|
||||
patron += 'fechaestreno">([^<]+)<.*?'
|
||||
patron += 'quality">([^<]+)<'
|
||||
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
|
||||
@@ -176,20 +176,19 @@ def genresYears(item):
|
||||
if item.title == "Estrenos":
|
||||
patron_todas = 'ESTRENOS</a>(.*?)</i> Géneros'
|
||||
else:
|
||||
patron_todas = '(?is)genres falsescroll(.*?)</div> </aside'
|
||||
patron_todas = '(?is)data-label="CATEGORIAS">(.*?)show-bigmenu'
|
||||
# logger.error(texto='***********uuuuuuu*****' + patron_todas)
|
||||
|
||||
data = scrapertools.find_single_match(data, patron_todas)
|
||||
# logger.error(texto='***********uuuuuuu*****' + data)
|
||||
patron = '<a href="([^"]+)">([^<]+)</a> <i>([^<]+)</i>' # url, title, videos
|
||||
patron = '<a href="([^"]+)".*?title="([^"]+)"' # url, title
|
||||
# patron = '<a href="([^"]+)">([^<]+)</a>' # url, title
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
|
||||
for scrapedurl, scrapedtitle, videos_num in matches:
|
||||
title = '%s (%s)' % (scrapedtitle, videos_num.replace('.', ','))
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
title = '%s' % (scrapedtitle)
|
||||
title = title.replace("Peliculas de ","").replace(" Online","")
|
||||
itemlist.append(item.clone(title=title, url=scrapedurl, action="peliculas"))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
@@ -1,65 +1,39 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import urllib
|
||||
|
||||
from channelselector import get_thumb
|
||||
from core import httptools
|
||||
from core import jsontools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
|
||||
host = "http://peliscity.com"
|
||||
host = "https://www.pelisvips.com"
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(host).data
|
||||
patron = 'cat-item.*?span>([^<]+)'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
can = 0
|
||||
for cantidad in matches:
|
||||
can += int(cantidad.replace(".", ""))
|
||||
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, title="Películas: (%s)" %can, text_bold=True))
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, title=" Últimas agregadas", action="agregadas", url= host,
|
||||
viewmode="movie_with_plot"))
|
||||
itemlist.append(Item(channel=item.channel, title=" Peliculas HD", action="agregadas",
|
||||
url= host + "/calidad/hd-real-720", viewmode="movie_with_plot"))
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, title=" Listado por género", action="porGenero", url= host))
|
||||
itemlist.append(Item(channel=item.channel, title=" Idioma", action="porIdioma", url= host))
|
||||
itemlist.append(Item(channel=item.channel, title=" Buscar", action="search", url= host + "/?s="))
|
||||
itemlist.append(Item(channel=item.channel, title="Ultimas", action="agregadas",
|
||||
url= host, viewmode="movie_with_plot", thumbnail = get_thumb("last", auto = True)))
|
||||
itemlist.append(Item(channel=item.channel, title="Género", action="porGenero_Idioma", tipo = "g", url= host, thumbnail = get_thumb("genres", auto = True)))
|
||||
itemlist.append(Item(channel=item.channel, title="Audio", action="porGenero_Idioma", tipo = "a", url= host, thumbnail = get_thumb("audio", auto = True)))
|
||||
itemlist.append(Item(channel=item.channel, title="Buscar", action="search", url= host + "/?s=", thumbnail = get_thumb("search", auto = True)))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def porIdioma(item):
|
||||
itemlist = []
|
||||
itemlist.append(Item(channel=item.channel, title="Castellano", action="agregadas",
|
||||
url= host + "/idioma/espanol-castellano/", viewmode="movie_with_plot"))
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, title="VOSE", action="agregadas", url= host + "/idioma/subtitulada/",
|
||||
viewmode="movie_with_plot"))
|
||||
itemlist.append(Item(channel=item.channel, title="Latino", action="agregadas",
|
||||
url= host + "/idioma/espanol-latino/", viewmode="movie_with_plot"))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def porGenero(item):
|
||||
def porGenero_Idioma(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = 'cat-item.*?href="([^"]+).*?>(.*?)<.*?span>([^<]+)'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for urlgen, genero, cantidad in matches:
|
||||
cantidad = cantidad.replace(".", "")
|
||||
titulo = genero + " (" + cantidad + ")"
|
||||
bloque = scrapertools.find_single_match(data, 'culas por %s(.*?)slidebar-item' %item.tipo)
|
||||
patron = 'href="([^"]+).*?span>([^<]+)'
|
||||
matches = scrapertools.find_multiple_matches(bloque, patron)
|
||||
for urlgen, titulo in matches:
|
||||
itemlist.append(Item(channel=item.channel, action="agregadas", title=titulo, url=urlgen, folder=True,
|
||||
viewmode="movie_with_plot"))
|
||||
|
||||
@@ -80,35 +54,47 @@ def search(item, texto):
|
||||
return []
|
||||
|
||||
|
||||
def listaBuscar(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = '<li class="itemlist".*?href="([^"]+)".*?'
|
||||
patron += 'src="([^"]+)".*?'
|
||||
patron += 'title="([^"]+)".*?'
|
||||
patron += 'text-list">([^<]+)<'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for url, thumbnail, title, sinopsis in matches:
|
||||
itemlist.append(Item(channel=item.channel, action="findvideos", title=title + " ", fulltitle=title, url=url,
|
||||
thumbnail=thumbnail, show=title, plot=sinopsis))
|
||||
return itemlist
|
||||
|
||||
|
||||
def agregadas(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r'\n|\r|\t|\s{2}| |"', "", data)
|
||||
patron = scrapertools.find_multiple_matches (data,'<divclass=col-mt-5 postsh>.*?Duración')
|
||||
for element in patron:
|
||||
info = scrapertools.find_single_match(element,
|
||||
"calidad>(.*?)<.*?ahref=(.*?)>.*?'reflectMe' src=(.*?)\/>.*?<h2>(.*?)"
|
||||
"<\/h2>.*?sinopsis>(.*?)<\/div>.*?Año:<\/span>(.*?)<\/li>")
|
||||
quality = info[0]
|
||||
url = info[1]
|
||||
thumbnail = info[2]
|
||||
title = info[3]
|
||||
plot = info[4]
|
||||
year = info[5].strip()
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
action='findvideos',
|
||||
contentType = "movie",
|
||||
contentTitle = title,
|
||||
fulltitle = title,
|
||||
infoLabels={'year':year},
|
||||
quality=quality,
|
||||
thumbnail=thumbnail,
|
||||
title=title,
|
||||
url=url
|
||||
bloque = scrapertools.find_single_match(data, '<div id="movie-list"(.*?)<div class="pagination movie-pagination')
|
||||
patron = '(?is)href="([^"]+)".*?'
|
||||
patron += 'class="_format"> <span class=".*?>([^<]+)<.*?'
|
||||
patron += 'src="([^"]+)".*?'
|
||||
patron += 'alt="([^"]+)".*?'
|
||||
patron += '<div class="_audio">(.*?)/div.*?'
|
||||
patron += 'label_year">([^ ]+) '
|
||||
matches = scrapertools.find_multiple_matches(bloque, patron)
|
||||
for scrapedurl, scrapedquality, scrapedthumbnail, scrapedtitle, scrapedaudio, scrapedyear in matches:
|
||||
title = scrapedtitle + " (%s)" %scrapedyear
|
||||
itemlist.append(Item(channel = item.channel,
|
||||
action = 'findvideos',
|
||||
contentTitle = scrapedtitle,
|
||||
fulltitle = scrapedtitle,
|
||||
infoLabels = {'year':scrapedyear},
|
||||
quality = scrapedquality,
|
||||
thumbnail = scrapedthumbnail,
|
||||
title = title,
|
||||
url = scrapedurl
|
||||
))
|
||||
tmdb.set_infoLabels(itemlist, True)
|
||||
next_page = scrapertools.find_single_match(data,'tima>.*?href=(.*?) ><i')
|
||||
next_page = scrapertools.find_single_match(data, "next'.*?href='([^']+)'")
|
||||
itemlist.append(Item(channel=item.channel, action="agregadas", title='Pagina Siguiente >>',
|
||||
url=next_page.strip(),
|
||||
viewmode="movie_with_plot"))
|
||||
@@ -116,23 +102,6 @@ def agregadas(item):
|
||||
return itemlist
|
||||
|
||||
|
||||
def listaBuscar(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n", " ", data)
|
||||
patron = 'class="row"> <a.*?="([^"]+).*?src="([^"]+).*?title="([^"]+).*?class="text-list">(.*?)</p>'
|
||||
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
|
||||
for url, thumbnail, title, sinopsis in matches:
|
||||
itemlist.append(Item(channel=item.channel, action="findvideos", title=title + " ", fulltitle=title, url=url,
|
||||
thumbnail=thumbnail, show=title, plot=sinopsis))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
@@ -144,6 +113,16 @@ def findvideos(item):
|
||||
title = "%s [" + scrapedcalidad + "][" + scrapedidioma +"]"
|
||||
quality = scrapedcalidad
|
||||
language = scrapedidioma
|
||||
if "pelisup.com" in scrapedurl:
|
||||
scrapedurl = scrapedurl.replace("/v/","/api/source/")
|
||||
post = urllib.urlencode({"r":item.url,"d":"www.pelisup.com"})
|
||||
data1 = httptools.downloadpage(scrapedurl, post=post).data
|
||||
json_data = jsontools.load(data1)
|
||||
for dataj in json_data["data"]:
|
||||
itemlist.append(
|
||||
item.clone(channel=item.channel, action="play", title=title + " - %s" %dataj["label"], fulltitle=item.title, url="https://www.pelisup.com" + dataj["file"],
|
||||
quality= quality, language=language, extra = item.thumbnail))
|
||||
scrapedurl = "omina.farlante1" # para ya no agregar al itemlist
|
||||
if not ("omina.farlante1" in scrapedurl or "404" in scrapedurl):
|
||||
itemlist.append(
|
||||
item.clone(channel=item.channel, action="play", title=title, fulltitle=item.title, url=scrapedurl,
|
||||
@@ -151,7 +130,7 @@ def findvideos(item):
|
||||
tmdb.set_infoLabels(itemlist, True)
|
||||
itemlist=servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||
# Opción "Añadir esta película a la biblioteca de KODI"
|
||||
if item.extra != "library":
|
||||
if itemlist and item.contentChannel != "videolibrary":
|
||||
if config.get_videolibrary_support():
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green",
|
||||
action="add_pelicula_to_library", url=item.url, thumbnail = item.thumbnail,
|
||||
|
||||
@@ -1,292 +1,292 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import urllib
|
||||
import base64
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core import tmdb
|
||||
from core import jsontools
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
from channelselector import get_thumb
|
||||
|
||||
|
||||
thumbletras = {'#': 'https://s32.postimg.cc/drojt686d/image.png',
|
||||
'a': 'https://s32.postimg.cc/llp5ekfz9/image.png',
|
||||
'b': 'https://s32.postimg.cc/y1qgm1yp1/image.png',
|
||||
'c': 'https://s32.postimg.cc/vlon87gmd/image.png',
|
||||
'd': 'https://s32.postimg.cc/3zlvnix9h/image.png',
|
||||
'e': 'https://s32.postimg.cc/bgv32qmsl/image.png',
|
||||
'f': 'https://s32.postimg.cc/y6u7vq605/image.png',
|
||||
'g': 'https://s32.postimg.cc/9237ib6jp/image.png',
|
||||
'h': 'https://s32.postimg.cc/812yt6pk5/image.png',
|
||||
'i': 'https://s32.postimg.cc/6nbbxvqat/image.png',
|
||||
'j': 'https://s32.postimg.cc/axpztgvdx/image.png',
|
||||
'k': 'https://s32.postimg.cc/976yrzdut/image.png',
|
||||
'l': 'https://s32.postimg.cc/fmal2e9yd/image.png',
|
||||
'm': 'https://s32.postimg.cc/m19lz2go5/image.png',
|
||||
'n': 'https://s32.postimg.cc/b2ycgvs2t/image.png',
|
||||
'o': 'https://s32.postimg.cc/c6igsucpx/image.png',
|
||||
'p': 'https://s32.postimg.cc/jnro82291/image.png',
|
||||
'q': 'https://s32.postimg.cc/ve5lpfv1h/image.png',
|
||||
'r': 'https://s32.postimg.cc/nmovqvqw5/image.png',
|
||||
's': 'https://s32.postimg.cc/zd2t89jol/image.png',
|
||||
't': 'https://s32.postimg.cc/wk9lo8jc5/image.png',
|
||||
'u': 'https://s32.postimg.cc/w8s5bh2w5/image.png',
|
||||
'v': 'https://s32.postimg.cc/e7dlrey91/image.png',
|
||||
'w': 'https://s32.postimg.cc/fnp49k15x/image.png',
|
||||
'x': 'https://s32.postimg.cc/dkep1w1d1/image.png',
|
||||
'y': 'https://s32.postimg.cc/um7j3zg85/image.png',
|
||||
'z': 'https://s32.postimg.cc/jb4vfm9d1/image.png'
|
||||
}
|
||||
|
||||
audio = {'Latino': '[COLOR limegreen]LATINO[/COLOR]', 'Español': '[COLOR yellow]ESPAÑOL[/COLOR]',
|
||||
'Sub Español': '[COLOR red]SUB ESPAÑOL[/COLOR]'}
|
||||
|
||||
host = 'http://pelisgratis.me/'
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
itemlist.append(item.clone(title="Estrenos",
|
||||
action="lista",
|
||||
thumbnail=get_thumb('premieres', auto=True),
|
||||
url=host + 'estrenos'
|
||||
))
|
||||
|
||||
itemlist.append(item.clone(title="Todas",
|
||||
action="lista",
|
||||
thumbnail=get_thumb('all', auto=True),
|
||||
url=host
|
||||
))
|
||||
|
||||
itemlist.append(item.clone(title="Generos",
|
||||
action="seccion",
|
||||
url=host,
|
||||
thumbnail=get_thumb('genres', auto=True),
|
||||
extra='generos'
|
||||
))
|
||||
|
||||
itemlist.append(item.clone(title="Alfabetico",
|
||||
action="seccion",
|
||||
url=host,
|
||||
thumbnail=get_thumb('alphabet', auto=True),
|
||||
extra='a-z'
|
||||
))
|
||||
|
||||
itemlist.append(item.clone(title="Mas Vistas",
|
||||
action="lista",
|
||||
thumbnail=get_thumb('more watched', auto=True),
|
||||
url=host + 'peliculas-mas-vistas'
|
||||
))
|
||||
|
||||
itemlist.append(item.clone(title="Mas Votadas",
|
||||
action="lista",
|
||||
thumbnail=get_thumb('more voted', auto=True),
|
||||
url=host + 'peliculas-mas-votadas'
|
||||
))
|
||||
|
||||
itemlist.append(item.clone(title="Buscar",
|
||||
action="search",
|
||||
url=host + '?s=',
|
||||
thumbnail=get_thumb('search', auto=True)
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def get_source(url, referer=None):
|
||||
logger.info()
|
||||
if referer is None:
|
||||
data = httptools.downloadpage(url).data
|
||||
else:
|
||||
data = httptools.downloadpage(url, headers={'Referer':referer}).data
|
||||
data = re.sub(r'\n|\r|\t| |<br>|\s{2,}', "", data)
|
||||
return data
|
||||
|
||||
|
||||
def lista(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = get_source(item.url)
|
||||
patron = 'article id=post-\d+.*?href=([^>]+)>.*?src=(.*?)\s.*?"Title">([^<]+)<(.*?)</a>.*?<p>([^<]+)</p>'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle, year_data, scrapedplot in matches:
|
||||
year = scrapertools.find_single_match(year_data, 'Year>(\d{4})<')
|
||||
|
||||
url = scrapedurl
|
||||
thumbnail = scrapedthumbnail
|
||||
plot = scrapedplot
|
||||
quality = ''
|
||||
contentTitle = scrapedtitle
|
||||
title = contentTitle
|
||||
year = year
|
||||
|
||||
itemlist.append(item.clone(action='findvideos',
|
||||
title=title,
|
||||
url=url,
|
||||
thumbnail=thumbnail,
|
||||
plot=plot,
|
||||
contentTitle=contentTitle,
|
||||
quality=quality,
|
||||
infoLabels={'year': year}
|
||||
))
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
# Paginacion
|
||||
|
||||
if itemlist != []:
|
||||
actual_page_url = item.url
|
||||
next_page = scrapertools.find_single_match(data, 'href=([^>]+)>Siguiente »</a>')
|
||||
if next_page != '':
|
||||
itemlist.append(item.clone(action="lista",
|
||||
title='Siguiente >>>',
|
||||
url=next_page,
|
||||
thumbnail='https://s32.postimg.cc/4zppxf5j9/siguiente.png'
|
||||
))
|
||||
return itemlist
|
||||
|
||||
|
||||
def seccion(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = get_source(item.url)
|
||||
if item.extra == 'generos':
|
||||
patron = 'menu-item-object-category.*?<a href=([^<]+)>([^<]+)</a>'
|
||||
elif item.extra == 'a-z':
|
||||
patron = '<li><a href=([^<]+)>(\w|#)<\/a><\/li>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
url = scrapedurl
|
||||
thumbnail = ''
|
||||
if item.extra == 'generos':
|
||||
title = scrapedtitle
|
||||
else:
|
||||
title = scrapedtitle
|
||||
if title.lower() in thumbletras:
|
||||
thumbnail = thumbletras[title.lower()]
|
||||
|
||||
itemlist.append(item.clone(action='lista', title=title, url=url, thumbnail=thumbnail))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info()
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = item.url + texto
|
||||
if texto != '':
|
||||
return lista(item)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
global new_data
|
||||
new_data = []
|
||||
data = get_source(item.url)
|
||||
data = data.replace("<","<").replace(""",'"').replace(">",">").replace("&","&").replace('\"',"")
|
||||
patron = '<div class=TPlayerTb.*?id=(.*?)>.*?src=(.*?) frameborder'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for opt, urls_page in matches:
|
||||
language = scrapertools.find_single_match (data,'TPlayerNv>.*?tplayernv=%s><span>Opción.*?<span>(.*?)</span>' % opt)
|
||||
if 'trembed' in urls_page:
|
||||
urls_page = scrapertools.decodeHtmlentities(urls_page)
|
||||
sub_data = httptools.downloadpage(urls_page).data
|
||||
urls_page = scrapertools.find_single_match(sub_data, 'src="([^"]+)" ')
|
||||
if "repro.live" in urls_page:
|
||||
server_repro(urls_page)
|
||||
if "repros.live" in urls_page:
|
||||
server_repros(urls_page)
|
||||
if "itatroniks.com" in urls_page:
|
||||
server_itatroniks(urls_page)
|
||||
for url in new_data:
|
||||
itemlist.append(item.clone(title='[%s][%s]',
|
||||
url=url,
|
||||
action='play',
|
||||
language=language,
|
||||
))
|
||||
new_data = []
|
||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda x: x.title % (x.server.capitalize(), x.language))
|
||||
return itemlist
|
||||
|
||||
|
||||
def server_itatroniks(urls_page):
|
||||
logger.info()
|
||||
headers = {"Referer":urls_page}
|
||||
id = scrapertools.find_single_match(urls_page, 'embed/(\w+)')
|
||||
sub_data = httptools.downloadpage(urls_page, headers = headers).data
|
||||
matches = scrapertools.find_multiple_matches(sub_data, 'button id="([^"]+)')
|
||||
headers1 = ({"X-Requested-With":"XMLHttpRequest"})
|
||||
for serv in matches:
|
||||
data1 = httptools.downloadpage("https://itatroniks.com/get/%s/%s" %(id, serv), headers = headers1).data
|
||||
data_json = jsontools.load(data1)
|
||||
urls_page = ""
|
||||
try:
|
||||
if "finished" == data_json["status"]: urls_page = "https://%s/embed/%s" %(data_json["server"], data_json["extid"])
|
||||
if "propio" == data_json["status"]: urls_page = "https://%s/e/%s" %(data_json["server"], data_json["extid"])
|
||||
except:
|
||||
continue
|
||||
new_data.append(urls_page)
|
||||
|
||||
|
||||
def server_repros(urls_page):
|
||||
logger.info()
|
||||
headers = {"Referer":host}
|
||||
headers1 = {"X-Requested-With":"XMLHttpRequest"}
|
||||
sub_data = httptools.downloadpage(urls_page, headers = headers).data
|
||||
urls_page1 = scrapertools.find_multiple_matches(sub_data, 'data-embed="([^"]+)"')
|
||||
for idurl in urls_page1:
|
||||
#post = {"codigo":idurl}
|
||||
#post = urllib.urlencode(post)
|
||||
dd1 = httptools.downloadpage("https://repros.live/player/ajaxdata", post = urllib.urlencode({"codigo":idurl}), headers = headers1).data
|
||||
data_json = jsontools.load(dd1)
|
||||
new_data.append(data_json["url"])
|
||||
|
||||
|
||||
def server_repro(urls_page):
|
||||
logger.info()
|
||||
headers = {"Referer":urls_page}
|
||||
sub_data = httptools.downloadpage(urls_page, headers = headers).data
|
||||
urls_page1 = scrapertools.find_multiple_matches(sub_data, 'data-embed="([^"]+)"')
|
||||
for urls_page in urls_page1:
|
||||
urls_page += "==" # base64.decode no decodifica si no tiene al final "=="
|
||||
urls_page = base64.b64decode(urls_page)
|
||||
if "repro.live" in urls_page:
|
||||
data1 = httptools.downloadpage(urls_page, headers = headers).data
|
||||
urls_page1 = scrapertools.find_multiple_matches(data1, 'source src="([^"]+)')
|
||||
for urls_page in urls_page1:
|
||||
new_data.append(urls_page)
|
||||
else:
|
||||
new_data.append(urls_page)
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
item = Item()
|
||||
# categoria='peliculas'
|
||||
try:
|
||||
if categoria == 'peliculas':
|
||||
item.url = host + 'estrenos'
|
||||
elif categoria == 'infantiles':
|
||||
item.url = host + 'animacion'
|
||||
elif categoria == 'terror':
|
||||
item.url = host + 'terror'
|
||||
itemlist = lista(item)
|
||||
if itemlist[-1].title == 'Siguiente >>>':
|
||||
itemlist.pop()
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import urllib
|
||||
import base64
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core import tmdb
|
||||
from core import jsontools
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
from channelselector import get_thumb
|
||||
|
||||
|
||||
thumbletras = {'#': 'https://s32.postimg.cc/drojt686d/image.png',
|
||||
'a': 'https://s32.postimg.cc/llp5ekfz9/image.png',
|
||||
'b': 'https://s32.postimg.cc/y1qgm1yp1/image.png',
|
||||
'c': 'https://s32.postimg.cc/vlon87gmd/image.png',
|
||||
'd': 'https://s32.postimg.cc/3zlvnix9h/image.png',
|
||||
'e': 'https://s32.postimg.cc/bgv32qmsl/image.png',
|
||||
'f': 'https://s32.postimg.cc/y6u7vq605/image.png',
|
||||
'g': 'https://s32.postimg.cc/9237ib6jp/image.png',
|
||||
'h': 'https://s32.postimg.cc/812yt6pk5/image.png',
|
||||
'i': 'https://s32.postimg.cc/6nbbxvqat/image.png',
|
||||
'j': 'https://s32.postimg.cc/axpztgvdx/image.png',
|
||||
'k': 'https://s32.postimg.cc/976yrzdut/image.png',
|
||||
'l': 'https://s32.postimg.cc/fmal2e9yd/image.png',
|
||||
'm': 'https://s32.postimg.cc/m19lz2go5/image.png',
|
||||
'n': 'https://s32.postimg.cc/b2ycgvs2t/image.png',
|
||||
'o': 'https://s32.postimg.cc/c6igsucpx/image.png',
|
||||
'p': 'https://s32.postimg.cc/jnro82291/image.png',
|
||||
'q': 'https://s32.postimg.cc/ve5lpfv1h/image.png',
|
||||
'r': 'https://s32.postimg.cc/nmovqvqw5/image.png',
|
||||
's': 'https://s32.postimg.cc/zd2t89jol/image.png',
|
||||
't': 'https://s32.postimg.cc/wk9lo8jc5/image.png',
|
||||
'u': 'https://s32.postimg.cc/w8s5bh2w5/image.png',
|
||||
'v': 'https://s32.postimg.cc/e7dlrey91/image.png',
|
||||
'w': 'https://s32.postimg.cc/fnp49k15x/image.png',
|
||||
'x': 'https://s32.postimg.cc/dkep1w1d1/image.png',
|
||||
'y': 'https://s32.postimg.cc/um7j3zg85/image.png',
|
||||
'z': 'https://s32.postimg.cc/jb4vfm9d1/image.png'
|
||||
}
|
||||
|
||||
audio = {'Latino': '[COLOR limegreen]LATINO[/COLOR]', 'Español': '[COLOR yellow]ESPAÑOL[/COLOR]',
|
||||
'Sub Español': '[COLOR red]SUB ESPAÑOL[/COLOR]'}
|
||||
|
||||
host = 'http://pelisgratis.me/'
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
itemlist.append(item.clone(title="Estrenos",
|
||||
action="lista",
|
||||
thumbnail=get_thumb('premieres', auto=True),
|
||||
url=host + 'estrenos'
|
||||
))
|
||||
|
||||
itemlist.append(item.clone(title="Todas",
|
||||
action="lista",
|
||||
thumbnail=get_thumb('all', auto=True),
|
||||
url=host
|
||||
))
|
||||
|
||||
itemlist.append(item.clone(title="Generos",
|
||||
action="seccion",
|
||||
url=host,
|
||||
thumbnail=get_thumb('genres', auto=True),
|
||||
extra='generos'
|
||||
))
|
||||
|
||||
itemlist.append(item.clone(title="Alfabetico",
|
||||
action="seccion",
|
||||
url=host,
|
||||
thumbnail=get_thumb('alphabet', auto=True),
|
||||
extra='a-z'
|
||||
))
|
||||
|
||||
itemlist.append(item.clone(title="Mas Vistas",
|
||||
action="lista",
|
||||
thumbnail=get_thumb('more watched', auto=True),
|
||||
url=host + 'peliculas-mas-vistas'
|
||||
))
|
||||
|
||||
itemlist.append(item.clone(title="Mas Votadas",
|
||||
action="lista",
|
||||
thumbnail=get_thumb('more voted', auto=True),
|
||||
url=host + 'peliculas-mas-votadas'
|
||||
))
|
||||
|
||||
itemlist.append(item.clone(title="Buscar",
|
||||
action="search",
|
||||
url=host + '?s=',
|
||||
thumbnail=get_thumb('search', auto=True)
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def get_source(url, referer=None):
|
||||
logger.info()
|
||||
if referer is None:
|
||||
data = httptools.downloadpage(url).data
|
||||
else:
|
||||
data = httptools.downloadpage(url, headers={'Referer':referer}).data
|
||||
data = re.sub(r'\n|\r|\t| |<br>|\s{2,}', "", data)
|
||||
return data
|
||||
|
||||
|
||||
def lista(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = get_source(item.url)
|
||||
patron = 'article id=post-\d+.*?href=([^>]+)>.*?src=(.*?)\s.*?"Title">([^<]+)<(.*?)</a>.*?<p>([^<]+)</p>'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle, year_data, scrapedplot in matches:
|
||||
year = scrapertools.find_single_match(year_data, 'Year>(\d{4})<')
|
||||
|
||||
url = scrapedurl
|
||||
thumbnail = scrapedthumbnail
|
||||
plot = scrapedplot
|
||||
quality = ''
|
||||
contentTitle = scrapedtitle
|
||||
title = contentTitle
|
||||
year = year
|
||||
|
||||
itemlist.append(item.clone(action='findvideos',
|
||||
title=title,
|
||||
url=url,
|
||||
thumbnail=thumbnail,
|
||||
plot=plot,
|
||||
contentTitle=contentTitle,
|
||||
quality=quality,
|
||||
infoLabels={'year': year}
|
||||
))
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
# Paginacion
|
||||
|
||||
if itemlist != []:
|
||||
actual_page_url = item.url
|
||||
next_page = scrapertools.find_single_match(data, 'href=([^>]+)>Siguiente »</a>')
|
||||
if next_page != '':
|
||||
itemlist.append(item.clone(action="lista",
|
||||
title='Siguiente >>>',
|
||||
url=next_page,
|
||||
thumbnail='https://s32.postimg.cc/4zppxf5j9/siguiente.png'
|
||||
))
|
||||
return itemlist
|
||||
|
||||
|
||||
def seccion(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = get_source(item.url)
|
||||
if item.extra == 'generos':
|
||||
patron = 'menu-item-object-category.*?<a href=([^<]+)>([^<]+)</a>'
|
||||
elif item.extra == 'a-z':
|
||||
patron = '<li><a href=([^<]+)>(\w|#)<\/a><\/li>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
url = scrapedurl
|
||||
thumbnail = ''
|
||||
if item.extra == 'generos':
|
||||
title = scrapedtitle
|
||||
else:
|
||||
title = scrapedtitle
|
||||
if title.lower() in thumbletras:
|
||||
thumbnail = thumbletras[title.lower()]
|
||||
|
||||
itemlist.append(item.clone(action='lista', title=title, url=url, thumbnail=thumbnail))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info()
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = item.url + texto
|
||||
if texto != '':
|
||||
return lista(item)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
global new_data
|
||||
new_data = []
|
||||
data = get_source(item.url)
|
||||
data = data.replace("<","<").replace(""",'"').replace(">",">").replace("&","&").replace('\"',"")
|
||||
patron = '<div class=TPlayerTb.*?id=(.*?)>.*?src=(.*?) frameborder'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for opt, urls_page in matches:
|
||||
language = scrapertools.find_single_match (data,'TPlayerNv>.*?tplayernv=%s><span>Opción.*?<span>(.*?)</span>' % opt)
|
||||
if 'trembed' in urls_page:
|
||||
urls_page = scrapertools.decodeHtmlentities(urls_page)
|
||||
sub_data = httptools.downloadpage(urls_page).data
|
||||
urls_page = scrapertools.find_single_match(sub_data, 'src="([^"]+)" ')
|
||||
if "repro.live" in urls_page:
|
||||
server_repro(urls_page)
|
||||
if "repros.live" in urls_page:
|
||||
server_repros(urls_page)
|
||||
if "itatroniks.com" in urls_page:
|
||||
server_itatroniks(urls_page)
|
||||
for url in new_data:
|
||||
itemlist.append(item.clone(title='[%s][%s]',
|
||||
url=url,
|
||||
action='play',
|
||||
language=language,
|
||||
))
|
||||
new_data = []
|
||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda x: x.title % (x.server.capitalize(), x.language))
|
||||
return itemlist
|
||||
|
||||
|
||||
def server_itatroniks(urls_page):
|
||||
logger.info()
|
||||
headers = {"Referer":urls_page}
|
||||
id = scrapertools.find_single_match(urls_page, 'embed/(\w+)')
|
||||
sub_data = httptools.downloadpage(urls_page, headers = headers).data
|
||||
matches = scrapertools.find_multiple_matches(sub_data, 'button id="([^"]+)')
|
||||
headers1 = ({"X-Requested-With":"XMLHttpRequest"})
|
||||
for serv in matches:
|
||||
data1 = httptools.downloadpage("https://itatroniks.com/get/%s/%s" %(id, serv), headers = headers1).data
|
||||
data_json = jsontools.load(data1)
|
||||
urls_page = ""
|
||||
try:
|
||||
if "finished" == data_json["status"]: urls_page = "https://%s/embed/%s" %(data_json["server"], data_json["extid"])
|
||||
if "propio" == data_json["status"]: urls_page = "https://%s/e/%s" %(data_json["server"], data_json["extid"])
|
||||
except:
|
||||
continue
|
||||
new_data.append(urls_page)
|
||||
|
||||
|
||||
def server_repros(urls_page):
|
||||
logger.info()
|
||||
headers = {"Referer":host}
|
||||
headers1 = {"X-Requested-With":"XMLHttpRequest"}
|
||||
sub_data = httptools.downloadpage(urls_page, headers = headers).data
|
||||
urls_page1 = scrapertools.find_multiple_matches(sub_data, 'data-embed="([^"]+)"')
|
||||
for idurl in urls_page1:
|
||||
#post = {"codigo":idurl}
|
||||
#post = urllib.urlencode(post)
|
||||
dd1 = httptools.downloadpage("https://repros.live/player/ajaxdata", post = urllib.urlencode({"codigo":idurl}), headers = headers1).data
|
||||
data_json = jsontools.load(dd1)
|
||||
new_data.append(data_json["url"])
|
||||
|
||||
|
||||
def server_repro(urls_page):
|
||||
logger.info()
|
||||
headers = {"Referer":urls_page}
|
||||
sub_data = httptools.downloadpage(urls_page, headers = headers).data
|
||||
urls_page1 = scrapertools.find_multiple_matches(sub_data, 'data-embed="([^"]+)"')
|
||||
for urls_page in urls_page1:
|
||||
urls_page += "==" # base64.decode no decodifica si no tiene al final "=="
|
||||
urls_page = base64.b64decode(urls_page)
|
||||
if "repro.live" in urls_page:
|
||||
data1 = httptools.downloadpage(urls_page, headers = headers).data
|
||||
urls_page1 = scrapertools.find_multiple_matches(data1, 'source src="([^"]+)')
|
||||
for urls_page in urls_page1:
|
||||
new_data.append(urls_page)
|
||||
else:
|
||||
new_data.append(urls_page)
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
item = Item()
|
||||
# categoria='peliculas'
|
||||
try:
|
||||
if categoria == 'peliculas':
|
||||
item.url = host + 'estrenos'
|
||||
elif categoria == 'infantiles':
|
||||
item.url = host + 'animacion'
|
||||
elif categoria == 'terror':
|
||||
item.url = host + 'terror'
|
||||
itemlist = lista(item)
|
||||
if itemlist[-1].title == 'Siguiente >>>':
|
||||
itemlist.pop()
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -12,7 +12,7 @@ from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
|
||||
host = "http://www.pelismundo.com"
|
||||
host = "https://www.pelisvips.com"
|
||||
idiomas = {"Castellano":"CAST","Subtitulad":"VOSE","Latino":"LAT"}
|
||||
|
||||
def mainlist(item):
|
||||
@@ -209,17 +209,14 @@ def findvideos(item):
|
||||
))
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||
if itemlist:
|
||||
if itemlist and item.contentChannel != "videolibrary":
|
||||
itemlist.append(Item(channel = item.channel))
|
||||
itemlist.append(item.clone(channel="trailertools", title="Buscar Tráiler", action="buscartrailer", context="",
|
||||
text_color="magenta"))
|
||||
# Opción "Añadir esta película a la biblioteca de KODI"
|
||||
if item.extra != "library":
|
||||
if config.get_videolibrary_support():
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green",
|
||||
action="add_pelicula_to_library", url=item.url, thumbnail = item.thumbnail,
|
||||
fulltitle = item.contentTitle
|
||||
))
|
||||
if config.get_videolibrary_support():
|
||||
itemlist.append(item.clone(title="Añadir a la videoteca", text_color="green",
|
||||
action="add_pelicula_to_library", url=item.url, fulltitle = item.contentTitle
|
||||
))
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
@@ -173,6 +173,8 @@ def p_portipo(item):
|
||||
def peliculas(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
# action = ''
|
||||
# contentType = ''
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| |<br>", "", data)
|
||||
patron = '<img class="posterentrada" src="/([^"]+)".*?' # img
|
||||
@@ -184,12 +186,22 @@ def peliculas(item):
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedthumbnail, scrapedurl, year, plot, scrapedtitle in matches:
|
||||
if 'serie' in scrapedurl:
|
||||
action = 'temporadas'
|
||||
contentType = 'tvshow'
|
||||
title = scrapedtitle + ' [COLOR blue](Serie)[/COLOR]'
|
||||
|
||||
else:
|
||||
action = 'findvideos'
|
||||
contentType = 'movie'
|
||||
title = scrapedtitle
|
||||
|
||||
if item.infoLabels['plot'] == '':
|
||||
item.plot = plot
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action="findvideos", contentTitle=scrapedtitle,
|
||||
itemlist.append(Item(channel=item.channel, action=action, contentTitle=scrapedtitle, contentType=contentType,
|
||||
infoLabels={"year": year}, thumbnail=host + scrapedthumbnail,
|
||||
url=scrapedurl, title=scrapedtitle, plot=plot))
|
||||
url=scrapedurl, title=title, plot=plot))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
|
||||
|
||||
@@ -308,7 +320,8 @@ def temporadas(item):
|
||||
text_color=color1, thumbnail=get_thumb("videolibrary_tvshow.png"), fanart=fanart_host))
|
||||
return itemlist
|
||||
else:
|
||||
return episdesxseason(item)
|
||||
return episodesxseason(item)
|
||||
|
||||
|
||||
def episodios(item):
|
||||
logger.info()
|
||||
@@ -339,12 +352,12 @@ def episodesxseason(item):
|
||||
episode = element['metas_formateadas']['nepisodio']
|
||||
season = element['metas_formateadas']['ntemporada']
|
||||
scrapedurl = element['url_directa']
|
||||
|
||||
if 'season' in item.infoLabels and int(item.infoLabels['season']) != int(season):
|
||||
continue
|
||||
title = "%sx%s: %s" % (season, episode.zfill(
|
||||
2), scrapertools.unescape(scrapedname))
|
||||
new_item = item.clone(title=title, url=scrapedurl, action="findvideos", text_color=color3, fulltitle=title,
|
||||
contentType="episode", extra='serie')
|
||||
title = "%sx%s: %s" % (season, episode.zfill(2), scrapertools.unescape(scrapedname))
|
||||
new_item = item.clone(title=title, url=scrapedurl, action="findvideos", text_color=color3,
|
||||
fulltitle=title, contentType="episode", extra='serie')
|
||||
if 'infoLabels' not in new_item:
|
||||
new_item.infoLabels = {}
|
||||
new_item.infoLabels['season'] = season
|
||||
@@ -365,11 +378,7 @@ def episodesxseason(item):
|
||||
itemlist.sort(key=lambda it: int(it.infoLabels['episode']),
|
||||
reverse=config.get_setting('orden_episodios', __channel__))
|
||||
tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
|
||||
# Opción "Añadir esta serie a la videoteca"
|
||||
# if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||
# itemlist.append(Item(channel=__channel__, title="Añadir esta serie a la videoteca", url=item.url,
|
||||
# action="add_serie_to_library", extra="episodios", show=item.show, category="Series",
|
||||
# text_color=color1, thumbnail=get_thumb("videolibrary_tvshow.png"), fanart=fanart_host))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
@@ -216,6 +216,28 @@ def section(item):
|
||||
return itemlist
|
||||
|
||||
|
||||
def add_vip(item, video_url, language=None):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
referer = video_url
|
||||
post = {'r': item.url, 'd': 'www.pelisplus.net'}
|
||||
post = urllib.urlencode(post)
|
||||
video_url = video_url.replace('/v/', '/api/source/')
|
||||
url_data = httptools.downloadpage(video_url, post=post, headers={'Referer': referer}).data
|
||||
patron = '"file":"([^"]+)","label":"([^"]+)"'
|
||||
matches = re.compile(patron, re.DOTALL).findall(url_data)
|
||||
if not config.get_setting('unify'):
|
||||
title = ' [%s]' % language
|
||||
else:
|
||||
title = ''
|
||||
|
||||
for url, quality in matches:
|
||||
url = url.replace('\/', '/')
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, title='%s'+title, url=url, action='play', language=language,
|
||||
quality=quality, infoLabels=item.infoLabels))
|
||||
return itemlist
|
||||
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
import urllib
|
||||
@@ -227,34 +249,22 @@ def findvideos(item):
|
||||
|
||||
for video_url in matches:
|
||||
language = 'latino'
|
||||
url = ''
|
||||
if not config.get_setting('unify'):
|
||||
title = ' [%s]' % language.capitalize()
|
||||
title = ' [%s]' % IDIOMAS[language]
|
||||
else:
|
||||
title = ''
|
||||
|
||||
if 'pelisplus.net' in video_url:
|
||||
referer = video_url
|
||||
post = {'r':item.url, 'd': 'www.pelisplus.net'}
|
||||
post = urllib.urlencode(post)
|
||||
video_url = video_url.replace('/v/', '/api/source/')
|
||||
url_data = httptools.downloadpage(video_url, post=post, headers={'Referer':referer}).data
|
||||
patron = '"file":"([^"]+)","label":"([^"]+)"'
|
||||
matches = re.compile(patron, re.DOTALL).findall(url_data)
|
||||
for url, quality in matches:
|
||||
url = url.replace('\/', '/')
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, title='%s' + title, url=url, action='play', language=IDIOMAS[language],
|
||||
quality=quality, infoLabels=item.infoLabels))
|
||||
itemlist += add_vip(item, video_url, IDIOMAS[language])
|
||||
|
||||
else:
|
||||
if not 'vidoza' in video_url and not 'pelishd' in video_url:
|
||||
url_data = get_source(video_url)
|
||||
|
||||
|
||||
if 'vidoza' not in video_url and not 'pelishd' in video_url:
|
||||
elif not 'vidoza' in video_url and not 'pelishd' in video_url:
|
||||
url_data = get_source(video_url)
|
||||
url = scrapertools.find_single_match(url_data, '<iframe src="([^"]+)"')
|
||||
|
||||
else:
|
||||
url = video_url
|
||||
|
||||
if not 'server' in url:
|
||||
url = url
|
||||
|
||||
@@ -276,6 +286,7 @@ def findvideos(item):
|
||||
itemlist.append(Item(channel=item.channel, title='%s'+title, url=url, action='play', language=IDIOMAS[language],
|
||||
infoLabels=item.infoLabels))
|
||||
|
||||
|
||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||
|
||||
# Requerido para FilterTools
|
||||
|
||||
@@ -7,7 +7,6 @@ from core import scrapertools
|
||||
from core.item import Item
|
||||
from core import servertools
|
||||
from core import httptools
|
||||
from core import tmdb
|
||||
|
||||
host = 'http://www.perfectgirls.net'
|
||||
|
||||
@@ -17,7 +16,6 @@ def mainlist(item):
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Ultimos" , action="peliculas", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Top" , action="peliculas", url=host + "/top/3days/"))
|
||||
|
||||
itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Buscar", action="search"))
|
||||
return itemlist
|
||||
@@ -47,7 +45,8 @@ def categorias(item):
|
||||
scrapedplot = ""
|
||||
scrapedthumbnail = ""
|
||||
url = urlparse.urljoin(item.url,scrapedurl) + "/1"
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle , url=url , thumbnail=scrapedthumbnail , plot=scrapedplot , folder=True) )
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=url,
|
||||
thumbnail=scrapedthumbnail, plot=scrapedplot) )
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -61,24 +60,21 @@ def peliculas(item):
|
||||
patron += '<time>(.*?)</a>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
scrapertools.printMatches(matches)
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail,time in matches:
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail,duracion in matches:
|
||||
plot = ""
|
||||
contentTitle = scrapedtitle
|
||||
scrapedhd = scrapertools.find_single_match(time, '<div class="hd">([^"]+)</div>')
|
||||
if scrapedhd == 'HD':
|
||||
time = scrapertools.find_single_match(time, '([^"]+)</time>')
|
||||
title = "[COLOR yellow]" + time + "[/COLOR] " + "[COLOR red]" + scrapedhd + "[/COLOR] " + scrapedtitle
|
||||
else:
|
||||
time = scrapertools.find_single_match(time, '([^"]+)</time>')
|
||||
time = scrapertools.find_single_match(duracion, '([^"]+)</time>')
|
||||
if not 'HD' in duracion :
|
||||
title = "[COLOR yellow]" + time + "[/COLOR] " + scrapedtitle
|
||||
else:
|
||||
title = "[COLOR yellow]" + time + "[/COLOR] " + "[COLOR red]" + "HD" + "[/COLOR] " + scrapedtitle
|
||||
scrapedthumbnail = "http:" + scrapedthumbnail
|
||||
url = urlparse.urljoin(item.url,scrapedurl)
|
||||
year = ""
|
||||
itemlist.append( Item(channel=item.channel, action="play" , title=title , url=url, thumbnail=scrapedthumbnail, plot=plot, contentTitle = contentTitle, infoLabels={'year':year} ))
|
||||
itemlist.append( Item(channel=item.channel, action="play", title=title, url=url, thumbnail=scrapedthumbnail,
|
||||
plot=plot, contentTitle = title))
|
||||
next_page = scrapertools.find_single_match(data, '<a class="btn_wrapper__btn" href="([^"]+)">Next</a></li>')
|
||||
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="peliculas", title="Página Siguiente >>", text_color="blue", url=next_page ))
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -89,6 +85,6 @@ def play(item):
|
||||
patron = '<source src="([^"]+)" res="\d+" label="([^"]+)" type="video/mp4" default/>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle in matches:
|
||||
itemlist.append(item.clone(action="play", title=scrapedtitle, fulltitle = item.title, url=scrapedurl))
|
||||
itemlist.append(item.clone(action="play", title=scrapedtitle, url=scrapedurl))
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
{
|
||||
"id": "pordede",
|
||||
"name": "Pordede",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["cast"],
|
||||
"thumbnail": "pordede.png",
|
||||
"banner": "pordede.png",
|
||||
"categories": [
|
||||
"movie",
|
||||
"tvshow"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "pordedeuser",
|
||||
"type": "text",
|
||||
"label": "@30014",
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "pordedepassword",
|
||||
"type": "text",
|
||||
"hidden": true,
|
||||
"label": "@30015",
|
||||
"enabled": "!eq(-1,'')",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"default": false,
|
||||
"enabled": "!eq(-1,'') + !eq(-2,'')",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "pordedesortlinks",
|
||||
"type": "list",
|
||||
"label": "Ordenar enlaces",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": "!eq(-2,'') + !eq(-3,'')",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"Por no Reportes",
|
||||
"Por Idioma",
|
||||
"Por Calidad",
|
||||
"Por Idioma y Calidad",
|
||||
"Por Idioma y no Reportes",
|
||||
"Por Idioma, Calidad y no Reportes"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "pordedeshowlinks",
|
||||
"type": "list",
|
||||
"label": "Mostrar enlaces",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": "!eq(-3,'') + !eq(-4,'')",
|
||||
"lvalues": [
|
||||
"Todos",
|
||||
"Ver online",
|
||||
"Descargar"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "pordedenumberlinks",
|
||||
"type": "list",
|
||||
"label": "Limitar número de enlaces",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": "!eq(-4,'') + !eq(-5,'')",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"5",
|
||||
"10",
|
||||
"15",
|
||||
"20",
|
||||
"25",
|
||||
"30"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,665 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import urlparse
|
||||
|
||||
from core import channeltools
|
||||
from core import httptools
|
||||
from core import jsontools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
from platformcode import platformtools
|
||||
|
||||
def login():
|
||||
url_origen = "http://www.pordede.com"
|
||||
data = httptools.downloadpage(url_origen).data
|
||||
if config.get_setting("pordedeuser", "pordede") in data:
|
||||
return True
|
||||
|
||||
url = "http://www.pordede.com/api/login/auth?response_type=code&client_id=appclient&redirect_uri=http%3A%2F%2Fwww.pordede.com%2Fapi%2Flogin%2Freturn&state=none"
|
||||
post = "username=%s&password=%s&authorized=autorizar" % (config.get_setting("pordedeuser", "pordede"), config.get_setting("pordedepassword", "pordede"))
|
||||
data = httptools.downloadpage(url, post).data
|
||||
if '"ok":true' in data:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
if not config.get_setting("pordedeuser", "pordede"):
|
||||
itemlist.append( Item( channel=item.channel , title="Habilita tu cuenta en la configuración..." , action="settingCanal" , url="") )
|
||||
else:
|
||||
result = login()
|
||||
if not result:
|
||||
itemlist.append(Item(channel=item.channel, action="mainlist", title="Login fallido. Volver a intentar..."))
|
||||
return itemlist
|
||||
itemlist.append( Item(channel=item.channel, action="menuseries" , title="Series" , url="" ))
|
||||
itemlist.append( Item(channel=item.channel, action="menupeliculas" , title="Películas y documentales" , url="" ))
|
||||
itemlist.append( Item(channel=item.channel, action="listas_sigues" , title="Listas que sigues" , url="http://www.pordede.com/lists/following" ))
|
||||
itemlist.append( Item(channel=item.channel, action="tus_listas" , title="Tus listas" , url="http://www.pordede.com/lists/yours" ))
|
||||
itemlist.append( Item(channel=item.channel, action="listas_sigues" , title="Top listas" , url="http://www.pordede.com/lists" ))
|
||||
itemlist.append( Item(channel=item.channel, action="settingCanal" , title="Configuración..." , url="" ))
|
||||
|
||||
return itemlist
|
||||
|
||||
def settingCanal(item):
|
||||
return platformtools.show_channel_settings()
|
||||
|
||||
def menuseries(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas" , title="Novedades" , url="http://www.pordede.com/series/loadmedia/offset/0/showlist/hot" ))
|
||||
itemlist.append( Item(channel=item.channel, action="generos" , title="Por géneros" , url="http://www.pordede.com/series" ))
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas" , title="Siguiendo" , url="http://www.pordede.com/series/following" ))
|
||||
itemlist.append( Item(channel=item.channel, action="siguientes" , title="Siguientes Capítulos" , url="http://www.pordede.com/main/index" , viewmode="movie"))
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas" , title="Favoritas" , url="http://www.pordede.com/series/favorite" ))
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas" , title="Pendientes" , url="http://www.pordede.com/series/pending" ))
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas" , title="Terminadas" , url="http://www.pordede.com/series/seen" ))
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas" , title="Recomendadas" , url="http://www.pordede.com/series/recommended" ))
|
||||
itemlist.append( Item(channel=item.channel, action="search" , title="Buscar..." , url="http://www.pordede.com/series" ))
|
||||
|
||||
return itemlist
|
||||
|
||||
def menupeliculas(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas" , title="Novedades" , url="http://www.pordede.com/pelis/loadmedia/offset/0/showlist/hot" ))
|
||||
itemlist.append( Item(channel=item.channel, action="generos" , title="Por géneros" , url="http://www.pordede.com/pelis" ))
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas" , title="Favoritas" , url="http://www.pordede.com/pelis/favorite" ))
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas" , title="Pendientes" , url="http://www.pordede.com/pelis/pending" ))
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas" , title="Vistas" , url="http://www.pordede.com/pelis/seen" ))
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas" , title="Recomendadas" , url="http://www.pordede.com/pelis/recommended" ))
|
||||
itemlist.append( Item(channel=item.channel, action="search" , title="Buscar..." , url="http://www.pordede.com/pelis" ))
|
||||
|
||||
return itemlist
|
||||
|
||||
def generos(item):
|
||||
logger.info()
|
||||
|
||||
# Descarga la pagina
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
# Extrae las entradas (carpetas)
|
||||
data = scrapertools.find_single_match(data,'<div class="section genre">(.*?)</div>')
|
||||
patron = '<a class="mediaFilterLink" data-value="([^"]+)" href="([^"]+)">([^<]+)<span class="num">\((\d+)\)</span></a>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
itemlist = []
|
||||
|
||||
for textid,scrapedurl,scrapedtitle,cuantos in matches:
|
||||
title = scrapedtitle.strip()+" ("+cuantos+")"
|
||||
thumbnail = ""
|
||||
plot = ""
|
||||
|
||||
if "/pelis" in item.url:
|
||||
url = "http://www.pordede.com/pelis/loadmedia/offset/0/genre/"+textid.replace(" ","%20")+"/showlist/all"
|
||||
else:
|
||||
url = "http://www.pordede.com/series/loadmedia/offset/0/genre/"+textid.replace(" ","%20")+"/showlist/all"
|
||||
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas" , title=title , url=url, thumbnail=thumbnail, plot=plot, fulltitle=title))
|
||||
|
||||
return itemlist
|
||||
|
||||
def search(item,texto):
|
||||
logger.info()
|
||||
|
||||
if item.url=="":
|
||||
item.url="http://www.pordede.com/pelis"
|
||||
|
||||
texto = texto.replace(" ","-")
|
||||
|
||||
item.extra = item.url
|
||||
item.url = item.url+"/loadmedia/offset/0/query/"+texto+"/years/1950/on/undefined/showlist/all"
|
||||
|
||||
try:
|
||||
return buscar(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
def buscar(item):
|
||||
logger.info()
|
||||
|
||||
# Descarga la pagina
|
||||
headers = {"X-Requested-With": "XMLHttpRequest"}
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
# Extrae las entradas (carpetas)
|
||||
json_object = jsontools.load(data)
|
||||
data = json_object["html"]
|
||||
|
||||
return parse_mixed_results(item,data)
|
||||
|
||||
def parse_mixed_results(item,data):
|
||||
patron = '<a class="defaultLink extended" href="([^"]+)"[^<]+'
|
||||
patron += '<div class="coverMini shadow tiptip" title="([^"]+)"[^<]+'
|
||||
patron += '<img class="centeredPic.*?src="([^"]+)"'
|
||||
patron += '[^<]+<img[^<]+<div class="extra-info">'
|
||||
patron += '<span class="year">([^<]+)</span>'
|
||||
patron += '<span class="value"><i class="icon-star"></i>([^<]+)</span>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
itemlist = []
|
||||
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail,scrapedyear,scrapedvalue in matches:
|
||||
title = scrapertools.htmlclean(scrapedtitle)
|
||||
if scrapedyear != '':
|
||||
title += " ("+scrapedyear+")"
|
||||
fulltitle = title
|
||||
if scrapedvalue != '':
|
||||
title += " ("+scrapedvalue+")"
|
||||
thumbnail = urlparse.urljoin(item.url,scrapedthumbnail)
|
||||
fanart = thumbnail.replace("mediathumb","mediabigcover")
|
||||
plot = ""
|
||||
|
||||
if "/peli/" in scrapedurl or "/docu/" in scrapedurl:
|
||||
|
||||
if "/peli/" in scrapedurl:
|
||||
sectionStr = "peli"
|
||||
else:
|
||||
sectionStr = "docu"
|
||||
|
||||
referer = urlparse.urljoin(item.url,scrapedurl)
|
||||
url = referer.replace("/{0}/".format(sectionStr),"/links/view/slug/")+"/what/{0}".format(sectionStr)
|
||||
|
||||
itemlist.append( Item(channel=item.channel, action="findvideos" , title=title , extra=referer, url=url, thumbnail=thumbnail, plot=plot, fulltitle=fulltitle, fanart=fanart,
|
||||
contentTitle=scrapedtitle, contentType="movie", context=["buscar_trailer"]))
|
||||
else:
|
||||
referer = item.url
|
||||
url = urlparse.urljoin(item.url,scrapedurl)
|
||||
itemlist.append( Item(channel=item.channel, action="episodios" , title=title , extra=referer, url=url, thumbnail=thumbnail, plot=plot, fulltitle=fulltitle, show=title, fanart=fanart,
|
||||
contentTitle=scrapedtitle, contentType="tvshow", context=["buscar_trailer"]))
|
||||
|
||||
next_page = scrapertools.find_single_match(data, '<div class="loadingBar" data-url="([^"]+)"')
|
||||
if next_page != "":
|
||||
url = urlparse.urljoin("http://www.pordede.com", next_page)
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="lista", title=">> Página siguiente", extra=item.extra, url=url))
|
||||
|
||||
try:
|
||||
import xbmcplugin
|
||||
xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_UNSORTED)
|
||||
xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_VIDEO_TITLE)
|
||||
except:
|
||||
pass
|
||||
|
||||
return itemlist
|
||||
|
||||
def siguientes(item):
|
||||
logger.info()
|
||||
|
||||
# Descarga la pagina
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
# Extrae las entradas (carpetas)
|
||||
bloque = scrapertools.find_single_match(data, '<h2>Siguiendo</h2>(.*?)<div class="box">')
|
||||
patron = '<div class="coverMini shadow tiptip" title="([^"]+)">[^<]+'
|
||||
patron += '<img class="centeredPic centeredPicFalse" onerror="[^"]+" src="([^"]+)"[^<]+'
|
||||
patron += '<img src="/images/loading-mini.gif" class="loader"/>[^<]+'
|
||||
patron += '<div class="extra-info"><span class="year">[^<]+'
|
||||
patron += '</span><span class="value"><i class="icon-star"></i>[^<]+'
|
||||
patron += '</span></div>[^<]+'
|
||||
patron += '</div>[^<]+'
|
||||
patron += '</a>[^<]+'
|
||||
patron += '<a class="userepiinfo defaultLink" href="([^"]+)">(\d+)x(\d+)'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
itemlist = []
|
||||
|
||||
for scrapedtitle,scrapedthumbnail,scrapedurl,scrapedsession,scrapedepisode in matches:
|
||||
title = scrapertools.htmlclean(scrapedtitle)
|
||||
session = scrapertools.htmlclean(scrapedsession)
|
||||
episode = scrapertools.htmlclean(scrapedepisode)
|
||||
thumbnail = urlparse.urljoin(item.url,scrapedthumbnail)
|
||||
fanart = thumbnail.replace("mediathumb","mediabigcover")
|
||||
plot = ""
|
||||
title = session + "x" + episode + " - " + title
|
||||
|
||||
referer = urlparse.urljoin(item.url,scrapedurl)
|
||||
url = referer
|
||||
|
||||
itemlist.append( Item(channel=item.channel, action="episodio" , title=title , url=url, thumbnail=thumbnail, plot=plot, fulltitle=title, show=title, fanart=fanart, extra=session+"|"+episode))
|
||||
|
||||
return itemlist
|
||||
|
||||
def episodio(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
# Descarga la pagina
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
session = str(int(item.extra.split("|")[0]))
|
||||
episode = str(int(item.extra.split("|")[1]))
|
||||
patrontemporada = '<div class="checkSeason"[^>]+>Temporada '+session+'<div class="right" onclick="controller.checkSeason(.*?)\s+</div></div>'
|
||||
matchestemporadas = re.compile(patrontemporada,re.DOTALL).findall(data)
|
||||
|
||||
for bloque_episodios in matchestemporadas:
|
||||
# Extrae los episodios
|
||||
patron = '<span class="title defaultPopup" href="([^"]+)"><span class="number">'+episode+' </span>([^<]+)</span>(\s*</div>\s*<span[^>]*><span[^>]*>[^<]*</span><span[^>]*>[^<]*</span></span><div[^>]*><button[^>]*><span[^>]*>[^<]*</span><span[^>]*>[^<]*</span></button><div class="action([^"]*)" data-action="seen">)?'
|
||||
matches = re.compile(patron,re.DOTALL).findall(bloque_episodios)
|
||||
|
||||
for scrapedurl,scrapedtitle,info,visto in matches:
|
||||
if visto.strip()=="active":
|
||||
visto_string = "[visto] "
|
||||
else:
|
||||
visto_string = ""
|
||||
numero=episode
|
||||
title = visto_string+session+"x"+numero+" "+scrapertools.htmlclean(scrapedtitle)
|
||||
thumbnail = ""
|
||||
plot = ""
|
||||
|
||||
epid = scrapertools.find_single_match(scrapedurl,"id/(\d+)")
|
||||
url = "http://www.pordede.com/links/viewepisode/id/"+epid
|
||||
itemlist.append( Item(channel=item.channel, action="findvideos" , title=title , url=url, thumbnail=thumbnail, plot=plot, fulltitle=title, fanart=item.fanart, show=item.show))
|
||||
|
||||
itemlist2 = []
|
||||
for capitulo in itemlist:
|
||||
itemlist2 = findvideos(capitulo)
|
||||
|
||||
return itemlist2
|
||||
|
||||
def peliculas(item):
|
||||
logger.info()
|
||||
|
||||
# Descarga la pagina
|
||||
headers = {"X-Requested-With": "XMLHttpRequest"}
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
# Extrae las entradas (carpetas)
|
||||
json_object = jsontools.load(data)
|
||||
data = json_object["html"]
|
||||
|
||||
return parse_mixed_results(item,data)
|
||||
|
||||
def episodios(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
# Descarga la pagina
|
||||
idserie = ''
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
patrontemporada = '<div class="checkSeason"[^>]+>([^<]+)<div class="right" onclick="controller.checkSeason(.*?)\s+</div></div>'
|
||||
matchestemporadas = re.compile(patrontemporada,re.DOTALL).findall(data)
|
||||
|
||||
idserie = scrapertools.find_single_match(data,'<div id="layout4" class="itemProfile modelContainer" data-model="serie" data-id="(\d+)"')
|
||||
|
||||
for nombre_temporada,bloque_episodios in matchestemporadas:
|
||||
# Extrae los episodios
|
||||
patron = '<span class="title defaultPopup" href="([^"]+)"><span class="number">([^<]+)</span>([^<]+)</span>(\s*</div>\s*<span[^>]*><span[^>]*>[^<]*</span><span[^>]*>[^<]*</span></span><div[^>]*><button[^>]*><span[^>]*>[^<]*</span><span[^>]*>[^<]*</span></button><div class="action([^"]*)" data-action="seen">)?'
|
||||
matches = re.compile(patron,re.DOTALL).findall(bloque_episodios)
|
||||
|
||||
for scrapedurl,numero,scrapedtitle,info,visto in matches:
|
||||
if visto.strip()=="active":
|
||||
visto_string = "[visto] "
|
||||
else:
|
||||
visto_string = ""
|
||||
|
||||
title = visto_string+nombre_temporada.replace("Temporada ", "").replace("Extras", "Extras 0")+"x"+numero+" "+scrapertools.htmlclean(scrapedtitle)
|
||||
thumbnail = item.thumbnail
|
||||
fanart= item.fanart
|
||||
plot = ""
|
||||
|
||||
epid = scrapertools.find_single_match(scrapedurl,"id/(\d+)")
|
||||
url = "http://www.pordede.com/links/viewepisode/id/"+epid
|
||||
itemlist.append( Item(channel=item.channel, action="findvideos" , title=title , url=url, thumbnail=thumbnail, plot=plot, fulltitle=title, fanart= fanart, show=item.show))
|
||||
|
||||
if config.get_videolibrary_support():
|
||||
show = re.sub(r"\s\(\d+\)\s\(\d+\.\d+\)", "", item.show)
|
||||
|
||||
itemlist.append( Item(channel='pordede', title="Añadir esta serie a la biblioteca de XBMC", url=item.url, action="add_serie_to_library", extra="episodios###", show=show) )
|
||||
itemlist.append( Item(channel='pordede', title="Descargar todos los episodios de la serie", url=item.url, action="download_all_episodes", extra="episodios", show=show))
|
||||
itemlist.append( Item(channel='pordede', title="Marcar como Pendiente", tipo="serie", idtemp=idserie, valor="1", action="pordede_check", show=show))
|
||||
itemlist.append( Item(channel='pordede', title="Marcar como Siguiendo", tipo="serie", idtemp=idserie, valor="2", action="pordede_check", show=show))
|
||||
itemlist.append( Item(channel='pordede', title="Marcar como Finalizada", tipo="serie", idtemp=idserie, valor="3", action="pordede_check", show=show))
|
||||
itemlist.append( Item(channel='pordede', title="Marcar como Favorita", tipo="serie", idtemp=idserie, valor="4", action="pordede_check", show=show))
|
||||
itemlist.append( Item(channel='pordede', title="Quitar marca", tipo="serie", idtemp=idserie, valor="0", action="pordede_check", show=show))
|
||||
|
||||
return itemlist
|
||||
|
||||
def parse_listas(item, patron):
|
||||
logger.info()
|
||||
|
||||
# Descarga la pagina
|
||||
headers = {"X-Requested-With": "XMLHttpRequest"}
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
# Extrae las entradas (carpetas)
|
||||
json_object = jsontools.load(data)
|
||||
data = json_object["html"]
|
||||
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
itemlist = []
|
||||
|
||||
for scrapedurl,scrapedtitle,scrapeduser,scrapedfichas in matches:
|
||||
title = scrapertools.htmlclean(scrapedtitle + ' (' + scrapedfichas + ' fichas, por ' + scrapeduser + ')')
|
||||
url = urlparse.urljoin(item.url,scrapedurl) + "/offset/0/loadmedia"
|
||||
thumbnail = ""
|
||||
itemlist.append( Item(channel=item.channel, action="lista" , title=title , url=url))
|
||||
|
||||
nextpage = scrapertools.find_single_match(data,'data-url="(/lists/loadlists/offset/[^"]+)"')
|
||||
if nextpage != '':
|
||||
url = urlparse.urljoin(item.url,nextpage)
|
||||
itemlist.append( Item(channel=item.channel, action="listas_sigues" , title=">> Página siguiente" , extra=item.extra, url=url))
|
||||
|
||||
try:
|
||||
import xbmcplugin
|
||||
xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_UNSORTED)
|
||||
xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_VIDEO_TITLE)
|
||||
except:
|
||||
pass
|
||||
|
||||
return itemlist
|
||||
|
||||
def listas_sigues(item):
|
||||
logger.info()
|
||||
|
||||
patron = '<div class="clearfix modelContainer" data-model="lista"[^<]+'
|
||||
patron += '<span class="title"><span class="name"><a class="defaultLink" href="([^"]+)">([^<]+)</a>'
|
||||
patron += '</span>[^<]+<a[^>]+>([^<]+)</a></span>\s+<div[^<]+<div[^<]+</div>\s+<div class="info">\s+<p>([0-9]+)'
|
||||
|
||||
return parse_listas(item, patron)
|
||||
|
||||
def tus_listas(item):
|
||||
logger.info()
|
||||
|
||||
patron = '<div class="clearfix modelContainer" data-model="lista"[^<]+'
|
||||
patron += '<div class="right"[^<]+'
|
||||
patron += '<button[^<]+</button[^<]+'
|
||||
patron += '<button[^<]+</button[^<]+'
|
||||
patron += '</div[^<]+'
|
||||
patron += '<span class="title"><span class="name"><a class="defaultLink" href="([^"]+)">([^<]+)</a>'
|
||||
patron += '</span>[^<]+<a[^>]+>([^<]+)</a></span>\s+<div[^<]+<div[^<]+</div>\s+<div class="info">\s+<p>([0-9]+)'
|
||||
|
||||
return parse_listas(item, patron)
|
||||
|
||||
def lista(item):
|
||||
logger.info()
|
||||
|
||||
# Descarga la pagina
|
||||
headers = {"X-Requested-With": "XMLHttpRequest"}
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
# Extrae las entradas (carpetas)
|
||||
json_object = jsontools.load(data)
|
||||
data = json_object["html"]
|
||||
|
||||
return parse_mixed_results(item,data)
|
||||
|
||||
def findvideos(item, verTodos=False):
|
||||
logger.info()
|
||||
|
||||
# Descarga la pagina
|
||||
data = httptools.downloadpage(item.url).data
|
||||
logger.info(data)
|
||||
|
||||
sesion = scrapertools.find_single_match(data,'SESS = "([^"]+)";')
|
||||
|
||||
patron = '<a target="_blank" class="a aporteLink(.*?)</a>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
itemlist = []
|
||||
|
||||
idpeli = scrapertools.find_single_match(data,'<div class="buttons"><button class="defaultPopup onlyLogin" href="/links/create/ref_id/(\d+)/ref_model/4">Añadir enlace')
|
||||
|
||||
if (config.get_platform().startswith("xbmc") or config.get_platform().startswith("kodi")) and "/what/peli" in item.url:
|
||||
itemlist.append( Item(channel=item.channel, action="infosinopsis" , title="INFO / SINOPSIS" , url=item.url, thumbnail=item.thumbnail, fanart=item.fanart, folder=False ))
|
||||
|
||||
itemsort = []
|
||||
sortlinks = config.get_setting("pordedesortlinks",item.channel)
|
||||
showlinks = config.get_setting("pordedeshowlinks",item.channel)
|
||||
|
||||
if sortlinks != '' and sortlinks !="No":
|
||||
sortlinks = int(sortlinks)
|
||||
else:
|
||||
sortlinks = 0
|
||||
|
||||
if showlinks != '' and showlinks !="No":
|
||||
showlinks = int(showlinks)
|
||||
else:
|
||||
showlinks = 0
|
||||
|
||||
for match in matches:
|
||||
jdown = scrapertools.find_single_match(match,'<div class="jdownloader">[^<]+</div>')
|
||||
if (showlinks == 1 and jdown != '') or (showlinks == 2 and jdown == ''):
|
||||
continue
|
||||
|
||||
idiomas = re.compile('<div class="flag([^"]+)">([^<]+)</div>',re.DOTALL).findall(match)
|
||||
idioma_0 = (idiomas[0][0].replace(" ","").strip() + " " + idiomas[0][1].replace(" ","").strip()).strip()
|
||||
if len(idiomas) > 1:
|
||||
idioma_1 = (idiomas[1][0].replace(" ","").strip() + " " + idiomas[1][1].replace(" ","").strip()).strip()
|
||||
idioma = idioma_0 + ", " + idioma_1
|
||||
else:
|
||||
idioma_1 = ''
|
||||
idioma = idioma_0
|
||||
|
||||
calidad_video = scrapertools.find_single_match(match,'<div class="linkInfo quality"><i class="icon-facetime-video"></i>([^<]+)</div>')
|
||||
calidad_audio = scrapertools.find_single_match(match,'<div class="linkInfo qualityaudio"><i class="icon-headphones"></i>([^<]+)</div>')
|
||||
|
||||
thumb_servidor = scrapertools.find_single_match(match,'<div class="hostimage"[^<]+<img\s*src="([^"]+)">')
|
||||
nombre_servidor = scrapertools.find_single_match(thumb_servidor,"popup_([^\.]+)\.png")
|
||||
|
||||
if jdown != '':
|
||||
title = "Download "+nombre_servidor+" ("+idioma+") (Calidad "+calidad_video.strip()+", audio "+calidad_audio.strip()+")"
|
||||
else:
|
||||
title = "Ver en "+nombre_servidor+" ("+idioma+") (Calidad "+calidad_video.strip()+", audio "+calidad_audio.strip()+")"
|
||||
|
||||
cuenta = []
|
||||
valoracion = 0
|
||||
for idx, val in enumerate(['1', '2', 'report']):
|
||||
nn = scrapertools.find_single_match(match,'<span\s+data-num="([^"]+)"\s+class="defaultPopup"\s+href="/likes/popup/value/'+val+'/')
|
||||
if nn != '0' and nn != '':
|
||||
cuenta.append(nn + ' ' + ['ok', 'ko', 'rep'][idx])
|
||||
|
||||
if val == '1':
|
||||
valoracion += int(nn)
|
||||
else:
|
||||
valoracion += -int(nn)
|
||||
|
||||
if len(cuenta) > 0:
|
||||
title += ' (' + ', '.join(cuenta) + ')'
|
||||
|
||||
url = urlparse.urljoin( item.url , scrapertools.find_single_match(match,'href="([^"]+)"') )
|
||||
thumbnail = thumb_servidor
|
||||
plot = ""
|
||||
|
||||
if sortlinks > 0:
|
||||
if sortlinks == 1:
|
||||
orden = valoracion
|
||||
elif sortlinks == 2:
|
||||
orden = valora_idioma(idioma_0, idioma_1)
|
||||
elif sortlinks == 3:
|
||||
orden = valora_calidad(calidad_video, calidad_audio)
|
||||
elif sortlinks == 4:
|
||||
orden = (valora_idioma(idioma_0, idioma_1) * 100) + valora_calidad(calidad_video, calidad_audio)
|
||||
elif sortlinks == 5:
|
||||
orden = (valora_idioma(idioma_0, idioma_1) * 1000) + valoracion
|
||||
elif sortlinks == 6:
|
||||
orden = (valora_idioma(idioma_0, idioma_1) * 100000) + (valora_calidad(calidad_video, calidad_audio) * 1000) + valoracion
|
||||
|
||||
itemsort.append({'action': "play", 'title': title, 'url':url, 'thumbnail':thumbnail, 'fanart':item.fanart, 'plot':plot, 'extra':sesion+"|"+item.url, 'fulltitle':item.fulltitle, 'orden1': (jdown == ''), 'orden2':orden})
|
||||
else:
|
||||
itemlist.append( Item(channel=item.channel, action="play" , title=title , url=url, thumbnail=thumbnail, fanart= item.fanart, plot=plot, extra=sesion+"|"+item.url, fulltitle=item.fulltitle))
|
||||
|
||||
if sortlinks > 0:
|
||||
numberlinks = config.get_setting("pordedenumberlinks",item.channel)
|
||||
|
||||
if numberlinks != '' and numberlinks !="No":
|
||||
numberlinks = int(numberlinks)
|
||||
else:
|
||||
numberlinks = 0
|
||||
|
||||
if numberlinks == 0:
|
||||
verTodos = True
|
||||
|
||||
itemsort = sorted(itemsort, key=lambda k: (k['orden1'], k['orden2']), reverse=True)
|
||||
for i, subitem in enumerate(itemsort):
|
||||
if verTodos == False and i >= numberlinks:
|
||||
itemlist.append(Item(channel=item.channel, action='findallvideos' , title='Ver todos los enlaces', url=item.url, extra=item.extra ))
|
||||
break
|
||||
|
||||
itemlist.append( Item(channel=item.channel, action=subitem['action'] , title=subitem['title'] , url=subitem['url'] , thumbnail=subitem['thumbnail'] , fanart= subitem['fanart'], plot=subitem['plot'] , extra=subitem['extra'] , fulltitle=subitem['fulltitle'] ))
|
||||
|
||||
if "/what/peli" in item.url or "/what/docu" in item.url:
|
||||
itemlist.append( Item(channel=item.channel, action="pordede_check" , tipo="peli", title="Marcar como Pendiente" , valor="1", idtemp=idpeli))
|
||||
itemlist.append( Item(channel=item.channel, action="pordede_check" , tipo="peli", title="Marcar como Vista" , valor="3", idtemp=idpeli))
|
||||
itemlist.append( Item(channel=item.channel, action="pordede_check" , tipo="peli", title="Marcar como Favorita" , valor="4", idtemp=idpeli))
|
||||
itemlist.append( Item(channel=item.channel, action="pordede_check" , tipo="peli", title="Quitar Marca" , valor="0", idtemp=idpeli))
|
||||
|
||||
return itemlist
|
||||
|
||||
def findallvideos(item):
|
||||
return findvideos(item, True)
|
||||
|
||||
def play(item):
|
||||
# Marcar como visto
|
||||
checkseen(item.extra.split("|")[1])
|
||||
|
||||
headers = {'Referer': item.extra.split("|")[1]}
|
||||
|
||||
data = httptools.downloadpage(item.url, post="_s="+item.extra.split("|")[0], headers=headers).data
|
||||
url = scrapertools.find_single_match(data,'<p class="nicetry links">\s+<a href="([^"]+)" target="_blank"')
|
||||
url = urlparse.urljoin(item.url,url)
|
||||
|
||||
headers = {'Referer': item.url}
|
||||
media_url = httptools.downloadpage(url, headers=headers, follow_redirects=False).headers.get("location")
|
||||
|
||||
itemlist = servertools.find_video_items(data=media_url)
|
||||
|
||||
for videoitem in itemlist:
|
||||
videoitem.title = item.title
|
||||
videoitem.fulltitle = item.fulltitle
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
videoitem.channel = item.channel
|
||||
|
||||
return itemlist
|
||||
|
||||
def checkseen(item):
|
||||
logger.info(item)
|
||||
|
||||
if "/viewepisode/" in item:
|
||||
episode = item.split("/")[-1]
|
||||
httptools.downloadpage("http://www.pordede.com/ajax/action", post="model=episode&id="+episode+"&action=seen&value=1")
|
||||
|
||||
if "/what/peli" in item:
|
||||
data = httptools.downloadpage(item).data
|
||||
|
||||
movieid = scrapertools.find_single_match(data,'href="/links/create/ref_id/([0-9]+)/ref_model/')
|
||||
httptools.downloadpage("http://www.pordede.com/ajax/mediaaction", post="model=peli&id="+movieid+"&action=status&value=3")
|
||||
|
||||
return True
|
||||
|
||||
def infosinopsis(item):
|
||||
logger.info()
|
||||
|
||||
url_aux = item.url.replace("/links/view/slug/", "/peli/").replace("/what/peli", "")
|
||||
# Descarga la pagina
|
||||
|
||||
data = httptools.downloadpage(url_aux).data
|
||||
|
||||
scrapedtitle = scrapertools.find_single_match(data,'<h1>([^<]+)</h1>')
|
||||
scrapedvalue = scrapertools.find_single_match(data,'<span class="puntuationValue" data-value="([^"]+)"')
|
||||
scrapedyear = scrapertools.find_single_match(data,'<h2 class="info">[^<]+</h2>\s*<p class="info">([^<]+)</p>')
|
||||
scrapedduration = scrapertools.find_single_match(data,'<h2 class="info">[^<]+</h2>\s*<p class="info">([^<]+)</p>', 1)
|
||||
scrapedplot = scrapertools.find_single_match(data,'<div class="info text"[^>]+>([^<]+)</div>')
|
||||
scrapedgenres = re.compile('href="/pelis/index/genre/[^"]+">([^<]+)</a>',re.DOTALL).findall(data)
|
||||
scrapedcasting = re.compile('href="/star/[^"]+">([^<]+)</a><br/><span>([^<]+)</span>',re.DOTALL).findall(data)
|
||||
|
||||
title = scrapertools.htmlclean(scrapedtitle)
|
||||
plot = "Año: [B]"+scrapedyear+"[/B]"
|
||||
plot += " , Duración: [B]"+scrapedduration+"[/B]"
|
||||
plot += " , Puntuación usuarios: [B]"+scrapedvalue+"[/B]"
|
||||
plot += "\nGéneros: "+", ".join(scrapedgenres)
|
||||
plot += "\n\nSinopsis:\n"+scrapertools.htmlclean(scrapedplot)
|
||||
plot += "\n\nCasting:\n"
|
||||
for actor,papel in scrapedcasting:
|
||||
plot += actor+" ("+papel+"). "
|
||||
|
||||
tbd = TextBox("DialogTextViewer.xml", os.getcwd(), "Default")
|
||||
tbd.ask(title, plot)
|
||||
|
||||
del tbd
|
||||
return
|
||||
|
||||
try:
|
||||
import xbmcgui
|
||||
|
||||
class TextBox( xbmcgui.WindowXML ):
|
||||
""" Create a skinned textbox window """
|
||||
def __init__( self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
def onInit( self ):
|
||||
try:
|
||||
self.getControl( 5 ).setText( self.text )
|
||||
self.getControl( 1 ).setLabel( self.title )
|
||||
except: pass
|
||||
|
||||
def onClick( self, controlId ):
|
||||
pass
|
||||
|
||||
def onFocus( self, controlId ):
|
||||
pass
|
||||
|
||||
def onAction( self, action ):
|
||||
if action == 7:
|
||||
self.close()
|
||||
|
||||
def ask(self, title, text ):
|
||||
self.title = title
|
||||
self.text = text
|
||||
self.doModal()
|
||||
except:
|
||||
pass
|
||||
|
||||
def valora_calidad(video, audio):
|
||||
prefs_video = [ 'hdmicro', 'hd1080', 'hd720', 'hdrip', 'dvdrip', 'rip', 'tc-screener', 'ts-screener' ]
|
||||
prefs_audio = [ 'dts', '5.1', 'rip', 'line', 'screener' ]
|
||||
|
||||
video = ''.join(video.split()).lower()
|
||||
if video in prefs_video:
|
||||
pts = (9 - prefs_video.index(video)) * 10
|
||||
else:
|
||||
pts = (9 - 1) * 10
|
||||
|
||||
audio = ''.join(audio.split()).lower()
|
||||
if audio in prefs_audio:
|
||||
pts = (9 - prefs_audio.index(audio)) * 10
|
||||
else:
|
||||
pts = (9 - 1) * 10
|
||||
|
||||
return pts
|
||||
|
||||
def valora_idioma(idioma_0, idioma_1):
|
||||
prefs = [ 'spanish', 'spanish LAT', 'catalan', 'english', 'french' ]
|
||||
|
||||
if idioma_0 in prefs:
|
||||
pts = (9 - prefs.index(idioma_0)) * 10
|
||||
else:
|
||||
pts = (9 - 1) * 10
|
||||
|
||||
if idioma_1 != '':
|
||||
idioma_1 = idioma_1.replace(' SUB', '')
|
||||
|
||||
if idioma_1 in prefs:
|
||||
pts += 8 - prefs.index(idioma_1)
|
||||
else:
|
||||
pts += 8 - 1
|
||||
|
||||
else:
|
||||
pts += 9
|
||||
|
||||
return pts
|
||||
|
||||
def pordede_check(item):
|
||||
httptools.downloadpage("http://www.pordede.com/ajax/mediaaction", post="model="+item.tipo+"&id="+item.idtemp+"&action=status&value="+item.valor)
|
||||
|
||||
@@ -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| |<br>", "", data)
|
||||
patron = '<a itemprop="url" href="([^"]+)".*?title="([^"]+)">.*?<img itemprop="image" src=([^"]+) alt=.*?</svg>\s+([^"]+) </li>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail,cantidad in matches:
|
||||
scrapedplot = ""
|
||||
scrapedtitle = scrapedtitle + " (" + cantidad +")"
|
||||
scrapedurl = urlparse.urljoin(item.url,scrapedurl)
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle , url=scrapedurl , thumbnail=scrapedthumbnail , plot=scrapedplot , folder=True) )
|
||||
next_page_url = scrapertools.find_single_match(data,'<a class="btn btn-primary--light btn-pagination" itemprop="name" href="([^"]+)" title="Siguiente">')
|
||||
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| |<br>", "", data)
|
||||
patron = '<a itemprop="url" href="([^"]+)".*?title="([^"]+)">.*?<img itemprop="image" src="([^"]+)".*?</svg>([^"]+) </small>'
|
||||
patron = '<a itemprop="url" href="([^"]+)".*?'
|
||||
patron += 'title="([^"]+)">.*?'
|
||||
if "/pornostars/" in item.url:
|
||||
patron += '<img itemprop="image" src=([^"]+) alt=.*?'
|
||||
patron += '</svg>([^<]+)<'
|
||||
else:
|
||||
patron += '<img itemprop="image" src="([^"]+)" alt=.*?'
|
||||
patron += '</svg>([^<]+)<'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail,cantidad in matches:
|
||||
scrapedplot = ""
|
||||
cantidad = re.compile("\s+", re.DOTALL).sub(" ", cantidad)
|
||||
scrapedtitle = scrapedtitle + " (" + cantidad +")"
|
||||
scrapedurl = urlparse.urljoin(item.url,scrapedurl) + "/?sort=latest"
|
||||
itemlist.append( Item(channel=item.channel, action="peliculas", title=scrapedtitle , url=scrapedurl , thumbnail=scrapedthumbnail , plot=scrapedplot , folder=True) )
|
||||
next_page_url = scrapertools.find_single_match(data,'<a class="btn btn-primary--light btn-pagination" itemprop="name" href="([^"]+)" title="Siguiente">')
|
||||
if next_page_url!="":
|
||||
next_page_url = urlparse.urljoin(item.url,next_page_url)
|
||||
itemlist.append( Item(channel=item.channel , action="categorias" , title="Página Siguiente >>" , text_color="blue", url=next_page_url , folder=True) )
|
||||
itemlist.append( Item(channel=item.channel, action="lista", title=scrapedtitle, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail, plot=scrapedplot) )
|
||||
next_page = scrapertools.find_single_match(data,'<link rel="next" href="([^"]+)" />')
|
||||
if next_page!="":
|
||||
next_page = urlparse.urljoin(item.url,next_page)
|
||||
itemlist.append(item.clone(action="categorias", title="Página Siguiente >>", text_color="blue", url=next_page) )
|
||||
return itemlist
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
def lista(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = scrapertools.cachePage(item.url)
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<a itemprop="url" href="([^"]+)" data-video-id="\d+" title="([^"]+)">.*?<img itemprop="thumbnailUrl" src="([^"]+)".*?</svg>\s+(.*?) </li>'
|
||||
patron = '<a itemprop="url" href="([^"]+)" data-video-id="\d+" title="([^"]+)">.*?'
|
||||
patron += '<img itemprop="thumbnailUrl" src="([^"]+)".*?'
|
||||
patron += '</svg>([^<]+)<'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail,duracion in matches:
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail,cantidad in matches:
|
||||
url = urlparse.urljoin(item.url,scrapedurl)
|
||||
title = "[COLOR yellow]" + duracion + "[/COLOR] " + scrapedtitle
|
||||
cantidad = re.compile("\s+", re.DOTALL).sub(" ", cantidad)
|
||||
title = "[COLOR yellow]" + cantidad + "[/COLOR] " + scrapedtitle
|
||||
contentTitle = title
|
||||
thumbnail = scrapedthumbnail
|
||||
plot = ""
|
||||
year = ""
|
||||
itemlist.append( Item(channel=item.channel, action="play" , title=title , url=url, thumbnail=thumbnail, plot=plot, contentTitle = contentTitle, infoLabels={'year':year} ))
|
||||
next_page_url = scrapertools.find_single_match(data,'<a class="btn btn-primary--light btn-pagination" itemprop="name" href="([^"]+)" title="Siguiente">')
|
||||
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=url, thumbnail=thumbnail,
|
||||
plot=plot, contentTitle = contentTitle) )
|
||||
next_page = scrapertools.find_single_match(data,'<link rel="next" href="([^"]+)" />')
|
||||
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
|
||||
|
||||
def play(item):
|
||||
|
||||
@@ -15,11 +15,11 @@ host = 'http://pornboss.org'
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Peliculas" , action="peliculas", url=host + "/category/movies/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Peliculas" , action="lista", url=host + "/category/movies/"))
|
||||
itemlist.append( Item(channel=item.channel, title=" categorias" , action="categorias", url=host + "/category/movies/"))
|
||||
|
||||
itemlist.append( Item(channel=item.channel, title="Videos" , action="peliculas", url=host + "/category/clips/"))
|
||||
itemlist.append( Item(channel=item.channel, title=" categorias" , action="peliculas", url=host + "/category/clips/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Videos" , action="lista", url=host + "/category/clips/"))
|
||||
itemlist.append( Item(channel=item.channel, title=" categorias" , action="lista", url=host + "/category/clips/"))
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -28,7 +28,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():
|
||||
@@ -51,23 +51,27 @@ def categorias(item):
|
||||
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 = scrapertools.cachePage(item.url)
|
||||
patron = '<article id="post-\d+".*?<img class="center cover" src="([^"]+)" alt="([^"]+)".*?<blockquote>.*?<a href=\'([^\']+)\''
|
||||
patron = '<article id="post-\d+".*?'
|
||||
patron += '<img class="center cover" src="([^"]+)" alt="([^"]+)".*?'
|
||||
patron += '<blockquote>.*?<a href=\'([^\']+)\''
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
scrapertools.printMatches(matches)
|
||||
for scrapedthumbnail,scrapedtitle,scrapedurl in matches:
|
||||
scrapedplot = ""
|
||||
itemlist.append( Item(channel=item.channel, action="play", title=scrapedtitle , url=scrapedurl , thumbnail=scrapedthumbnail , plot=scrapedplot , folder=True) )
|
||||
next_page_url = scrapertools.find_single_match(data,'<a class="nextpostslink" rel="next" href="([^"]+)">')
|
||||
if 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=scrapedtitle, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail, fanart=scrapedthumbnail, plot=scrapedplot) )
|
||||
next_page = scrapertools.find_single_match(data,'<a class="nextpostslink" rel="next" href="([^"]+)">')
|
||||
if next_page!="":
|
||||
itemlist.append( Item(channel=item.channel, action="lista", title="Página Siguiente >>", text_color="blue", url=next_page) )
|
||||
return itemlist
|
||||
|
||||
def play(item):
|
||||
|
||||
@@ -2,25 +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://porneq.com'
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="Ultimos" , action="peliculas", url=host + "/videos/browse/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas Vistos" , action="peliculas", url=host + "/videos/most-viewed/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas Votado" , action="peliculas", url=host + "/videos/most-liked/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Big Tits" , action="peliculas", url=host + "/show/big+tits&sort=w"))
|
||||
itemlist.append( Item(channel=item.channel, title="Ultimos" , action="lista", url=host + "/videos/browse/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas Vistos" , action="lista", url=host + "/videos/most-viewed/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Mas Votado" , action="lista", url=host + "/videos/most-liked/"))
|
||||
itemlist.append( Item(channel=item.channel, title="Big Tits" , action="lista", url=host + "/show/big+tits&sort=w"))
|
||||
itemlist.append( Item(channel=item.channel, title="Buscar", action="search"))
|
||||
return itemlist
|
||||
|
||||
@@ -30,7 +26,7 @@ def search(item, texto):
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = host + "/show/%s" % texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
return lista(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -38,20 +34,23 @@ def search(item, texto):
|
||||
return []
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
def lista(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = scrapertools.cache_page(item.url)
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<a class="clip-link" data-id="\d+" title="([^"]+)" href="([^"]+)">.*?<img src="([^"]+)".*?<span class="timer">(.*?)</span></div>'
|
||||
patron = '<a class="clip-link" data-id="\d+" title="([^"]+)" href="([^"]+)">.*?'
|
||||
patron += '<img src="([^"]+)".*?'
|
||||
patron += '<span class="timer">(.*?)</span></div>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedtitle,scrapedurl,scrapedthumbnail,scrapedtime in matches:
|
||||
scrapedplot = ""
|
||||
scrapedtitle = "[COLOR yellow]" + (scrapedtime) + "[/COLOR] " + scrapedtitle
|
||||
itemlist.append( Item(channel=item.channel, action="play", title=scrapedtitle , url=scrapedurl , thumbnail=scrapedthumbnail , plot=scrapedplot , folder=True) )
|
||||
next_page_url = scrapertools.find_single_match(data,'<nav id="page_nav"><a href="(.*?)"')
|
||||
if 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=scrapedtitle, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail, plot=scrapedplot) )
|
||||
next_page = scrapertools.find_single_match(data,'<nav id="page_nav"><a href="(.*?)"')
|
||||
if next_page !="":
|
||||
itemlist.append(item.clone(action="lista", title="Página Siguiente >>", text_color="blue", url=next_page) )
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -59,10 +58,7 @@ def play(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = '"video-setup".*?file: "(.*?)",'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl in matches:
|
||||
scrapedurl = str(scrapedurl)
|
||||
scrapedurl = scrapertools.find_single_match(data,'<source src="([^"]+)"')
|
||||
itemlist.append(Item(channel=item.channel, action="play", title=item.title, fulltitle=item.fulltitle, url=scrapedurl,
|
||||
thumbnail=item.thumbnail, plot=item.plot, show=item.title, server="directo", folder=False))
|
||||
return itemlist
|
||||
|
||||
@@ -2,23 +2,19 @@
|
||||
#------------------------------------------------------------
|
||||
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://www.pornhive.tv/en'
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append( Item(channel=item.channel, title="MOVIES" , action="peliculas", url=host))
|
||||
# No busca los videos tiene un capchka
|
||||
# itemlist.append( Item(channel=item.channel, title="CHANNELS" , action="catalogo", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Peliculas" , action="lista", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Canal" , action="categorias", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Categorias" , action="categorias", url=host))
|
||||
itemlist.append( Item(channel=item.channel, title="Buscar", action="search"))
|
||||
return itemlist
|
||||
@@ -29,7 +25,7 @@ def search(item, texto):
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = host + "/search?keyword=%s" % texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
return lista(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -41,18 +37,22 @@ def categorias(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = scrapertools.get_match(data,'Categories(.*?)<li class="divider"')
|
||||
if item.title == "Categorias" :
|
||||
data = scrapertools.get_match(data,'Categories(.*?)Channels')
|
||||
else:
|
||||
data = scrapertools.get_match(data,'Channels(.*?)</ul>')
|
||||
patron = '<li><a href="([^"]+)" title="[^"]+">(.*?)</a>'
|
||||
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,'<li><a href="([^"]+)" data-ci-pagination-page="\d+" rel="next">Next ›')
|
||||
if 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=thumbnail,
|
||||
plot=plot, contentTitle=title))
|
||||
next_page = scrapertools.find_single_match(data,'<li><a href="([^"]+)" data-ci-pagination-page="\d+" rel="next">Next ›')
|
||||
if next_page != "" :
|
||||
itemlist.append(item.clone(action="lista", title="Página Siguiente >>", text_color="blue", url=next_page) )
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -79,9 +79,8 @@ def play(item):
|
||||
itemlist = servertools.find_video_items(data=item.url)
|
||||
data = scrapertools.cachePage(item.url)
|
||||
itemlist = servertools.find_video_items(data=data)
|
||||
|
||||
for videoitem in itemlist:
|
||||
videoitem.title = item.fulltitle
|
||||
videoitem.title = item.title
|
||||
videoitem.fulltitle = item.fulltitle
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
videochannel=item.channel
|
||||
|
||||
@@ -14,7 +14,7 @@ def mainlist(item):
|
||||
itemlist.append(Item(channel=item.channel, action="peliculas", title="Novedades", fanart=item.fanart,
|
||||
url="http://es.pornhub.com/video?o=cm"))
|
||||
itemlist.append(Item(channel=item.channel, action="categorias", title="Categorias", fanart=item.fanart,
|
||||
url="http://es.pornhub.com/categories?o=al"))
|
||||
url="http://es.pornhub.com/categories"))
|
||||
itemlist.append(Item(channel=item.channel, action="search", title="Buscar", fanart=item.fanart,
|
||||
url="http://es.pornhub.com/video/search?search=%s&o=mr"))
|
||||
return itemlist
|
||||
@@ -38,19 +38,18 @@ def categorias(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = scrapertools.find_single_match(data, '<div id="categoriesStraightImages">(.*?)</ul>')
|
||||
|
||||
|
||||
patron = '<li class="cat_pic" data-category=".*?'
|
||||
patron += '<a href="([^"]+)".*?'
|
||||
patron += 'src="([^"]+)".*?'
|
||||
patron += 'alt="([^"]+)"'
|
||||
patron += 'data-thumb_url="(.*?)".*?'
|
||||
patron += 'alt="([^"]+)".*?'
|
||||
patron += '<var>(.*?)</var>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle in matches:
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle, cantidad in matches:
|
||||
if "?" in scrapedurl:
|
||||
url = urlparse.urljoin(item.url, scrapedurl + "&o=cm")
|
||||
else:
|
||||
url = urlparse.urljoin(item.url, scrapedurl + "?o=cm")
|
||||
scrapedtitle = scrapedtitle + " (" + cantidad + ")"
|
||||
itemlist.append(Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=url, fanart=item.fanart,
|
||||
thumbnail=scrapedthumbnail))
|
||||
itemlist.sort(key=lambda x: x.title)
|
||||
@@ -64,10 +63,10 @@ def peliculas(item):
|
||||
videodata = scrapertools.find_single_match(data, 'videos search-video-thumbs">(.*?)<div class="reset"></div>')
|
||||
patron = '<div class="phimage">.*?'
|
||||
patron += '<a href="([^"]+)" title="([^"]+).*?'
|
||||
patron += '<var class="duration">([^<]+)</var>(.*?)</div>.*?'
|
||||
patron += 'data-mediumthumb="([^"]+)"'
|
||||
patron += 'data-mediumthumb="([^"]+)".*?'
|
||||
patron += '<var class="duration">([^<]+)</var>(.*?)</div>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(videodata)
|
||||
for url, scrapedtitle, duration, scrapedhd, thumbnail in matches:
|
||||
for url, scrapedtitle, thumbnail, duration, scrapedhd in matches:
|
||||
title = "(" + duration + ") " + scrapedtitle.replace("&amp;", "&")
|
||||
scrapedhd = scrapertools.find_single_match(scrapedhd, '<span class="hd-thumbnail">(.*?)</span>')
|
||||
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("\/", "/")
|
||||
|
||||
@@ -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, '<li class="direction"><a href="([^"]+)" data-ajax="pagination">')
|
||||
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
|
||||
|
||||
|
||||
@@ -64,15 +64,14 @@ def lista(item):
|
||||
action = "play"
|
||||
if config.get_setting("menu_info", "porntrex"):
|
||||
action = "menu_info"
|
||||
|
||||
# Extrae las entradas
|
||||
patron = '<div class="video-item.*?href="([^"]+)" '
|
||||
patron += 'title="([^"]+)".*?'
|
||||
patron += 'data-src="([^"]+)"'
|
||||
patron += '(.*?)<div class="durations">.*?'
|
||||
# Quita las entradas, que no son private
|
||||
patron = '<div class="video-preview-screen video-item thumb-item ".*?<a href="([^"]+)".*?'
|
||||
patron += 'data-src="([^"]+)".*?'
|
||||
patron += 'alt="([^"]+)".*?'
|
||||
patron += '<span class="quality">(.*?)<.*?'
|
||||
patron += '</i>([^<]+)<'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for scrapedurl, scrapedtitle, scrapedthumbnail, quality, duration in matches:
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle, quality, duration in matches:
|
||||
if "go.php?" in scrapedurl:
|
||||
scrapedurl = urllib.unquote(scrapedurl.split("/go.php?u=")[1].split("&")[0])
|
||||
if not scrapedthumbnail.startswith("https"):
|
||||
@@ -81,13 +80,9 @@ def lista(item):
|
||||
scrapedurl = urlparse.urljoin(host, scrapedurl)
|
||||
if not scrapedthumbnail.startswith("https"):
|
||||
scrapedthumbnail = "https:%s" % scrapedthumbnail
|
||||
if duration:
|
||||
scrapedtitle = "%s - %s" % (duration, scrapedtitle)
|
||||
if '>HD<' in quality:
|
||||
scrapedtitle += " [COLOR red][HD][/COLOR]"
|
||||
|
||||
itemlist.append(item.clone(action=action, title=scrapedtitle, url=scrapedurl, thumbnail=scrapedthumbnail, contentThumbnail=scrapedthumbnail,
|
||||
fanart=scrapedthumbnail))
|
||||
scrapedtitle = "%s - [COLOR red]%s[/COLOR] %s" % (duration, quality, scrapedtitle)
|
||||
itemlist.append(item.clone(action=action, title=scrapedtitle, url=scrapedurl, thumbnail=scrapedthumbnail,
|
||||
contentThumbnail=scrapedthumbnail, fanart=scrapedthumbnail))
|
||||
# Extrae la marca de siguiente página
|
||||
if item.extra:
|
||||
next_page = scrapertools.find_single_match(data, '<li class="next">.*?from_videos\+from_albums:(\d+)')
|
||||
@@ -95,7 +90,7 @@ def lista(item):
|
||||
if "from_videos=" in item.url:
|
||||
next_page = re.sub(r'&from_videos=(\d+)', '&from_videos=%s' % next_page, item.url)
|
||||
else:
|
||||
next_page = "%s?mode=async&function=get_block&block_id=list_videos_videos_list_search_result" \
|
||||
next_page = "%s?mode=async&function=get_block&block_id=list_videos_videos" \
|
||||
"&q=%s&category_ids=&sort_by=post_date&from_videos=%s" % (item.url, item.extra, next_page)
|
||||
itemlist.append(item.clone(action="lista", title=">> Página Siguiente", url=next_page))
|
||||
else:
|
||||
@@ -107,12 +102,13 @@ def lista(item):
|
||||
next_page = urlparse.urljoin(host, next_page)
|
||||
itemlist.append(item.clone(action="lista", title=">> Página Siguiente", url=next_page))
|
||||
else:
|
||||
next_page = scrapertools.find_single_match(data, '<li class="next">.*?from:(\d+)')
|
||||
next_page = scrapertools.find_single_match(data, '<li class="next">.*?from4:(\d+)')
|
||||
if next_page:
|
||||
if "from=" in item.url:
|
||||
next_page = re.sub(r'&from=(\d+)', '&from=%s' % next_page, item.url)
|
||||
if "from4" in item.url:
|
||||
next_page = re.sub(r'&from4=(\d+)', '&from4=%s' % next_page, item.url)
|
||||
else:
|
||||
next_page = "%s?mode=async&function=get_block&block_id=list_videos_common_videos_list&sort_by=post_date&from=%s" % (
|
||||
next_page = "%s?mode=async&function=get_block&block_id=list_videos_common_videos_list_norm" \
|
||||
"&sort_by=post_date&from4=%s" % (
|
||||
item.url, next_page)
|
||||
itemlist.append(item.clone(action="lista", title=">> Página Siguiente", url=next_page))
|
||||
return itemlist
|
||||
|
||||
@@ -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,'<div class="videos-list">(.*?)<div class="videos-list">')
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
patron = '<article id="post-\d+".*?<a href="([^"]+)" title="([^"]+)">.*?<img data-src="(.*?)".*?<span class="duration"><i class="fa fa-clock-o"></i>([^<]+)</span>'
|
||||
patron = '<article id="post-\d+".*?'
|
||||
patron += '<a href="([^"]+)" title="([^"]+)">.*?'
|
||||
patron += '<img data-src="(.*?)".*?'
|
||||
patron += '<span class="duration"><i class="fa fa-clock-o"></i>([^<]+)</span>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail,duracion in matches:
|
||||
scrapedplot = ""
|
||||
title = "[COLOR yellow]" + duracion + "[/COLOR] " + scrapedtitle
|
||||
itemlist.append( Item(channel=item.channel, action="play", title=title , url=scrapedurl , thumbnail=scrapedthumbnail , plot=scrapedplot , folder=True) )
|
||||
next_page_url = scrapertools.find_single_match(data,'<li><a href="([^"]+)">Next</a>')
|
||||
if next_page_url=="":
|
||||
next_page_url = scrapertools.find_single_match(data,'<li><a class="current">.*?<li><a href=\'([^\']+)\' class="inactive">')
|
||||
|
||||
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,'<li><a href="([^"]+)">Next</a>')
|
||||
if next_page=="":
|
||||
next_page = scrapertools.find_single_match(data,'<li><a class="current">.*?<li><a href=\'([^\']+)\' class="inactive">')
|
||||
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,'<iframe src="([^"]+)"')
|
||||
data = scrapertools.cachePage(pornhub)
|
||||
patron = '"videoUrl":"(.*?)"'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl in matches:
|
||||
scrapedurl = scrapedurl.replace("\/", "/")
|
||||
itemlist.append(Item(channel=item.channel, action="play", title=item.title, fulltitle=item.fulltitle, url=scrapedurl,
|
||||
thumbnail=item.thumbnail, plot=item.plot, show=item.title, server="directo", folder=False))
|
||||
url = scrapertools.find_single_match(data,'<meta itemprop="embedURL" content="([^"]+)"')
|
||||
url = url.replace("pornhub.com/embed/", "pornhub.com/view_video.php?viewkey=")
|
||||
data = scrapertools.cachePage(url)
|
||||
if "xvideos" in url :
|
||||
scrapedurl = scrapertools.find_single_match(data,'setVideoHLS\(\'([^\']+)\'')
|
||||
if "pornhub" in url :
|
||||
scrapedurl = scrapertools.find_single_match(data,'"defaultQuality":true,"format":"mp4","quality":"\d+","videoUrl":"(.*?)"')
|
||||
if "txx" in url :
|
||||
video_url = scrapertools.find_single_match(data, 'var video_url="([^"]*)"')
|
||||
video_url += scrapertools.find_single_match(data, 'video_url\+="([^"]*)"')
|
||||
partes = video_url.split('||')
|
||||
video_url = decode_url(partes[0])
|
||||
video_url = re.sub('/get_file/\d+/[0-9a-z]{32}/', partes[1], video_url)
|
||||
video_url += '&' if '?' in video_url else '?'
|
||||
video_url += 'lip=' + partes[2] + '<=' + partes[3]
|
||||
scrapedurl = video_url
|
||||
else:
|
||||
scrapedurl = scrapertools.find_single_match(data,'"quality":"\d+","videoUrl":"(.*?)"')
|
||||
scrapedurl = scrapedurl.replace("\/", "/")
|
||||
itemlist.append(Item(channel=item.channel, action="play", title=item.title, fulltitle=item.fulltitle, url=scrapedurl,
|
||||
thumbnail=item.thumbnail, plot=item.plot, show=item.title, server="directo", folder=False))
|
||||
return itemlist
|
||||
|
||||
|
||||
def decode_url(txt):
|
||||
_0x52f6x15 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,~'
|
||||
reto = ''; n = 0
|
||||
# En las dos siguientes líneas, ABCEM ocupan 2 bytes cada letra! El replace lo deja en 1 byte. !!!!: АВСЕМ (10 bytes) ABCEM (5 bytes)
|
||||
txt = re.sub('[^АВСЕМA-Za-z0-9\.\,\~]', '', txt)
|
||||
txt = txt.replace('А', 'A').replace('В', 'B').replace('С', 'C').replace('Е', 'E').replace('М', 'M')
|
||||
|
||||
while n < len(txt):
|
||||
a = _0x52f6x15.index(txt[n])
|
||||
n += 1
|
||||
b = _0x52f6x15.index(txt[n])
|
||||
n += 1
|
||||
c = _0x52f6x15.index(txt[n])
|
||||
n += 1
|
||||
d = _0x52f6x15.index(txt[n])
|
||||
n += 1
|
||||
|
||||
a = a << 2 | b >> 4
|
||||
b = (b & 15) << 4 | c >> 2
|
||||
e = (c & 3) << 6 | d
|
||||
reto += chr(a)
|
||||
if c != 64: reto += chr(b)
|
||||
if d != 64: reto += chr(e)
|
||||
|
||||
return urllib.unquote(reto)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
{
|
||||
"id": "rarbg",
|
||||
"name": "Rarbg",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": [],
|
||||
"thumbnail": "https://dyncdn.me/static/20/img/logo_dark_nodomain2_optimized.png",
|
||||
"categories": [
|
||||
"torrent",
|
||||
"movie",
|
||||
"tvshow",
|
||||
"vos"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "include_in_global_search",
|
||||
"label": "Incluir en busqueda global",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"id": "modo_grafico",
|
||||
"label": "Buscar información extra (TMDB)",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostrar enlaces en idioma...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"No filtrar",
|
||||
"CAST",
|
||||
"LAT",
|
||||
"VO",
|
||||
"VOS",
|
||||
"VOSE"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "timeout_downloadpage",
|
||||
"type": "list",
|
||||
"label": "Timeout (segs.) en descarga de páginas o verificación de servidores",
|
||||
"default": 5,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"None",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"7",
|
||||
"8",
|
||||
"9",
|
||||
"10"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "seleccionar_ult_temporadda_activa",
|
||||
"type": "bool",
|
||||
"label": "Seleccionar para Videoteca si estará activa solo la última Temporada",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,831 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import sys
|
||||
import urllib
|
||||
import urlparse
|
||||
import time
|
||||
|
||||
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 config, logger
|
||||
from core import tmdb
|
||||
from lib import generictools
|
||||
from channels import filtertools
|
||||
from channels import autoplay
|
||||
|
||||
|
||||
#IDIOMAS = {'CAST': 'Castellano', 'LAT': 'Latino', 'VO': 'Version Original'}
|
||||
IDIOMAS = {'Castellano': 'CAST', 'Latino': 'LAT', 'Version Original': 'VO'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_quality = []
|
||||
list_servers = ['torrent']
|
||||
|
||||
host = 'https://rarbgmirror.xyz/'
|
||||
channel = 'rarbg'
|
||||
categoria = channel.capitalize()
|
||||
__modo_grafico__ = config.get_setting('modo_grafico', channel)
|
||||
modo_ultima_temp = config.get_setting('seleccionar_ult_temporadda_activa', channel) #Actualización sólo últ. Temporada?
|
||||
timeout = config.get_setting('timeout_downloadpage', channel)
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
thumb_cartelera = get_thumb("now_playing.png")
|
||||
thumb_pelis = get_thumb("channels_movie.png")
|
||||
thumb_pelis_hd = get_thumb("channels_movie_hd.png")
|
||||
thumb_pelis_VO = get_thumb("channels_vos.png")
|
||||
thumb_series = get_thumb("channels_tvshow.png")
|
||||
thumb_series_hd = get_thumb("channels_tvshow_hd.png")
|
||||
thumb_series_VOD = get_thumb("videolibrary_tvshow.png")
|
||||
thumb_generos = get_thumb("genres.png")
|
||||
thumb_buscar = get_thumb("search.png")
|
||||
thumb_separador = get_thumb("next.png")
|
||||
thumb_settings = get_thumb("setting_0.png")
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist.append(Item(channel=item.channel, url=host, title="[COLOR yellow]NOTA: Esta web puede considerar una intrusión[/COLOR]", folder=False, thumbnail=thumb_separador))
|
||||
itemlist.append(Item(channel=item.channel, url=host, title="[COLOR yellow]más de 1 usuario o 10 accesos por IP/Router.[/COLOR]", folder=False, thumbnail=thumb_separador))
|
||||
itemlist.append(Item(channel=item.channel, url=host, title="[COLOR yellow]Si es bloqueado, renueve la IP en el Router[/COLOR]", folder=False, thumbnail=thumb_separador))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title="Películas", action="listado", url=host + "torrents.php?category=movies&search=&order=data&by=DESC", thumbnail=thumb_pelis_VO, extra="peliculas"))
|
||||
itemlist.append(Item(channel=item.channel, title=" - Calidades", action="calidades", url=host + "torrents.php?category=movies&search=&order=data&by=DESC", thumbnail=thumb_pelis_hd, extra="peliculas"))
|
||||
#itemlist.append(Item(channel=item.channel, title=" - Géneros", action="generos", url=host + "catalog/movies/", thumbnail=thumb_generos, extra="peliculas"))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title="Series", action="listado", url=host + "torrents.php?category=2;18;41;49&search=&order=data&by=DESC", thumbnail=thumb_series_VOD, extra="series"))
|
||||
itemlist.append(Item(channel=item.channel, title=" - Calidades", action="calidades", url=host + "torrents.php?category=2;18;41;49&search=&order=data&by=DESC", thumbnail=thumb_series_hd, extra="series"))
|
||||
#itemlist.append(Item(channel=item.channel, title=" - Géneros", action="generos", url=host + "catalog/tv/", thumbnail=thumb_generos, extra="series"))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title="Buscar...", action="search", url=host + "?s=%s", thumbnail=thumb_buscar, extra="search"))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, url=host, title="[COLOR yellow]Configuración:[/COLOR]", folder=False, thumbnail=thumb_separador))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action="configuracion", title="Configurar canal", thumbnail=thumb_settings))
|
||||
|
||||
autoplay.show_option(item.channel, itemlist) #Activamos Autoplay
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def configuracion(item):
|
||||
from platformcode import platformtools
|
||||
ret = platformtools.show_channel_settings()
|
||||
platformtools.itemlist_refresh()
|
||||
return
|
||||
|
||||
|
||||
def calidades(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
data = ''
|
||||
try:
|
||||
data = re.sub(r"\n|\r|\t|\s{2}|(<!--.*?-->)", "", httptools.downloadpage(item.url, timeout=timeout).data)
|
||||
data = unicode(data, "utf-8", errors="replace").encode("utf-8")
|
||||
except:
|
||||
pass
|
||||
|
||||
patron = '<div align="[^"]+"><div style="[^"]+" id="divadvsearch">(.*?)<\/a><\/div><\/div><\/form><\/div>'
|
||||
#Verificamos si se ha cargado una página, y si además tiene la estructura correcta
|
||||
if not data or not scrapertools.find_single_match(data, patron):
|
||||
status, itemlist = check_blocked_IP(data, itemlist) #Comprobamos si la IP ha sido bloqueada
|
||||
if status:
|
||||
return itemlist #IP bloqueada
|
||||
|
||||
item = generictools.web_intervenida(item, data) #Verificamos que no haya sido clausurada
|
||||
if item.intervencion: #Sí ha sido clausurada judicialmente
|
||||
for clone_inter, autoridad in item.intervencion:
|
||||
thumb_intervenido = get_thumb(autoridad)
|
||||
itemlist.append(item.clone(action='', title="[COLOR yellow]" + clone_inter.capitalize() + ': [/COLOR]' + intervenido_judicial + '. Reportar el problema en el foro', thumbnail=thumb_intervenido))
|
||||
return itemlist #Salimos
|
||||
|
||||
logger.error("ERROR 01: SUBMENU: La Web no responde o ha cambiado de URL: " + item.url + data)
|
||||
|
||||
if not data: #Si no ha logrado encontrar nada, salimos
|
||||
itemlist.append(item.clone(action='', title=item.category + ': ERROR 01: SUBMENU: La Web no responde o ha cambiado de URL. Si la Web está activa, reportar el error con el log'))
|
||||
return itemlist #si no hay más datos, algo no funciona, pintamos lo que tenemos
|
||||
|
||||
data = scrapertools.find_single_match(data, patron) #Seleccionamos el bloque
|
||||
patron = '<div class="divadvscat"><input class="inputadvscat" type="checkbox" name="category\[.*?\]" value="[^"]+"\s*(?:.*?)?\/> <a href="([^"]+)">(.*?)<\/a>\s*<\/div>\s*'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
if not matches:
|
||||
logger.error("ERROR 02: SUBMENU: Ha cambiado la estructura de la Web " + " / PATRON: " + patron + " / DATA: " + data)
|
||||
itemlist.append(item.clone(action='', title=item.category + ': ERROR 02: SUBMENU: Ha cambiado la estructura de la Web. Reportar el error con el log'))
|
||||
return itemlist #si no hay más datos, algo no funciona, pintamos lo que tenemos
|
||||
|
||||
#logger.debug(patron)
|
||||
#logger.debug(matches)
|
||||
#logger.debug(data)
|
||||
|
||||
itemlist.append(item.clone(action="listado", title="ALL", extra2="calidades"))
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
if not "Mov" in scrapedtitle and item.extra == 'peliculas':
|
||||
continue
|
||||
if not "TV" in scrapedtitle and item.extra == 'series':
|
||||
continue
|
||||
|
||||
title = scrapedtitle.strip().replace('Movs/', '').replace('Movies/', '')
|
||||
url = urlparse.urljoin(host, scrapedurl + "&search=&order=data&by=DESC")
|
||||
|
||||
itemlist.append(item.clone(action="listado", title=title, url=url, extra2="calidades"))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def listado(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
item.category = categoria
|
||||
|
||||
#logger.debug(item)
|
||||
|
||||
curr_page = 1 # Página inicial
|
||||
last_page = 99999 # Última página inicial
|
||||
if item.curr_page:
|
||||
curr_page = int(item.curr_page) # Si viene de una pasada anterior, lo usamos
|
||||
del item.curr_page # ... y lo borramos
|
||||
if item.last_page:
|
||||
last_page = int(item.last_page) # Si viene de una pasada anterior, lo usamos
|
||||
del item.last_page # ... y lo borramos
|
||||
|
||||
cnt_tot = 40 # Poner el num. máximo de items por página
|
||||
cnt_title = 0 # Contador de líneas insertadas en Itemlist
|
||||
inicio = time.time() # Controlaremos que el proceso no exceda de un tiempo razonable
|
||||
fin = inicio + 3 # Después de este tiempo pintamos (segundos)
|
||||
timeout_search = timeout # Timeout para descargas
|
||||
if item.extra == 'search':
|
||||
timeout_search = timeout * 2 # Timeout un poco más largo para las búsquedas
|
||||
if timeout_search < 5:
|
||||
timeout_search = 5 # Timeout un poco más largo para las búsquedas
|
||||
|
||||
#Sistema de paginado para evitar páginas vacías o semi-vacías en casos de búsquedas con series con muchos episodios
|
||||
title_lista = [] # Guarda la lista de series que ya están en Itemlist, para no duplicar lineas
|
||||
if item.title_lista: # Si viene de una pasada anterior, la lista ya estará guardada
|
||||
title_lista.extend(item.title_lista) # Se usa la lista de páginas anteriores en Item
|
||||
del item.title_lista # ... limpiamos
|
||||
|
||||
if not item.extra2: # Si viene de Catálogo o de Alfabeto
|
||||
item.extra2 = ''
|
||||
|
||||
next_page_url = item.url
|
||||
#Máximo num. de líneas permitidas por TMDB. Máx de 3 segundos por Itemlist para no degradar el rendimiento
|
||||
while cnt_title <= cnt_tot * 0.50 and curr_page <= last_page and fin > time.time():
|
||||
|
||||
# Descarga la página
|
||||
data = ''
|
||||
try:
|
||||
data = re.sub(r"\n|\r|\t|\s{2}|(<!--.*?-->)| ", "", httptools.downloadpage(next_page_url, timeout=timeout_search).data)
|
||||
data = unicode(data, "utf-8", errors="replace").encode("utf-8")
|
||||
except:
|
||||
pass
|
||||
|
||||
curr_page += 1 #Apunto ya a la página siguiente
|
||||
if not data and not item.extra2: #Si la web está caída salimos sin dar error
|
||||
logger.error("ERROR 01: LISTADO: La Web no responde o ha cambiado de URL: " + item.url + " / DATA: " + data)
|
||||
itemlist.append(item.clone(action='', title=item.channel.capitalize() + ': ERROR 01: LISTADO:. La Web no responde o ha cambiado de URL. Si la Web está activa, reportar el error con el log'))
|
||||
break #si no hay más datos, algo no funciona, pintamos lo que tenemos
|
||||
|
||||
status, itemlist = check_blocked_IP(data, itemlist) #Comprobamos si la IP ha sido bloqueada
|
||||
if status:
|
||||
return itemlist #IP bloqueada
|
||||
|
||||
#Patrón para todo, incluido búsquedas en cualquier caso
|
||||
patron = '<tr class="lista2"><td align="(?:[^"]+)?"\s*class="(?:[^"]+)?"\s*width="(?:[^"]+)?"\s*style="(?:[^"]+)?"><a href="[^"]+"><img src="([^"]+)?"\s*border="(?:[^"]+)?"\s*alt="(?:[^"]+)?"\s*\/><\/a><\/td><td\s*align="(?:[^"]+)?"\s*class="(?:[^"]+)?"><a onmouseover="(?:[^"]+)?"\s*onmouseout="(?:[^"]+)?"\s*href="[^"]+" title="[^"]+">([^<]+)<\/a>\s*<a href="([^"]+)"><img src="[^"]+"\s*border="(?:[^"]+)?"\s*alt="(?:[^"]+)?"\s*><\/a>\s*(?:<a href="([^"]+)"><img src="[^"]+"\s*border="(?:[^"]+)?"\s*alt="(?:[^"]+)?"\s*><\/a>)?\s*<br><span.*?<\/span>\s*<\/td><td align="(?:[^"]+)?"\s*width="(?:[^"]+)?"\s*class="(?:[^"]+)?">.*?<\/td><td align="(?:[^"]+)?"\s*width="(?:[^"]+)?"\s*class="(?:[^"]+)?">([^<]+)?<\/td><td align="(?:[^"]+)?"\s*width="(?:[^"]+)?"\s*class="(?:[^"]+)?">\s*<font color="(?:[^"]+)?">(\d+)?<\/font>'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
if not matches and item.extra != 'search': #error
|
||||
item = generictools.web_intervenida(item, data) #Verificamos que no haya sido clausurada
|
||||
if item.intervencion: #Sí ha sido clausurada judicialmente
|
||||
item, itemlist = generictools.post_tmdb_episodios(item, itemlist) #Llamamos al método para el pintado del error
|
||||
return itemlist #Salimos
|
||||
|
||||
logger.error("ERROR 02: LISTADO: Ha cambiado la estructura de la Web " + " / PATRON: " + patron + " / DATA: " + data)
|
||||
itemlist.append(item.clone(action='', title=item.channel.capitalize() + ': ERROR 02: LISTADO: Ha cambiado la estructura de la Web. Reportar el error con el log'))
|
||||
break #si no hay más datos, algo no funciona, pintamos lo que tenemos
|
||||
if not matches and item.extra == 'search': #búsqueda vacía
|
||||
return itemlist #Salimos
|
||||
|
||||
#logger.debug("PATRON: " + patron)
|
||||
#logger.debug(matches)
|
||||
#logger.debug(data)
|
||||
|
||||
#Buscamos la próxima y la última página
|
||||
patron_next = '<a href="([^"]+page=(\d+))" title="next page">'
|
||||
if item.extra == 'search':
|
||||
patron_last = '<a href="[^"]+"\s*title="page\s*\d+">\d+<\/a>\s*<b>(\d+)<\/b><\/div><\/div><\/td>'
|
||||
else:
|
||||
patron_last = 'title="previous page"[^<]+<\/a>\s*<a href="[^>]+>(\d+)<\/a>'
|
||||
|
||||
try:
|
||||
next_page_url, next_page = scrapertools.find_single_match(data, patron_next)
|
||||
next_page = int(next_page)
|
||||
next_page_url = item.url + '&page=' + str(next_page)
|
||||
except: #Si no lo encuentra, lo ponemos a 1
|
||||
#logger.error('ERROR 03: LISTADO: Al obtener la paginación: ' + patron_next + ' / ' + patron_last + ' / ' + scrapertools.find_single_match(data, "<ul class=\"pagination\">.*?<\/span><\/a><\/li><\/ul><\/nav><\/div><\/div><\/div>"))
|
||||
next_page = 1
|
||||
#logger.debug('curr_page: ' + str(curr_page) + ' / next_page: ' + str(next_page) + ' / last_page: ' + str(last_page))
|
||||
|
||||
if last_page == 99999: #Si es el valor inicial, buscamos
|
||||
if item.extra == 'search':
|
||||
last_page = 99
|
||||
try:
|
||||
data_last = ''
|
||||
data_last = re.sub(r"\n|\r|\t|\s{2}|(<!--.*?-->)| ", "", httptools.downloadpage(item.url + '&page=%s' % last_page, timeout=timeout_search).data)
|
||||
data_last = unicode(data_last, "utf-8", errors="replace").encode("utf-8")
|
||||
last_page = int(scrapertools.find_single_match(data_last, patron_last)) #lo cargamos como entero
|
||||
except: #Si no lo encuentra, lo ponemos a 1
|
||||
#logger.error('ERROR 03: LISTADO: Al obtener la paginación: ' + patron_next + ' / ' + patron_last + ' / ' + scrapertools.find_single_match(data, "<ul class=\"pagination\">.*?<\/span><\/a><\/li><\/ul><\/nav><\/div><\/div><\/div>"))
|
||||
last_page = next_page
|
||||
#logger.debug('curr_page: ' + str(curr_page) + ' / next_page: ' + str(next_page) + ' / last_page: ' + str(last_page))
|
||||
|
||||
#Empezamos el procesado de matches
|
||||
for scrapedthumbnail, scrapedtitle, scrapedurl, scrapedepisodes, scrapedsize, scrapedseeds in matches:
|
||||
|
||||
title = scrapedtitle
|
||||
if scrapedepisodes:
|
||||
url = scrapedepisodes
|
||||
else:
|
||||
url = scrapedurl
|
||||
size = scrapedsize
|
||||
title = title.replace("á", "a").replace("é", "e").replace("í", "i").replace("ó", "o").replace("ú", "u").replace("ü", "u").replace("�", "ñ").replace("ñ", "ñ").replace("ã", "a").replace("&etilde;", "e").replace("ĩ", "i").replace("õ", "o").replace("ũ", "u").replace("ñ", "ñ").replace("’", "'")
|
||||
|
||||
if scrapedurl in title_lista: #Si ya hemos procesado el título, lo ignoramos
|
||||
continue
|
||||
else:
|
||||
title_lista += [scrapedurl] #la añadimos a la lista de títulos
|
||||
|
||||
#cnt_title += 1
|
||||
item_local = item.clone() #Creamos copia de Item para trabajar
|
||||
if item_local.tipo: #... y limpiamos
|
||||
del item_local.tipo
|
||||
if item_local.totalItems:
|
||||
del item_local.totalItems
|
||||
if item_local.intervencion:
|
||||
del item_local.intervencion
|
||||
if item_local.viewmode:
|
||||
del item_local.viewmode
|
||||
item_local.extra2 = True
|
||||
del item_local.extra2
|
||||
item_local.text_bold = True
|
||||
del item_local.text_bold
|
||||
item_local.text_color = True
|
||||
del item_local.text_color
|
||||
|
||||
title_subs = [] #creamos una lista para guardar info importante
|
||||
item_local.language = ['VO'] #creamos lista para los idiomas
|
||||
item_local.quality = '' #iniciamos calidad
|
||||
item_local.thumbnail = scrapedthumbnail #iniciamos thumbnail
|
||||
|
||||
if item.extra == 'search':
|
||||
if scrapedepisodes:
|
||||
item_local.extra = 'series'
|
||||
else:
|
||||
item_local.extra = 'peliculas'
|
||||
|
||||
item_local.url = urlparse.urljoin(host, url) #guardamos la url final
|
||||
if item_local.extra != 'series':
|
||||
item_local.url += '&order=size&by=ASC' #guardamos la url final
|
||||
item_local.context = "['buscar_trailer']"
|
||||
|
||||
item_local.contentType = "movie" #por defecto, son películas
|
||||
item_local.action = "findvideos"
|
||||
|
||||
#Analizamos los formatos de la películas
|
||||
if item_local.extra == 'peliculas':
|
||||
patron_title = '(.*?)\.([1|2][9|0]\d{2})?\.(.*?)(?:-.*?)?$'
|
||||
if not scrapertools.find_single_match(title, patron_title):
|
||||
logger.error('ERROR tratando título PELI: ' + title)
|
||||
continue
|
||||
try:
|
||||
title, year, item_local.quality = scrapertools.find_single_match(title, patron_title)
|
||||
except:
|
||||
title = scrapedtitle
|
||||
year = ''
|
||||
item_local.quality = ''
|
||||
title = title.replace('.', ' ')
|
||||
item_local.quality = item_local.quality.replace('.', ' ')
|
||||
|
||||
#Analizamos los formatos de series, temporadas y episodios
|
||||
elif item_local.extra == 'series':
|
||||
patron_title = '(.*?)(\.[1|2][9|0]\d{2})?\.S\d{2}.*?\.([\d|A-Z]{2}.*?)(?:-.*?)?$'
|
||||
if not scrapertools.find_single_match(title, patron_title):
|
||||
patron_title = '(.*?)\.*([1|2][9|0]\d{2})?(?:\.\d{2}\.\d{2}).*?\.([\d|A-Z]{2}.*?)(?:-.*?)?$'
|
||||
if not scrapertools.find_single_match(title, patron_title):
|
||||
logger.error('ERROR tratando título SERIE: ' + title)
|
||||
continue
|
||||
try:
|
||||
title, year, item_local.quality = scrapertools.find_single_match(title, patron_title)
|
||||
except:
|
||||
title = scrapedtitle
|
||||
year = ''
|
||||
item_local.quality = ''
|
||||
title = title.replace('.', ' ')
|
||||
item_local.quality = item_local.quality.replace('.', ' ')
|
||||
year = '-'
|
||||
|
||||
item_local.contentType = "tvshow"
|
||||
item_local.action = "episodios"
|
||||
item_local.season_colapse = True #Muestra las series agrupadas por temporadas
|
||||
|
||||
#Limpiamos el título de la basura innecesaria
|
||||
title = re.sub(r'TV|Online', '', title, flags=re.IGNORECASE).strip()
|
||||
item_local.quality = re.sub(r'proper|unrated|directors|cut|german|repack|internal|real|korean|extended|masted|docu|oar|super|duper|amzn|uncensored|hulu', '', item_local.quality, flags=re.IGNORECASE).strip()
|
||||
|
||||
#Analizamos el año. Si no está claro ponemos '-'
|
||||
try:
|
||||
year_int = int(year)
|
||||
if year_int >= 1940 and year_int <= 2050:
|
||||
item_local.infoLabels["year"] = year_int
|
||||
else:
|
||||
item_local.infoLabels["year"] = '-'
|
||||
except:
|
||||
item_local.infoLabels["year"] = '-'
|
||||
|
||||
#Terminamos de limpiar el título
|
||||
title = re.sub(r'[\(|\[]\s+[\)|\]]', '', title)
|
||||
title = title.replace('()', '').replace('[]', '').strip().lower().title()
|
||||
item_local.from_title = title.strip().lower().title() #Guardamos esta etiqueta para posible desambiguación de título
|
||||
|
||||
#Salvamos el título según el tipo de contenido
|
||||
if item_local.contentType == "movie":
|
||||
item_local.contentTitle = title
|
||||
else:
|
||||
item_local.contentSerieName = title.strip().lower().title()
|
||||
|
||||
item_local.title = title.strip().lower().title()
|
||||
|
||||
#Guarda la variable temporal que almacena la info adicional del título a ser restaurada después de TMDB
|
||||
item_local.title_subs = title_subs
|
||||
|
||||
#Salvamos y borramos el número de temporadas porque TMDB a veces hace tonterias. Lo pasamos como serie completa
|
||||
if item_local.contentSeason and (item_local.contentType == "season" or item_local.contentType == "tvshow"):
|
||||
item_local.contentSeason_save = item_local.contentSeason
|
||||
del item_local.infoLabels['season']
|
||||
|
||||
#Ahora se filtra por idioma, si procede, y se pinta lo que vale
|
||||
if config.get_setting('filter_languages', channel) > 0: #Si hay idioma seleccionado, se filtra
|
||||
itemlist = filtertools.get_link(itemlist, item_local, list_language)
|
||||
else:
|
||||
itemlist.append(item_local.clone()) #Si no, pintar pantalla
|
||||
|
||||
cnt_title = len(itemlist) #Contador de líneas añadidas
|
||||
|
||||
#logger.debug(item_local)
|
||||
|
||||
#Pasamos a TMDB la lista completa Itemlist
|
||||
tmdb.set_infoLabels(itemlist, __modo_grafico__)
|
||||
|
||||
#Llamamos al método para el maquillaje de los títulos obtenidos desde TMDB
|
||||
item, itemlist = generictools.post_tmdb_listado(item, itemlist)
|
||||
|
||||
# Si es necesario añadir paginacion
|
||||
if curr_page <= last_page:
|
||||
if last_page:
|
||||
title = '%s de %s' % (curr_page-1, last_page)
|
||||
else:
|
||||
title = '%s' % curr_page-1
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action="listado", title=">> Página siguiente " + title, title_lista=title_lista, url=next_page_url, extra=item.extra, extra2=item.extra2, last_page=str(last_page), curr_page=str(curr_page)))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist_t = [] #Itemlist total de enlaces
|
||||
itemlist_f = [] #Itemlist de enlaces filtrados
|
||||
if not item.language:
|
||||
item.language = ['VO'] #VO por defecto
|
||||
matches = []
|
||||
item.category = categoria
|
||||
|
||||
#logger.debug(item)
|
||||
|
||||
#Bajamos los datos de la página
|
||||
data = ''
|
||||
patron = '<tr class="lista2">\s*<td align="(?:[^"]+)?"\s*class="(?:[^"]+)?"\s*width="(?:[^"]+)?"\s*style="(?:[^"]+)?">\s*<a href="[^"]+">\s*<img src="([^"]+)?"\s*border="(?:[^"]+)?"\s*alt="(?:[^"]+)?"\s*\/><\/a><\/td>\s*<td\s*align="(?:[^"]+)?"(?:\s*width="[^"]+")?\s*class="(?:[^"]+)?">\s*<a onmouseover="(?:[^"]+)?"\s*onmouseout="(?:[^"]+)?"\s*href="([^"]+)" title="[^"]+">(.*?)<\/a>\s*<a href="[^"]+">\s*<img src="[^"]+"\s*border="(?:[^"]+)?"\s*alt="(?:[^"]+)?"\s*><\/a>(?:\s*<a.*?<\/a>)?\s*<br><span.*?<\/span>\s*<\/td>\s*<td align="(?:[^"]+)?"\s*width="(?:[^"]+)?"\s*class="(?:[^"]+)?">.*?<\/td>\s*<td align="(?:[^"]+)?"\s*width="(?:[^"]+)?"\s*class="(?:[^"]+)?">(.*?)?<\/td>\s*<td align="(?:[^"]+)?"\s*width="(?:[^"]+)?"\s*class="(?:[^"]+)?">\s*<font color="(?:[^"]+)?">(\d+)?<\/font>'
|
||||
|
||||
try:
|
||||
data = re.sub(r"\n|\r|\t|\s{2}|(<!--.*?-->)", "", httptools.downloadpage(item.url, timeout=timeout).data)
|
||||
data = unicode(data, "utf-8", errors="replace").encode("utf-8")
|
||||
except:
|
||||
pass
|
||||
|
||||
if not data:
|
||||
logger.error("ERROR 01: FINDVIDEOS: La Web no responde o la URL es erronea: " + item.url)
|
||||
itemlist.append(item.clone(action='', title=item.channel.capitalize() + ': ERROR 01: FINDVIDEOS:. La Web no responde o la URL es erronea. Si la Web está activa, reportar el error con el log'))
|
||||
return itemlist #si no hay más datos, algo no funciona, pintamos lo que tenemos
|
||||
|
||||
status, itemlist = check_blocked_IP(data, itemlist) #Comprobamos si la IP ha sido bloqueada
|
||||
if status:
|
||||
return itemlist #IP bloqueada
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
if not matches: #error
|
||||
item = generictools.web_intervenida(item, data) #Verificamos que no haya sido clausurada
|
||||
if item.intervencion: #Sí ha sido clausurada judicialmente
|
||||
item, itemlist = generictools.post_tmdb_findvideos(item, itemlist) #Llamamos al método para el pintado del error
|
||||
else:
|
||||
logger.error("ERROR 02: FINDVIDEOS: No hay enlaces o ha cambiado la estructura de la Web " + " / PATRON: " + patron + data)
|
||||
itemlist.append(item.clone(action='', title=item.channel.capitalize() + ': ERROR 02: FINDVIDEOS: No hay enlaces o ha cambiado la estructura de la Web. Verificar en la Web esto último y reportar el error con el log'))
|
||||
return itemlist #si no hay más datos, algo no funciona, pintamos lo que tenemos
|
||||
|
||||
#logger.debug("PATRON: " + patron)
|
||||
#logger.debug(matches)
|
||||
#logger.debug(data)
|
||||
|
||||
#Llamamos al método para crear el título general del vídeo, con toda la información obtenida de TMDB
|
||||
item, itemlist = generictools.post_tmdb_findvideos(item, itemlist)
|
||||
|
||||
#Ahora tratamos los enlaces .torrent con las diferentes calidades
|
||||
for scrapedthumbnail, scrapedurl, scrapedtitle, scrapedsize, scrapedseeds in matches:
|
||||
#Generamos una copia de Item para trabajar sobre ella
|
||||
item_local = item.clone()
|
||||
title = scrapedtitle
|
||||
|
||||
#Analizamos los formatos de la películas y series
|
||||
if item_local.contentType == 'movie':
|
||||
patron_title = '(.*?)\.([1|2][9|0]\d{2})?\.(.*?)(?:-.*?)?$'
|
||||
if not scrapertools.find_single_match(title, patron_title):
|
||||
continue
|
||||
else:
|
||||
patron_title = '(.*?)(\.[1|2][9|0]\d{2})?\.S\d{2}.*?\.([\d|A-Z]{2}.*?)(?:-.*?)?$'
|
||||
if not scrapertools.find_single_match(title, patron_title):
|
||||
patron_title = '(.*?)\.*([1|2][9|0]\d{2})?(?:\.\d{2}\.\d{2}).*?\.([\d|A-Z]{2}.*?)(?:-.*?)?$'
|
||||
if not scrapertools.find_single_match(title, patron_title):
|
||||
continue
|
||||
|
||||
try:
|
||||
title, year, item_local.quality = scrapertools.find_single_match(title, patron_title)
|
||||
except:
|
||||
title = scrapedtitle
|
||||
year = ''
|
||||
item_local.quality = ''
|
||||
title = title.replace('.', ' ')
|
||||
item_local.quality = item_local.quality.replace('.', ' ')
|
||||
item_local.quality = re.sub(r'proper|unrated|directors|cut|german|repack|internal|real|korean|extended|masted|docu|oar|super|duper|amzn|uncensored|hulu', '', item_local.quality, flags=re.IGNORECASE).strip()
|
||||
|
||||
#Buscamos si ya tiene tamaño, si no, los buscamos en el archivo .torrent
|
||||
size = scrapedsize
|
||||
if size:
|
||||
item_local.title = '%s [%s]' % (item_local.title, size) #Agregamos size al final del título
|
||||
size = size.replace('GB', 'G B').replace('Gb', 'G b').replace('MB', 'M B').replace('Mb', 'M b')
|
||||
item_local.quality = '%s [%s]' % (item_local.quality, size) #Agregamos size al final de la calidad
|
||||
|
||||
#Añadimos los seeds en calidad, como información adicional
|
||||
if scrapedseeds:
|
||||
item_local.quality = '%s [Seeds: %s]' % (item_local.quality, scrapedseeds) #Agregamos seeds a la calidad
|
||||
|
||||
#Ahora pintamos el link del Torrent
|
||||
item_local.url = urlparse.urljoin(host, scrapedurl)
|
||||
item_local.title = '[COLOR yellow][?][/COLOR] [COLOR yellow][Torrent][/COLOR] [COLOR limegreen][%s][/COLOR] [COLOR red]%s[/COLOR]' % (item_local.quality, str(item_local.language))
|
||||
|
||||
#Preparamos título y calidad, quitamos etiquetas vacías
|
||||
item_local.title = re.sub(r'\s?\[COLOR \w+\]\[\[?\s?\]?\]\[\/COLOR\]', '', item_local.title)
|
||||
item_local.title = re.sub(r'\s?\[COLOR \w+\]\s?\[\/COLOR\]', '', item_local.title)
|
||||
item_local.title = item_local.title.replace("--", "").replace("[]", "").replace("()", "").replace("(/)", "").replace("[/]", "").strip()
|
||||
item_local.quality = re.sub(r'\s?\[COLOR \w+\]\[\[?\s?\]?\]\[\/COLOR\]', '', item_local.quality)
|
||||
item_local.quality = re.sub(r'\s?\[COLOR \w+\]\s?\[\/COLOR\]', '', item_local.quality)
|
||||
item_local.quality = item_local.quality.replace("--", "").replace("[]", "").replace("()", "").replace("(/)", "").replace("[/]", "").strip()
|
||||
|
||||
item_local.alive = "??" #Calidad del link sin verificar
|
||||
item_local.action = "play" #Visualizar vídeo
|
||||
item_local.server = "torrent" #Seridor Torrent
|
||||
|
||||
itemlist_t.append(item_local.clone()) #Pintar pantalla, si no se filtran idiomas
|
||||
|
||||
# Requerido para FilterTools
|
||||
if config.get_setting('filter_languages', channel) > 0: #Si hay idioma seleccionado, se filtra
|
||||
itemlist_f = filtertools.get_link(itemlist_f, item_local, list_language) #Pintar pantalla, si no está vacío
|
||||
|
||||
#logger.debug("TORRENT: " + scrapedurl + " / title gen/torr: " + item.title + " / " + item_local.title + " / calidad: " + item_local.quality + " / content: " + item_local.contentTitle + " / " + item_local.contentSerieName)
|
||||
#logger.debug(item_local)
|
||||
|
||||
if len(itemlist_f) > 0: #Si hay entradas filtradas...
|
||||
itemlist.extend(itemlist_f) #Pintamos pantalla filtrada
|
||||
else:
|
||||
if config.get_setting('filter_languages', channel) > 0 and len(itemlist_t) > 0: #Si no hay entradas filtradas ...
|
||||
thumb_separador = get_thumb("next.png") #... pintamos todo con aviso
|
||||
itemlist.append(Item(channel=item.channel, url=host, title="[COLOR red][B]NO hay elementos con el idioma seleccionado[/B][/COLOR]", thumbnail=thumb_separador))
|
||||
itemlist.extend(itemlist_t) #Pintar pantalla con todo si no hay filtrado
|
||||
|
||||
# Requerido para AutoPlay
|
||||
autoplay.start(itemlist, item) #Lanzamos Autoplay
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def play(item): #Permite preparar la descarga de los .torrents y subtítulos externos
|
||||
logger.info()
|
||||
itemlist = []
|
||||
headers = []
|
||||
import os
|
||||
from core import downloadtools
|
||||
from core import ziptools
|
||||
|
||||
#buscamos la url del .torrent
|
||||
patron = '<tr><td align="(?:[^"]+)?"\s*class="(?:[^"]+)?"\s*width="(?:[^"]+)?">\s*Torrent:<\/td><td class="(?:[^"]+)?">\s*<img src="(?:[^"]+)?"\s*alt="(?:[^"]+)?"\s*border="(?:[^"]+)?"\s*\/>\s*<a onmouseover="(?:[^"]+)?"\s*onmouseout="(?:[^"]+)?" href="([^"]+)">.*?<\/a>'
|
||||
try:
|
||||
data = re.sub(r"\n|\r|\t|\s{2}|(<!--.*?-->)", "", httptools.downloadpage(item.url, timeout=timeout).data)
|
||||
data = unicode(data, "utf-8", errors="replace").encode("utf-8")
|
||||
except:
|
||||
pass
|
||||
status, itemlist = check_blocked_IP(data, itemlist) #Comprobamos si la IP ha sido bloqueada
|
||||
if status:
|
||||
return itemlist #IP bloqueada
|
||||
if not scrapertools.find_single_match(data, patron):
|
||||
itemlist.append(item.clone(action='', title=item.channel.capitalize() + ': ERROR 02: PLAY: No hay enlaces o ha cambiado la estructura de la Web. Verificar en la Web esto último y reportar el error con el log'))
|
||||
return itemlist
|
||||
item.url = urlparse.urljoin(host, scrapertools.find_single_match(data, patron))
|
||||
|
||||
#buscamos subtítulos en español
|
||||
patron = '<tr><td align="(?:[^"]+)?"\s*class="(?:[^"]+)?"\s*>\s*Subs.*?<\/td><td class="(?:[^"]+)?"\s*>(.*?)(?:<br\/>)?<\/td><\/tr>'
|
||||
data_subt = scrapertools.find_single_match(data, patron)
|
||||
if data_subt:
|
||||
patron = '<a href="([^"]+)"\s*onmouseover="return overlib\('
|
||||
patron += "'Download Spanish subtitles'"
|
||||
patron += '\)"\s*onmouseout="(?:[^"]+)?"\s*><img src="(?:[^"]+)?"\s*><\/a>'
|
||||
subt = scrapertools.find_single_match(data_subt, patron)
|
||||
if subt:
|
||||
item.subtitle = urlparse.urljoin(host, subt)
|
||||
|
||||
if item.subtitle: #Si hay urls de sub-títulos, se descargan
|
||||
headers.append(["User-Agent", httptools.get_user_agent()]) #Se busca el User-Agent por defecto
|
||||
videolibrary_path = config.get_videolibrary_path() #Calculamos el path absoluto a partir de la Videoteca
|
||||
if videolibrary_path.lower().startswith("smb://"): #Si es una conexión SMB, usamos userdata local
|
||||
videolibrary_path = config.get_data_path() #Calculamos el path absoluto a partir de Userdata
|
||||
videolibrary_path = os.path.join(videolibrary_path, "subtitles")
|
||||
#Primero se borra la carpeta de subtitulos para limpiar y luego se crea
|
||||
if os.path.exists(videolibrary_path):
|
||||
import shutil
|
||||
shutil.rmtree(videolibrary_path, ignore_errors=True)
|
||||
time.sleep(1)
|
||||
if not os.path.exists(videolibrary_path):
|
||||
os.mkdir(videolibrary_path)
|
||||
subtitle_name = 'Rarbg-ES_SUBT.zip' #Nombre del archivo de sub-títulos
|
||||
subtitle_folder_path = os.path.join(videolibrary_path, subtitle_name) #Path de descarga
|
||||
ret = downloadtools.downloadfile(item.subtitle, subtitle_folder_path, headers=headers, continuar=True, silent=True)
|
||||
|
||||
if os.path.exists(subtitle_folder_path):
|
||||
# Descomprimir zip dentro del addon
|
||||
# ---------------------------------
|
||||
try:
|
||||
unzipper = ziptools.ziptools()
|
||||
unzipper.extract(subtitle_folder_path, videolibrary_path)
|
||||
except:
|
||||
import xbmc
|
||||
xbmc.executebuiltin('XBMC.Extract("%s", "%s")' % (subtitle_folder_path, videolibrary_path))
|
||||
time.sleep(1)
|
||||
|
||||
# Borrar el zip descargado
|
||||
# ------------------------
|
||||
os.remove(subtitle_folder_path)
|
||||
|
||||
#Tomo el primer archivo de subtítulos como valor por defecto
|
||||
for raiz, subcarpetas, ficheros in os.walk(videolibrary_path):
|
||||
for f in ficheros:
|
||||
if f.endswith(".srt"):
|
||||
#f_es = 'rarbg_subtitle.spa.srt'
|
||||
f_es = scrapertools.find_single_match(item.url, '&f=(.*?).torrent$').replace('.', ' ').replace('-', ' ').lower() + '.spa.srt'
|
||||
if not f_es:
|
||||
f_es = item.infoLabels['originaltitle'] + '.spa.srt'
|
||||
f_es = f_es.replace(':', '').lower()
|
||||
os.rename(os.path.join(videolibrary_path, f), os.path.join(videolibrary_path, f_es))
|
||||
item.subtitle = os.path.join(videolibrary_path, f_es) #Archivo de subtitulos
|
||||
break
|
||||
break
|
||||
|
||||
itemlist.append(item.clone()) #Reproducción normal
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodios(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
item.category = categoria
|
||||
|
||||
#logger.debug(item)
|
||||
|
||||
if item.from_title:
|
||||
item.title = item.from_title
|
||||
|
||||
#Limpiamos num. Temporada y Episodio que ha podido quedar por Novedades
|
||||
season_display = 0
|
||||
if item.contentSeason:
|
||||
if item.season_colapse: #Si viene del menú de Temporadas...
|
||||
season_display = item.contentSeason #... salvamos el num de sesión a pintar
|
||||
item.from_num_season_colapse = season_display
|
||||
del item.season_colapse
|
||||
item.contentType = "tvshow"
|
||||
if item.from_title_season_colapse:
|
||||
item.title = item.from_title_season_colapse
|
||||
del item.from_title_season_colapse
|
||||
if item.infoLabels['title']:
|
||||
del item.infoLabels['title']
|
||||
del item.infoLabels['season']
|
||||
if item.contentEpisodeNumber:
|
||||
del item.infoLabels['episode']
|
||||
if season_display == 0 and item.from_num_season_colapse:
|
||||
season_display = item.from_num_season_colapse
|
||||
|
||||
# Obtener la información actualizada de la Serie. TMDB es imprescindible para Videoteca
|
||||
if not item.infoLabels['tmdb_id']:
|
||||
tmdb.set_infoLabels(item, True)
|
||||
|
||||
modo_ultima_temp_alt = modo_ultima_temp
|
||||
if item.ow_force == "1": #Si hay un traspaso de canal o url, se actualiza todo
|
||||
modo_ultima_temp_alt = False
|
||||
|
||||
max_temp = 1
|
||||
if item.infoLabels['number_of_seasons']:
|
||||
max_temp = item.infoLabels['number_of_seasons']
|
||||
y = []
|
||||
if modo_ultima_temp_alt and item.library_playcounts: #Averiguar cuantas temporadas hay en Videoteca
|
||||
patron = 'season (\d+)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(str(item.library_playcounts))
|
||||
for x in matches:
|
||||
y += [int(x)]
|
||||
max_temp = max(y)
|
||||
|
||||
# Descarga la página
|
||||
data = '' #Inserto en num de página en la url
|
||||
try:
|
||||
data = re.sub(r"\n|\r|\t|\s{2}|(<!--.*?-->)| ", "", httptools.downloadpage(item.url, timeout=timeout).data)
|
||||
data = unicode(data, "utf-8", errors="replace").encode("utf-8")
|
||||
except: #Algún error de proceso, salimos
|
||||
pass
|
||||
|
||||
if not data:
|
||||
logger.error("ERROR 01: EPISODIOS: La Web no responde o la URL es erronea" + item.url)
|
||||
itemlist.append(item.clone(action='', title=item.channel.capitalize() + ': ERROR 01: EPISODIOS:. La Web no responde o la URL es erronea. Si la Web está activa, reportar el error con el log'))
|
||||
return itemlist
|
||||
|
||||
status, itemlist = check_blocked_IP(data, itemlist) #Comprobamos si la IP ha sido bloqueada
|
||||
if status:
|
||||
return itemlist #IP bloqueada
|
||||
|
||||
#Capturamos las temporadas de episodios dentro de la serie
|
||||
patron_temp = '<h1\s*class="[^"]+">Season\s*(\d+)<\/h1><div class="tvcontent"><div id="[^"]+"><\/div>(.*?<\/div><\/div>)(?:<script>.*?<\/script>)?<\/div>'
|
||||
temp_serie = re.compile(patron_temp, re.DOTALL).findall(data)
|
||||
|
||||
for season_num, temporada in temp_serie:
|
||||
patron = '<div id="episode_(\d+)"><div class="[^"]+">\s*<a onclick="[^"]+"\s*class="[^"]+"><div class="[^"]+">.*?\s*(\d+)<\/div>\s*(.*?)\s*<'
|
||||
matches = re.compile(patron, re.DOTALL).findall(temporada)
|
||||
if not matches: #error
|
||||
item = generictools.web_intervenida(item, data) #Verificamos que no haya sido clausurada
|
||||
if item.intervencion: #Sí ha sido clausurada judicialmente
|
||||
item, itemlist = generictools.post_tmdb_episodios(item, itemlist) #Llamamos al método para el pintado del error
|
||||
return itemlist #Salimos
|
||||
|
||||
logger.error("ERROR 02: EPISODIOS: Ha cambiado la estructura de la Web " + " / PATRON: " + patron + " / DATA: " + data)
|
||||
itemlist.append(item.clone(action='', title=item.channel.capitalize() + ': ERROR 02: EPISODIOS: Ha cambiado la estructura de la Web. Reportar el error con el log'))
|
||||
return itemlist #si no hay más datos, algo no funciona, pintamos lo que tenemos
|
||||
|
||||
#logger.debug("PATRON: " + patron)
|
||||
#logger.debug(matches)
|
||||
#logger.debug(data)
|
||||
|
||||
season = max_temp
|
||||
#Comprobamos si realmente sabemos el num. máximo de temporadas
|
||||
if item.library_playcounts or (item.infoLabels['number_of_seasons'] and item.tmdb_stat):
|
||||
num_temporadas_flag = True
|
||||
else:
|
||||
num_temporadas_flag = False
|
||||
|
||||
if modo_ultima_temp_alt and item.library_playcounts: #Si solo se actualiza la última temporada de Videoteca
|
||||
if int(season_num) < max_temp:
|
||||
break #Sale del bucle actual del FOR
|
||||
|
||||
# Recorremos todos los episodios generando un Item local por cada uno en Itemlist
|
||||
for epi_id, episode_num, scrapedtitle in matches:
|
||||
item_local = item.clone()
|
||||
item_local.action = "findvideos"
|
||||
item_local.contentType = "episode"
|
||||
item_local.extra = "episodios"
|
||||
if item_local.library_playcounts:
|
||||
del item_local.library_playcounts
|
||||
if item_local.library_urls:
|
||||
del item_local.library_urls
|
||||
if item_local.path:
|
||||
del item_local.path
|
||||
if item_local.update_last:
|
||||
del item_local.update_last
|
||||
if item_local.update_next:
|
||||
del item_local.update_next
|
||||
if item_local.channel_host:
|
||||
del item_local.channel_host
|
||||
if item_local.active:
|
||||
del item_local.active
|
||||
if item_local.contentTitle:
|
||||
del item_local.infoLabels['title']
|
||||
if item_local.season_colapse:
|
||||
del item_local.season_colapse
|
||||
|
||||
item_local.title = ''
|
||||
item_local.context = "['buscar_trailer']"
|
||||
item_local.url = urlparse.urljoin(host, 'tv.php?ajax=1&tvepisode=%s' % epi_id)
|
||||
title = scrapedtitle
|
||||
item_local.language = ['VO']
|
||||
if not item_local.infoLabels['poster_path']:
|
||||
item_local.thumbnail = item_local.infoLabels['thumbnail']
|
||||
epi_rango = False
|
||||
|
||||
try:
|
||||
item_local.contentSeason = int(season_num)
|
||||
if 'season pack' in title.lower():
|
||||
item_local.contentEpisodeNumber = 1
|
||||
epi_rango = True
|
||||
else:
|
||||
item_local.contentEpisodeNumber = int(episode_num)
|
||||
except:
|
||||
logger.error('ERROR al extraer Temporada/Episodio: ' + title)
|
||||
item_local.contentSeason = 1
|
||||
item_local.contentEpisodeNumber = 0
|
||||
|
||||
#Si son episodios múltiples, lo extraemos
|
||||
if epi_rango:
|
||||
item_local.infoLabels['episodio_titulo'] = 'al 99'
|
||||
item_local.title = '%sx%s al 99 - Season Pack' % (str(item_local.contentSeason), str(item_local.contentEpisodeNumber).zfill(2))
|
||||
else:
|
||||
item_local.title = '%sx%s - ' % (str(item_local.contentSeason), str(item_local.contentEpisodeNumber).zfill(2))
|
||||
|
||||
if season_display > 0:
|
||||
if item_local.contentSeason > season_display:
|
||||
continue
|
||||
elif item_local.contentSeason < season_display:
|
||||
break
|
||||
|
||||
itemlist.append(item_local.clone())
|
||||
|
||||
#logger.debug(item_local)
|
||||
|
||||
if len(itemlist) > 1:
|
||||
itemlist = sorted(itemlist, key=lambda it: (int(it.contentSeason), int(it.contentEpisodeNumber))) #clasificamos
|
||||
|
||||
if item.season_colapse and not item.add_videolibrary: #Si viene de listado, mostramos solo Temporadas
|
||||
item, itemlist = generictools.post_tmdb_seasons(item, itemlist)
|
||||
|
||||
if not item.season_colapse: #Si no es pantalla de Temporadas, pintamos todo
|
||||
# Pasada por TMDB y clasificación de lista por temporada y episodio
|
||||
tmdb.set_infoLabels(itemlist, True)
|
||||
|
||||
#Llamamos al método para el maquillaje de los títulos obtenidos desde TMDB
|
||||
item, itemlist = generictools.post_tmdb_episodios(item, itemlist)
|
||||
|
||||
#logger.debug(item)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def check_blocked_IP(data, itemlist):
|
||||
logger.info()
|
||||
thumb_separador = get_thumb("next.png")
|
||||
|
||||
if 'Please wait while we try to verify your browser...' in data:
|
||||
logger.error("ERROR 99: La IP ha sido bloqueada por la Web" + " / DATA: " + data)
|
||||
itemlist.append(Item(channel=channel, url=host, title="[COLOR yellow]La IP ha sido bloqueada por la Web.[/COLOR]", folder=False, thumbnail=thumb_separador))
|
||||
itemlist.append(Item(channel=channel, url=host, title="[COLOR yellow]Fuerce la renovación de la IP en el Router[/COLOR]", folder=False, thumbnail=thumb_separador))
|
||||
from platformcode import platformtools
|
||||
platformtools.dialog_notification("IP bloqueada", "RARBG: Reiniciar ROUTER")
|
||||
|
||||
return (True, itemlist)
|
||||
return (False, itemlist)
|
||||
|
||||
|
||||
def actualizar_titulos(item):
|
||||
logger.info()
|
||||
|
||||
item = generictools.update_title(item) #Llamamos al método que actualiza el título con tmdb.find_and_set_infoLabels
|
||||
|
||||
#Volvemos a la siguiente acción en el canal
|
||||
return item
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info()
|
||||
texto = texto.replace(" ", "+")
|
||||
|
||||
try:
|
||||
item.url = host + 'torrents.php?category=2;18;41;49;14;48;17;44;45;47;50;51;52;42;46&search=%s' % texto
|
||||
item.extra = 'search'
|
||||
|
||||
if texto != '':
|
||||
return listado(item)
|
||||
except:
|
||||
import sys
|
||||
import traceback
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
logger.error(traceback.format_exc())
|
||||
return []
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user