Merge pull request #243 from lopezvg/master
Thumbs y banners de Tumejortorrent y Tvsinpagar
This commit is contained in:
@@ -133,7 +133,8 @@ def listado(item):
|
|||||||
|
|
||||||
for scrapedurl, scrapedtitle, scrapedthumbnail, title_alt, calidad in matches:
|
for scrapedurl, scrapedtitle, scrapedthumbnail, title_alt, calidad in matches:
|
||||||
url = scrapedurl
|
url = scrapedurl
|
||||||
title = scrapedtitle
|
title = scrapedtitle.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "")
|
||||||
|
title_alt = title_alt.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "")
|
||||||
thumbnail = scrapedthumbnail
|
thumbnail = scrapedthumbnail
|
||||||
action = "findvideos"
|
action = "findvideos"
|
||||||
extra = ""
|
extra = ""
|
||||||
@@ -209,10 +210,11 @@ def listado_busqueda(item):
|
|||||||
|
|
||||||
for url, thumb, title in matches:
|
for url, thumb, title in matches:
|
||||||
real_title = scrapertools.find_single_match(title, r'<strong.*?>(.*?)Temporada.*?<\/strong>') #series
|
real_title = scrapertools.find_single_match(title, r'<strong.*?>(.*?)Temporada.*?<\/strong>') #series
|
||||||
if real_title == "":
|
if not real_title:
|
||||||
real_title = scrapertools.find_single_match(title, r'(.*?)\[.*?]') #movies
|
real_title = scrapertools.find_single_match(title, r'(.*?)\[.*?]') #movies
|
||||||
real_title = scrapertools.remove_htmltags(real_title).decode('iso-8859-1').encode('utf-8')
|
real_title = scrapertools.remove_htmltags(real_title).decode('iso-8859-1').encode('utf-8')
|
||||||
real_title = scrapertools.htmlclean(real_title)
|
real_title = scrapertools.htmlclean(real_title)
|
||||||
|
real_title = real_title.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "").replace("de la Serie", "")
|
||||||
calidad = scrapertools.find_single_match(title, r'.*?\s*Calidad.*?<span[^>]+>[\[]\s*(?P<quality>.*?)\s*[\]]<\/span>') #series
|
calidad = scrapertools.find_single_match(title, r'.*?\s*Calidad.*?<span[^>]+>[\[]\s*(?P<quality>.*?)\s*[\]]<\/span>') #series
|
||||||
if calidad == "":
|
if calidad == "":
|
||||||
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
||||||
@@ -220,9 +222,8 @@ def listado_busqueda(item):
|
|||||||
|
|
||||||
# fix encoding for title
|
# fix encoding for title
|
||||||
title = scrapertools.htmlclean(title)
|
title = scrapertools.htmlclean(title)
|
||||||
title = title.replace("�", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng")
|
|
||||||
title = re.sub(r'(Calidad.*?\])', '', title)
|
title = re.sub(r'(Calidad.*?\])', '', title)
|
||||||
|
title = title.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "").replace("de la Serie", "")
|
||||||
if real_title == "":
|
if real_title == "":
|
||||||
real_title = title
|
real_title = title
|
||||||
if calidad == "":
|
if calidad == "":
|
||||||
@@ -236,18 +237,22 @@ def listado_busqueda(item):
|
|||||||
|
|
||||||
# Codigo para rescatar lo que se puede en pelisy.series.com de Series para la Videoteca. la URL apunta al capítulo y no a la Serie. Nombre de Serie frecuentemente en blanco. Se obtiene de Thumb, así como el id de la serie
|
# Codigo para rescatar lo que se puede en pelisy.series.com de Series para la Videoteca. la URL apunta al capítulo y no a la Serie. Nombre de Serie frecuentemente en blanco. Se obtiene de Thumb, así como el id de la serie
|
||||||
if ("/serie" in url or "-serie" in url) and "pelisyseries.com" in host:
|
if ("/serie" in url or "-serie" in url) and "pelisyseries.com" in host:
|
||||||
calidad_mps = "series/"
|
|
||||||
if "seriehd" in url:
|
if "seriehd" in url:
|
||||||
calidad_mps = "series-hd/"
|
calidad_mps = "series-hd/"
|
||||||
if "serievo" in url:
|
elif "serievo" in url:
|
||||||
calidad_mps = "series-vo/"
|
calidad_mps = "series-vo/"
|
||||||
if "serie-vo" in url:
|
elif "serie-vo" in url:
|
||||||
calidad_mps = "series-vo/"
|
calidad_mps = "series-vo/"
|
||||||
|
else:
|
||||||
|
calidad_mps = "series/"
|
||||||
|
|
||||||
real_title_mps = re.sub(r'.*?\/\d+_', '', thumb)
|
if "no_image" in thumb:
|
||||||
real_title_mps = re.sub(r'\.\w+.*?', '', real_title_mps)
|
real_title_mps = title
|
||||||
|
else:
|
||||||
|
real_title_mps = re.sub(r'.*?\/\d+_', '', thumb)
|
||||||
|
real_title_mps = re.sub(r'\.\w+.*?', '', real_title_mps)
|
||||||
|
|
||||||
if "/0_" not in thumb:
|
if "/0_" not in thumb and not "no_image" in thumb:
|
||||||
serieid = scrapertools.find_single_match(thumb, r'.*?\/\w\/(?P<serieid>\d+).*?.*')
|
serieid = scrapertools.find_single_match(thumb, r'.*?\/\w\/(?P<serieid>\d+).*?.*')
|
||||||
if len(serieid) > 5:
|
if len(serieid) > 5:
|
||||||
serieid = ""
|
serieid = ""
|
||||||
@@ -507,6 +512,11 @@ def episodios(item):
|
|||||||
"[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
"[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
||||||
if "Especial" in info: # Capitulos Especiales
|
if "Especial" in info: # Capitulos Especiales
|
||||||
pattern = ".*?[^>]+>.*?Temporada.*?\[.*?(?P<season>\d+).*?\].*?Capitulo.*?\[\s*(?P<episode>\d+).*?\]?(?:.*?(?P<episode2>\d+)?)<.+?<span[^>]+>(?P<lang>.*?)?<\/span>\s*Calidad\s*<span[^>]+>[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
pattern = ".*?[^>]+>.*?Temporada.*?\[.*?(?P<season>\d+).*?\].*?Capitulo.*?\[\s*(?P<episode>\d+).*?\]?(?:.*?(?P<episode2>\d+)?)<.+?<span[^>]+>(?P<lang>.*?)?<\/span>\s*Calidad\s*<span[^>]+>[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
||||||
|
|
||||||
|
if not scrapertools.find_single_match(info, pattern): #en caso de error de formato, creo uno básico
|
||||||
|
logger.debug("patron episodioNEW: " + pattern)
|
||||||
|
logger.debug(info)
|
||||||
|
info = '><strong>%sTemporada %s Capitulo 0</strong> - <span >Español Castellano</span> Calidad <span >[%s]</span>' % (item.contentTitle, season, item.infoLabels['quality'])
|
||||||
r = re.compile(pattern)
|
r = re.compile(pattern)
|
||||||
match = [m.groupdict() for m in r.finditer(info)][0]
|
match = [m.groupdict() for m in r.finditer(info)][0]
|
||||||
|
|
||||||
@@ -540,11 +550,11 @@ def episodios(item):
|
|||||||
"(?P<episode2>\d{2}))?.*?\].*?(?:\[(?P<lang>.*?)\])?"
|
"(?P<episode2>\d{2}))?.*?\].*?(?:\[(?P<lang>.*?)\])?"
|
||||||
elif scrapertools.find_single_match(info, 'Cap.\d{2,3}'):
|
elif scrapertools.find_single_match(info, 'Cap.\d{2,3}'):
|
||||||
pattern = ".*?Temp.*?\s(?P<quality>.*?)\s.*?Cap.(?P<season>\d).*?(?P<episode>\d{2})(?:_(?P<season2>\d+)(?P<episode2>\d{2}))?.*?\s(?P<lang>.*)?"
|
pattern = ".*?Temp.*?\s(?P<quality>.*?)\s.*?Cap.(?P<season>\d).*?(?P<episode>\d{2})(?:_(?P<season2>\d+)(?P<episode2>\d{2}))?.*?\s(?P<lang>.*)?"
|
||||||
else:
|
|
||||||
logger.debug("patron episodio: " + pattern)
|
|
||||||
logger.debug(info)
|
|
||||||
continue
|
|
||||||
|
|
||||||
|
if not scrapertools.find_single_match(info, pattern): #en caso de error de formato, creo uno básico
|
||||||
|
logger.debug("patron episodioOLD: " + pattern)
|
||||||
|
logger.debug(info)
|
||||||
|
info = '%s [%s][Cap.%s00][Español]' % (item.contentTitle, item.infoLabels['quality'], season)
|
||||||
r = re.compile(pattern)
|
r = re.compile(pattern)
|
||||||
match = [m.groupdict() for m in r.finditer(info)][0]
|
match = [m.groupdict() for m in r.finditer(info)][0]
|
||||||
|
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ def episodios(item):
|
|||||||
url = host + scrapertools.find_single_match(data,patron)
|
url = host + scrapertools.find_single_match(data,patron)
|
||||||
# "episodios%5B1%5D=11744&total_capis=5&tabla=series&titulo=Sea+Patrol+-+2%AA+Temporada"
|
# "episodios%5B1%5D=11744&total_capis=5&tabla=series&titulo=Sea+Patrol+-+2%AA+Temporada"
|
||||||
post = urllib.urlencode({name: value, "total_capis": total_capis, "tabla": tabla, "titulo": titulo})
|
post = urllib.urlencode({name: value, "total_capis": total_capis, "tabla": tabla, "titulo": titulo})
|
||||||
logger.debug("post=" + post)
|
#logger.debug("post=" + post)
|
||||||
|
|
||||||
if item.extra == "series":
|
if item.extra == "series":
|
||||||
epi = scrapedtitle.split("x")
|
epi = scrapedtitle.split("x")
|
||||||
@@ -311,7 +311,6 @@ def show_movie_info(item):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
logger.debug("data=" + data)
|
|
||||||
|
|
||||||
patron = "<a href='(secciones.php\?sec\=descargas[^']+)'"
|
patron = "<a href='(secciones.php\?sec\=descargas[^']+)'"
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
@@ -319,9 +318,11 @@ def show_movie_info(item):
|
|||||||
for scrapedurl in matches:
|
for scrapedurl in matches:
|
||||||
url = urlparse.urljoin(item.url, scrapedurl)
|
url = urlparse.urljoin(item.url, scrapedurl)
|
||||||
logger.debug("title=[" + item.title + "], url=[" + url + "], thumbnail=[" + item.thumbnail + "]")
|
logger.debug("title=[" + item.title + "], url=[" + url + "], thumbnail=[" + item.thumbnail + "]")
|
||||||
|
|
||||||
torrent_data = httptools.downloadpage(url).data
|
torrent_data = httptools.downloadpage(url).data
|
||||||
link = scrapertools.get_match(torrent_data, "<a href='(\/uploads\/torrents\/peliculas\/.*?\.torrent)'>")
|
if scrapertools.find_single_match(torrent_data, "<a href='(\/uploads\/torrents\/peliculas\/.*?\.torrent)'>"):
|
||||||
|
link = scrapertools.get_match(torrent_data, "<a href='(\/uploads\/torrents\/peliculas\/.*?\.torrent)'>")
|
||||||
|
else:
|
||||||
|
link = scrapertools.get_match(torrent_data, "<a href='(http:\/\/www.mejortorrent.com\/uploads\/torrents\/.*?peliculas\/.*?\.torrent)'>")
|
||||||
link = urlparse.urljoin(url, link)
|
link = urlparse.urljoin(url, link)
|
||||||
logger.debug("link=" + link)
|
logger.debug("link=" + link)
|
||||||
itemlist.append(Item(channel=item.channel, action="play", server="torrent", title=item.title, url=link,
|
itemlist.append(Item(channel=item.channel, action="play", server="torrent", title=item.title, url=link,
|
||||||
@@ -363,7 +364,7 @@ def play(item):
|
|||||||
else:
|
else:
|
||||||
#data = httptools.downloadpage(item.url, post=item.extra).data
|
#data = httptools.downloadpage(item.url, post=item.extra).data
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
logger.debug("data=" + data)
|
#logger.debug("data=" + data)
|
||||||
|
|
||||||
params = dict(urlparse.parse_qsl(item.extra))
|
params = dict(urlparse.parse_qsl(item.extra))
|
||||||
patron = host + "/secciones.php?sec=descargas&ap=contar&tabla=" + params["tabla"] + "&id=" + item.id
|
patron = host + "/secciones.php?sec=descargas&ap=contar&tabla=" + params["tabla"] + "&id=" + item.id
|
||||||
@@ -373,7 +374,9 @@ def play(item):
|
|||||||
|
|
||||||
data = httptools.downloadpage(patron).data
|
data = httptools.downloadpage(patron).data
|
||||||
patron = "Pincha <a href='(.*?)'>"
|
patron = "Pincha <a href='(.*?)'>"
|
||||||
link = host + scrapertools.find_single_match(data, patron)
|
link = scrapertools.find_single_match(data, patron)
|
||||||
|
if not host in link:
|
||||||
|
link = host + link
|
||||||
logger.info("link=" + link)
|
logger.info("link=" + link)
|
||||||
itemlist.append(Item(channel=item.channel, action="play", server="torrent", title=item.title, url=link,
|
itemlist.append(Item(channel=item.channel, action="play", server="torrent", title=item.title, url=link,
|
||||||
thumbnail=item.thumbnail, plot=item.plot, folder=False))
|
thumbnail=item.thumbnail, plot=item.plot, folder=False))
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ from core.item import Item
|
|||||||
from platformcode import config, logger
|
from platformcode import config, logger
|
||||||
from core import tmdb
|
from core import tmdb
|
||||||
|
|
||||||
host = 'http://www.mispelisyseries.com/'
|
host = 'http://mispelisyseries.com/'
|
||||||
|
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
@@ -133,7 +133,8 @@ def listado(item):
|
|||||||
|
|
||||||
for scrapedurl, scrapedtitle, scrapedthumbnail, title_alt, calidad in matches:
|
for scrapedurl, scrapedtitle, scrapedthumbnail, title_alt, calidad in matches:
|
||||||
url = scrapedurl
|
url = scrapedurl
|
||||||
title = scrapedtitle
|
title = scrapedtitle.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "")
|
||||||
|
title_alt = title_alt.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "")
|
||||||
thumbnail = scrapedthumbnail
|
thumbnail = scrapedthumbnail
|
||||||
action = "findvideos"
|
action = "findvideos"
|
||||||
extra = ""
|
extra = ""
|
||||||
@@ -209,10 +210,11 @@ def listado_busqueda(item):
|
|||||||
|
|
||||||
for url, thumb, title in matches:
|
for url, thumb, title in matches:
|
||||||
real_title = scrapertools.find_single_match(title, r'<strong.*?>(.*?)Temporada.*?<\/strong>') #series
|
real_title = scrapertools.find_single_match(title, r'<strong.*?>(.*?)Temporada.*?<\/strong>') #series
|
||||||
if real_title == "":
|
if not real_title:
|
||||||
real_title = scrapertools.find_single_match(title, r'(.*?)\[.*?]') #movies
|
real_title = scrapertools.find_single_match(title, r'(.*?)\[.*?]') #movies
|
||||||
real_title = scrapertools.remove_htmltags(real_title).decode('iso-8859-1').encode('utf-8')
|
real_title = scrapertools.remove_htmltags(real_title).decode('iso-8859-1').encode('utf-8')
|
||||||
real_title = scrapertools.htmlclean(real_title)
|
real_title = scrapertools.htmlclean(real_title)
|
||||||
|
real_title = real_title.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "").replace("de la Serie", "")
|
||||||
calidad = scrapertools.find_single_match(title, r'.*?\s*Calidad.*?<span[^>]+>[\[]\s*(?P<quality>.*?)\s*[\]]<\/span>') #series
|
calidad = scrapertools.find_single_match(title, r'.*?\s*Calidad.*?<span[^>]+>[\[]\s*(?P<quality>.*?)\s*[\]]<\/span>') #series
|
||||||
if calidad == "":
|
if calidad == "":
|
||||||
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
||||||
@@ -220,9 +222,8 @@ def listado_busqueda(item):
|
|||||||
|
|
||||||
# fix encoding for title
|
# fix encoding for title
|
||||||
title = scrapertools.htmlclean(title)
|
title = scrapertools.htmlclean(title)
|
||||||
title = title.replace("�", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng")
|
|
||||||
title = re.sub(r'(Calidad.*?\])', '', title)
|
title = re.sub(r'(Calidad.*?\])', '', title)
|
||||||
|
title = title.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "").replace("de la Serie", "")
|
||||||
if real_title == "":
|
if real_title == "":
|
||||||
real_title = title
|
real_title = title
|
||||||
if calidad == "":
|
if calidad == "":
|
||||||
@@ -236,18 +237,22 @@ def listado_busqueda(item):
|
|||||||
|
|
||||||
# Codigo para rescatar lo que se puede en pelisy.series.com de Series para la Videoteca. la URL apunta al capítulo y no a la Serie. Nombre de Serie frecuentemente en blanco. Se obtiene de Thumb, así como el id de la serie
|
# Codigo para rescatar lo que se puede en pelisy.series.com de Series para la Videoteca. la URL apunta al capítulo y no a la Serie. Nombre de Serie frecuentemente en blanco. Se obtiene de Thumb, así como el id de la serie
|
||||||
if ("/serie" in url or "-serie" in url) and "pelisyseries.com" in host:
|
if ("/serie" in url or "-serie" in url) and "pelisyseries.com" in host:
|
||||||
calidad_mps = "series/"
|
|
||||||
if "seriehd" in url:
|
if "seriehd" in url:
|
||||||
calidad_mps = "series-hd/"
|
calidad_mps = "series-hd/"
|
||||||
if "serievo" in url:
|
elif "serievo" in url:
|
||||||
calidad_mps = "series-vo/"
|
calidad_mps = "series-vo/"
|
||||||
if "serie-vo" in url:
|
elif "serie-vo" in url:
|
||||||
calidad_mps = "series-vo/"
|
calidad_mps = "series-vo/"
|
||||||
|
else:
|
||||||
|
calidad_mps = "series/"
|
||||||
|
|
||||||
real_title_mps = re.sub(r'.*?\/\d+_', '', thumb)
|
if "no_image" in thumb:
|
||||||
real_title_mps = re.sub(r'\.\w+.*?', '', real_title_mps)
|
real_title_mps = title
|
||||||
|
else:
|
||||||
|
real_title_mps = re.sub(r'.*?\/\d+_', '', thumb)
|
||||||
|
real_title_mps = re.sub(r'\.\w+.*?', '', real_title_mps)
|
||||||
|
|
||||||
if "/0_" not in thumb:
|
if "/0_" not in thumb and not "no_image" in thumb:
|
||||||
serieid = scrapertools.find_single_match(thumb, r'.*?\/\w\/(?P<serieid>\d+).*?.*')
|
serieid = scrapertools.find_single_match(thumb, r'.*?\/\w\/(?P<serieid>\d+).*?.*')
|
||||||
if len(serieid) > 5:
|
if len(serieid) > 5:
|
||||||
serieid = ""
|
serieid = ""
|
||||||
@@ -507,6 +512,11 @@ def episodios(item):
|
|||||||
"[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
"[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
||||||
if "Especial" in info: # Capitulos Especiales
|
if "Especial" in info: # Capitulos Especiales
|
||||||
pattern = ".*?[^>]+>.*?Temporada.*?\[.*?(?P<season>\d+).*?\].*?Capitulo.*?\[\s*(?P<episode>\d+).*?\]?(?:.*?(?P<episode2>\d+)?)<.+?<span[^>]+>(?P<lang>.*?)?<\/span>\s*Calidad\s*<span[^>]+>[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
pattern = ".*?[^>]+>.*?Temporada.*?\[.*?(?P<season>\d+).*?\].*?Capitulo.*?\[\s*(?P<episode>\d+).*?\]?(?:.*?(?P<episode2>\d+)?)<.+?<span[^>]+>(?P<lang>.*?)?<\/span>\s*Calidad\s*<span[^>]+>[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
||||||
|
|
||||||
|
if not scrapertools.find_single_match(info, pattern): #en caso de error de formato, creo uno básico
|
||||||
|
logger.debug("patron episodioNEW: " + pattern)
|
||||||
|
logger.debug(info)
|
||||||
|
info = '><strong>%sTemporada %s Capitulo 0</strong> - <span >Español Castellano</span> Calidad <span >[%s]</span>' % (item.contentTitle, season, item.infoLabels['quality'])
|
||||||
r = re.compile(pattern)
|
r = re.compile(pattern)
|
||||||
match = [m.groupdict() for m in r.finditer(info)][0]
|
match = [m.groupdict() for m in r.finditer(info)][0]
|
||||||
|
|
||||||
@@ -540,11 +550,11 @@ def episodios(item):
|
|||||||
"(?P<episode2>\d{2}))?.*?\].*?(?:\[(?P<lang>.*?)\])?"
|
"(?P<episode2>\d{2}))?.*?\].*?(?:\[(?P<lang>.*?)\])?"
|
||||||
elif scrapertools.find_single_match(info, 'Cap.\d{2,3}'):
|
elif scrapertools.find_single_match(info, 'Cap.\d{2,3}'):
|
||||||
pattern = ".*?Temp.*?\s(?P<quality>.*?)\s.*?Cap.(?P<season>\d).*?(?P<episode>\d{2})(?:_(?P<season2>\d+)(?P<episode2>\d{2}))?.*?\s(?P<lang>.*)?"
|
pattern = ".*?Temp.*?\s(?P<quality>.*?)\s.*?Cap.(?P<season>\d).*?(?P<episode>\d{2})(?:_(?P<season2>\d+)(?P<episode2>\d{2}))?.*?\s(?P<lang>.*)?"
|
||||||
else:
|
|
||||||
logger.debug("patron episodio: " + pattern)
|
|
||||||
logger.debug(info)
|
|
||||||
continue
|
|
||||||
|
|
||||||
|
if not scrapertools.find_single_match(info, pattern): #en caso de error de formato, creo uno básico
|
||||||
|
logger.debug("patron episodioOLD: " + pattern)
|
||||||
|
logger.debug(info)
|
||||||
|
info = '%s [%s][Cap.%s00][Español]' % (item.contentTitle, item.infoLabels['quality'], season)
|
||||||
r = re.compile(pattern)
|
r = re.compile(pattern)
|
||||||
match = [m.groupdict() for m in r.finditer(info)][0]
|
match = [m.groupdict() for m in r.finditer(info)][0]
|
||||||
|
|
||||||
|
|||||||
@@ -133,7 +133,8 @@ def listado(item):
|
|||||||
|
|
||||||
for scrapedurl, scrapedtitle, scrapedthumbnail, title_alt, calidad in matches:
|
for scrapedurl, scrapedtitle, scrapedthumbnail, title_alt, calidad in matches:
|
||||||
url = scrapedurl
|
url = scrapedurl
|
||||||
title = scrapedtitle
|
title = scrapedtitle.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "")
|
||||||
|
title_alt = title_alt.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "")
|
||||||
thumbnail = scrapedthumbnail
|
thumbnail = scrapedthumbnail
|
||||||
action = "findvideos"
|
action = "findvideos"
|
||||||
extra = ""
|
extra = ""
|
||||||
@@ -209,10 +210,11 @@ def listado_busqueda(item):
|
|||||||
|
|
||||||
for url, thumb, title in matches:
|
for url, thumb, title in matches:
|
||||||
real_title = scrapertools.find_single_match(title, r'<strong.*?>(.*?)Temporada.*?<\/strong>') #series
|
real_title = scrapertools.find_single_match(title, r'<strong.*?>(.*?)Temporada.*?<\/strong>') #series
|
||||||
if real_title == "":
|
if not real_title:
|
||||||
real_title = scrapertools.find_single_match(title, r'(.*?)\[.*?]') #movies
|
real_title = scrapertools.find_single_match(title, r'(.*?)\[.*?]') #movies
|
||||||
real_title = scrapertools.remove_htmltags(real_title).decode('iso-8859-1').encode('utf-8')
|
real_title = scrapertools.remove_htmltags(real_title).decode('iso-8859-1').encode('utf-8')
|
||||||
real_title = scrapertools.htmlclean(real_title)
|
real_title = scrapertools.htmlclean(real_title)
|
||||||
|
real_title = real_title.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "").replace("de la Serie", "")
|
||||||
calidad = scrapertools.find_single_match(title, r'.*?\s*Calidad.*?<span[^>]+>[\[]\s*(?P<quality>.*?)\s*[\]]<\/span>') #series
|
calidad = scrapertools.find_single_match(title, r'.*?\s*Calidad.*?<span[^>]+>[\[]\s*(?P<quality>.*?)\s*[\]]<\/span>') #series
|
||||||
if calidad == "":
|
if calidad == "":
|
||||||
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
||||||
@@ -220,9 +222,8 @@ def listado_busqueda(item):
|
|||||||
|
|
||||||
# fix encoding for title
|
# fix encoding for title
|
||||||
title = scrapertools.htmlclean(title)
|
title = scrapertools.htmlclean(title)
|
||||||
title = title.replace("�", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng")
|
|
||||||
title = re.sub(r'(Calidad.*?\])', '', title)
|
title = re.sub(r'(Calidad.*?\])', '', title)
|
||||||
|
title = title.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "").replace("de la Serie", "")
|
||||||
if real_title == "":
|
if real_title == "":
|
||||||
real_title = title
|
real_title = title
|
||||||
if calidad == "":
|
if calidad == "":
|
||||||
@@ -236,18 +237,22 @@ def listado_busqueda(item):
|
|||||||
|
|
||||||
# Codigo para rescatar lo que se puede en pelisy.series.com de Series para la Videoteca. la URL apunta al capítulo y no a la Serie. Nombre de Serie frecuentemente en blanco. Se obtiene de Thumb, así como el id de la serie
|
# Codigo para rescatar lo que se puede en pelisy.series.com de Series para la Videoteca. la URL apunta al capítulo y no a la Serie. Nombre de Serie frecuentemente en blanco. Se obtiene de Thumb, así como el id de la serie
|
||||||
if ("/serie" in url or "-serie" in url) and "pelisyseries.com" in host:
|
if ("/serie" in url or "-serie" in url) and "pelisyseries.com" in host:
|
||||||
calidad_mps = "series/"
|
|
||||||
if "seriehd" in url:
|
if "seriehd" in url:
|
||||||
calidad_mps = "series-hd/"
|
calidad_mps = "series-hd/"
|
||||||
if "serievo" in url:
|
elif "serievo" in url:
|
||||||
calidad_mps = "series-vo/"
|
calidad_mps = "series-vo/"
|
||||||
if "serie-vo" in url:
|
elif "serie-vo" in url:
|
||||||
calidad_mps = "series-vo/"
|
calidad_mps = "series-vo/"
|
||||||
|
else:
|
||||||
|
calidad_mps = "series/"
|
||||||
|
|
||||||
real_title_mps = re.sub(r'.*?\/\d+_', '', thumb)
|
if "no_image" in thumb:
|
||||||
real_title_mps = re.sub(r'\.\w+.*?', '', real_title_mps)
|
real_title_mps = title
|
||||||
|
else:
|
||||||
|
real_title_mps = re.sub(r'.*?\/\d+_', '', thumb)
|
||||||
|
real_title_mps = re.sub(r'\.\w+.*?', '', real_title_mps)
|
||||||
|
|
||||||
if "/0_" not in thumb:
|
if "/0_" not in thumb and not "no_image" in thumb:
|
||||||
serieid = scrapertools.find_single_match(thumb, r'.*?\/\w\/(?P<serieid>\d+).*?.*')
|
serieid = scrapertools.find_single_match(thumb, r'.*?\/\w\/(?P<serieid>\d+).*?.*')
|
||||||
if len(serieid) > 5:
|
if len(serieid) > 5:
|
||||||
serieid = ""
|
serieid = ""
|
||||||
@@ -507,6 +512,11 @@ def episodios(item):
|
|||||||
"[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
"[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
||||||
if "Especial" in info: # Capitulos Especiales
|
if "Especial" in info: # Capitulos Especiales
|
||||||
pattern = ".*?[^>]+>.*?Temporada.*?\[.*?(?P<season>\d+).*?\].*?Capitulo.*?\[\s*(?P<episode>\d+).*?\]?(?:.*?(?P<episode2>\d+)?)<.+?<span[^>]+>(?P<lang>.*?)?<\/span>\s*Calidad\s*<span[^>]+>[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
pattern = ".*?[^>]+>.*?Temporada.*?\[.*?(?P<season>\d+).*?\].*?Capitulo.*?\[\s*(?P<episode>\d+).*?\]?(?:.*?(?P<episode2>\d+)?)<.+?<span[^>]+>(?P<lang>.*?)?<\/span>\s*Calidad\s*<span[^>]+>[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
||||||
|
|
||||||
|
if not scrapertools.find_single_match(info, pattern): #en caso de error de formato, creo uno básico
|
||||||
|
logger.debug("patron episodioNEW: " + pattern)
|
||||||
|
logger.debug(info)
|
||||||
|
info = '><strong>%sTemporada %s Capitulo 0</strong> - <span >Español Castellano</span> Calidad <span >[%s]</span>' % (item.contentTitle, season, item.infoLabels['quality'])
|
||||||
r = re.compile(pattern)
|
r = re.compile(pattern)
|
||||||
match = [m.groupdict() for m in r.finditer(info)][0]
|
match = [m.groupdict() for m in r.finditer(info)][0]
|
||||||
|
|
||||||
@@ -540,11 +550,11 @@ def episodios(item):
|
|||||||
"(?P<episode2>\d{2}))?.*?\].*?(?:\[(?P<lang>.*?)\])?"
|
"(?P<episode2>\d{2}))?.*?\].*?(?:\[(?P<lang>.*?)\])?"
|
||||||
elif scrapertools.find_single_match(info, 'Cap.\d{2,3}'):
|
elif scrapertools.find_single_match(info, 'Cap.\d{2,3}'):
|
||||||
pattern = ".*?Temp.*?\s(?P<quality>.*?)\s.*?Cap.(?P<season>\d).*?(?P<episode>\d{2})(?:_(?P<season2>\d+)(?P<episode2>\d{2}))?.*?\s(?P<lang>.*)?"
|
pattern = ".*?Temp.*?\s(?P<quality>.*?)\s.*?Cap.(?P<season>\d).*?(?P<episode>\d{2})(?:_(?P<season2>\d+)(?P<episode2>\d{2}))?.*?\s(?P<lang>.*)?"
|
||||||
else:
|
|
||||||
logger.debug("patron episodio: " + pattern)
|
|
||||||
logger.debug(info)
|
|
||||||
continue
|
|
||||||
|
|
||||||
|
if not scrapertools.find_single_match(info, pattern): #en caso de error de formato, creo uno básico
|
||||||
|
logger.debug("patron episodioOLD: " + pattern)
|
||||||
|
logger.debug(info)
|
||||||
|
info = '%s [%s][Cap.%s00][Español]' % (item.contentTitle, item.infoLabels['quality'], season)
|
||||||
r = re.compile(pattern)
|
r = re.compile(pattern)
|
||||||
match = [m.groupdict() for m in r.finditer(info)][0]
|
match = [m.groupdict() for m in r.finditer(info)][0]
|
||||||
|
|
||||||
|
|||||||
@@ -133,7 +133,8 @@ def listado(item):
|
|||||||
|
|
||||||
for scrapedurl, scrapedtitle, scrapedthumbnail, title_alt, calidad in matches:
|
for scrapedurl, scrapedtitle, scrapedthumbnail, title_alt, calidad in matches:
|
||||||
url = scrapedurl
|
url = scrapedurl
|
||||||
title = scrapedtitle
|
title = scrapedtitle.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "")
|
||||||
|
title_alt = title_alt.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "")
|
||||||
thumbnail = scrapedthumbnail
|
thumbnail = scrapedthumbnail
|
||||||
action = "findvideos"
|
action = "findvideos"
|
||||||
extra = ""
|
extra = ""
|
||||||
@@ -209,10 +210,11 @@ def listado_busqueda(item):
|
|||||||
|
|
||||||
for url, thumb, title in matches:
|
for url, thumb, title in matches:
|
||||||
real_title = scrapertools.find_single_match(title, r'<strong.*?>(.*?)Temporada.*?<\/strong>') #series
|
real_title = scrapertools.find_single_match(title, r'<strong.*?>(.*?)Temporada.*?<\/strong>') #series
|
||||||
if real_title == "":
|
if not real_title:
|
||||||
real_title = scrapertools.find_single_match(title, r'(.*?)\[.*?]') #movies
|
real_title = scrapertools.find_single_match(title, r'(.*?)\[.*?]') #movies
|
||||||
real_title = scrapertools.remove_htmltags(real_title).decode('iso-8859-1').encode('utf-8')
|
real_title = scrapertools.remove_htmltags(real_title).decode('iso-8859-1').encode('utf-8')
|
||||||
real_title = scrapertools.htmlclean(real_title)
|
real_title = scrapertools.htmlclean(real_title)
|
||||||
|
real_title = real_title.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "").replace("de la Serie", "")
|
||||||
calidad = scrapertools.find_single_match(title, r'.*?\s*Calidad.*?<span[^>]+>[\[]\s*(?P<quality>.*?)\s*[\]]<\/span>') #series
|
calidad = scrapertools.find_single_match(title, r'.*?\s*Calidad.*?<span[^>]+>[\[]\s*(?P<quality>.*?)\s*[\]]<\/span>') #series
|
||||||
if calidad == "":
|
if calidad == "":
|
||||||
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
||||||
@@ -220,9 +222,8 @@ def listado_busqueda(item):
|
|||||||
|
|
||||||
# fix encoding for title
|
# fix encoding for title
|
||||||
title = scrapertools.htmlclean(title)
|
title = scrapertools.htmlclean(title)
|
||||||
title = title.replace("�", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng")
|
|
||||||
title = re.sub(r'(Calidad.*?\])', '', title)
|
title = re.sub(r'(Calidad.*?\])', '', title)
|
||||||
|
title = title.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "").replace("de la Serie", "")
|
||||||
if real_title == "":
|
if real_title == "":
|
||||||
real_title = title
|
real_title = title
|
||||||
if calidad == "":
|
if calidad == "":
|
||||||
@@ -236,18 +237,22 @@ def listado_busqueda(item):
|
|||||||
|
|
||||||
# Codigo para rescatar lo que se puede en pelisy.series.com de Series para la Videoteca. la URL apunta al capítulo y no a la Serie. Nombre de Serie frecuentemente en blanco. Se obtiene de Thumb, así como el id de la serie
|
# Codigo para rescatar lo que se puede en pelisy.series.com de Series para la Videoteca. la URL apunta al capítulo y no a la Serie. Nombre de Serie frecuentemente en blanco. Se obtiene de Thumb, así como el id de la serie
|
||||||
if ("/serie" in url or "-serie" in url) and "pelisyseries.com" in host:
|
if ("/serie" in url or "-serie" in url) and "pelisyseries.com" in host:
|
||||||
calidad_mps = "series/"
|
|
||||||
if "seriehd" in url:
|
if "seriehd" in url:
|
||||||
calidad_mps = "series-hd/"
|
calidad_mps = "series-hd/"
|
||||||
if "serievo" in url:
|
elif "serievo" in url:
|
||||||
calidad_mps = "series-vo/"
|
calidad_mps = "series-vo/"
|
||||||
if "serie-vo" in url:
|
elif "serie-vo" in url:
|
||||||
calidad_mps = "series-vo/"
|
calidad_mps = "series-vo/"
|
||||||
|
else:
|
||||||
|
calidad_mps = "series/"
|
||||||
|
|
||||||
real_title_mps = re.sub(r'.*?\/\d+_', '', thumb)
|
if "no_image" in thumb:
|
||||||
real_title_mps = re.sub(r'\.\w+.*?', '', real_title_mps)
|
real_title_mps = title
|
||||||
|
else:
|
||||||
|
real_title_mps = re.sub(r'.*?\/\d+_', '', thumb)
|
||||||
|
real_title_mps = re.sub(r'\.\w+.*?', '', real_title_mps)
|
||||||
|
|
||||||
if "/0_" not in thumb:
|
if "/0_" not in thumb and not "no_image" in thumb:
|
||||||
serieid = scrapertools.find_single_match(thumb, r'.*?\/\w\/(?P<serieid>\d+).*?.*')
|
serieid = scrapertools.find_single_match(thumb, r'.*?\/\w\/(?P<serieid>\d+).*?.*')
|
||||||
if len(serieid) > 5:
|
if len(serieid) > 5:
|
||||||
serieid = ""
|
serieid = ""
|
||||||
@@ -507,6 +512,11 @@ def episodios(item):
|
|||||||
"[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
"[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
||||||
if "Especial" in info: # Capitulos Especiales
|
if "Especial" in info: # Capitulos Especiales
|
||||||
pattern = ".*?[^>]+>.*?Temporada.*?\[.*?(?P<season>\d+).*?\].*?Capitulo.*?\[\s*(?P<episode>\d+).*?\]?(?:.*?(?P<episode2>\d+)?)<.+?<span[^>]+>(?P<lang>.*?)?<\/span>\s*Calidad\s*<span[^>]+>[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
pattern = ".*?[^>]+>.*?Temporada.*?\[.*?(?P<season>\d+).*?\].*?Capitulo.*?\[\s*(?P<episode>\d+).*?\]?(?:.*?(?P<episode2>\d+)?)<.+?<span[^>]+>(?P<lang>.*?)?<\/span>\s*Calidad\s*<span[^>]+>[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
||||||
|
|
||||||
|
if not scrapertools.find_single_match(info, pattern): #en caso de error de formato, creo uno básico
|
||||||
|
logger.debug("patron episodioNEW: " + pattern)
|
||||||
|
logger.debug(info)
|
||||||
|
info = '><strong>%sTemporada %s Capitulo 0</strong> - <span >Español Castellano</span> Calidad <span >[%s]</span>' % (item.contentTitle, season, item.infoLabels['quality'])
|
||||||
r = re.compile(pattern)
|
r = re.compile(pattern)
|
||||||
match = [m.groupdict() for m in r.finditer(info)][0]
|
match = [m.groupdict() for m in r.finditer(info)][0]
|
||||||
|
|
||||||
@@ -540,11 +550,11 @@ def episodios(item):
|
|||||||
"(?P<episode2>\d{2}))?.*?\].*?(?:\[(?P<lang>.*?)\])?"
|
"(?P<episode2>\d{2}))?.*?\].*?(?:\[(?P<lang>.*?)\])?"
|
||||||
elif scrapertools.find_single_match(info, 'Cap.\d{2,3}'):
|
elif scrapertools.find_single_match(info, 'Cap.\d{2,3}'):
|
||||||
pattern = ".*?Temp.*?\s(?P<quality>.*?)\s.*?Cap.(?P<season>\d).*?(?P<episode>\d{2})(?:_(?P<season2>\d+)(?P<episode2>\d{2}))?.*?\s(?P<lang>.*)?"
|
pattern = ".*?Temp.*?\s(?P<quality>.*?)\s.*?Cap.(?P<season>\d).*?(?P<episode>\d{2})(?:_(?P<season2>\d+)(?P<episode2>\d{2}))?.*?\s(?P<lang>.*)?"
|
||||||
else:
|
|
||||||
logger.debug("patron episodio: " + pattern)
|
|
||||||
logger.debug(info)
|
|
||||||
continue
|
|
||||||
|
|
||||||
|
if not scrapertools.find_single_match(info, pattern): #en caso de error de formato, creo uno básico
|
||||||
|
logger.debug("patron episodioOLD: " + pattern)
|
||||||
|
logger.debug(info)
|
||||||
|
info = '%s [%s][Cap.%s00][Español]' % (item.contentTitle, item.infoLabels['quality'], season)
|
||||||
r = re.compile(pattern)
|
r = re.compile(pattern)
|
||||||
match = [m.groupdict() for m in r.finditer(info)][0]
|
match = [m.groupdict() for m in r.finditer(info)][0]
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
@@ -133,7 +133,8 @@ def listado(item):
|
|||||||
|
|
||||||
for scrapedurl, scrapedtitle, scrapedthumbnail, title_alt, calidad in matches:
|
for scrapedurl, scrapedtitle, scrapedthumbnail, title_alt, calidad in matches:
|
||||||
url = scrapedurl
|
url = scrapedurl
|
||||||
title = scrapedtitle
|
title = scrapedtitle.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "")
|
||||||
|
title_alt = title_alt.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "")
|
||||||
thumbnail = scrapedthumbnail
|
thumbnail = scrapedthumbnail
|
||||||
action = "findvideos"
|
action = "findvideos"
|
||||||
extra = ""
|
extra = ""
|
||||||
@@ -209,10 +210,11 @@ def listado_busqueda(item):
|
|||||||
|
|
||||||
for url, thumb, title in matches:
|
for url, thumb, title in matches:
|
||||||
real_title = scrapertools.find_single_match(title, r'<strong.*?>(.*?)Temporada.*?<\/strong>') #series
|
real_title = scrapertools.find_single_match(title, r'<strong.*?>(.*?)Temporada.*?<\/strong>') #series
|
||||||
if real_title == "":
|
if not real_title:
|
||||||
real_title = scrapertools.find_single_match(title, r'(.*?)\[.*?]') #movies
|
real_title = scrapertools.find_single_match(title, r'(.*?)\[.*?]') #movies
|
||||||
real_title = scrapertools.remove_htmltags(real_title).decode('iso-8859-1').encode('utf-8')
|
real_title = scrapertools.remove_htmltags(real_title).decode('iso-8859-1').encode('utf-8')
|
||||||
real_title = scrapertools.htmlclean(real_title)
|
real_title = scrapertools.htmlclean(real_title)
|
||||||
|
real_title = real_title.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "").replace("de la Serie", "")
|
||||||
calidad = scrapertools.find_single_match(title, r'.*?\s*Calidad.*?<span[^>]+>[\[]\s*(?P<quality>.*?)\s*[\]]<\/span>') #series
|
calidad = scrapertools.find_single_match(title, r'.*?\s*Calidad.*?<span[^>]+>[\[]\s*(?P<quality>.*?)\s*[\]]<\/span>') #series
|
||||||
if calidad == "":
|
if calidad == "":
|
||||||
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
||||||
@@ -220,9 +222,8 @@ def listado_busqueda(item):
|
|||||||
|
|
||||||
# fix encoding for title
|
# fix encoding for title
|
||||||
title = scrapertools.htmlclean(title)
|
title = scrapertools.htmlclean(title)
|
||||||
title = title.replace("�", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng")
|
|
||||||
title = re.sub(r'(Calidad.*?\])', '', title)
|
title = re.sub(r'(Calidad.*?\])', '', title)
|
||||||
|
title = title.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "").replace("de la Serie", "")
|
||||||
if real_title == "":
|
if real_title == "":
|
||||||
real_title = title
|
real_title = title
|
||||||
if calidad == "":
|
if calidad == "":
|
||||||
@@ -236,18 +237,22 @@ def listado_busqueda(item):
|
|||||||
|
|
||||||
# Codigo para rescatar lo que se puede en pelisy.series.com de Series para la Videoteca. la URL apunta al capítulo y no a la Serie. Nombre de Serie frecuentemente en blanco. Se obtiene de Thumb, así como el id de la serie
|
# Codigo para rescatar lo que se puede en pelisy.series.com de Series para la Videoteca. la URL apunta al capítulo y no a la Serie. Nombre de Serie frecuentemente en blanco. Se obtiene de Thumb, así como el id de la serie
|
||||||
if ("/serie" in url or "-serie" in url) and "pelisyseries.com" in host:
|
if ("/serie" in url or "-serie" in url) and "pelisyseries.com" in host:
|
||||||
calidad_mps = "series/"
|
|
||||||
if "seriehd" in url:
|
if "seriehd" in url:
|
||||||
calidad_mps = "series-hd/"
|
calidad_mps = "series-hd/"
|
||||||
if "serievo" in url:
|
elif "serievo" in url:
|
||||||
calidad_mps = "series-vo/"
|
calidad_mps = "series-vo/"
|
||||||
if "serie-vo" in url:
|
elif "serie-vo" in url:
|
||||||
calidad_mps = "series-vo/"
|
calidad_mps = "series-vo/"
|
||||||
|
else:
|
||||||
|
calidad_mps = "series/"
|
||||||
|
|
||||||
real_title_mps = re.sub(r'.*?\/\d+_', '', thumb)
|
if "no_image" in thumb:
|
||||||
real_title_mps = re.sub(r'\.\w+.*?', '', real_title_mps)
|
real_title_mps = title
|
||||||
|
else:
|
||||||
|
real_title_mps = re.sub(r'.*?\/\d+_', '', thumb)
|
||||||
|
real_title_mps = re.sub(r'\.\w+.*?', '', real_title_mps)
|
||||||
|
|
||||||
if "/0_" not in thumb:
|
if "/0_" not in thumb and not "no_image" in thumb:
|
||||||
serieid = scrapertools.find_single_match(thumb, r'.*?\/\w\/(?P<serieid>\d+).*?.*')
|
serieid = scrapertools.find_single_match(thumb, r'.*?\/\w\/(?P<serieid>\d+).*?.*')
|
||||||
if len(serieid) > 5:
|
if len(serieid) > 5:
|
||||||
serieid = ""
|
serieid = ""
|
||||||
@@ -507,6 +512,11 @@ def episodios(item):
|
|||||||
"[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
"[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
||||||
if "Especial" in info: # Capitulos Especiales
|
if "Especial" in info: # Capitulos Especiales
|
||||||
pattern = ".*?[^>]+>.*?Temporada.*?\[.*?(?P<season>\d+).*?\].*?Capitulo.*?\[\s*(?P<episode>\d+).*?\]?(?:.*?(?P<episode2>\d+)?)<.+?<span[^>]+>(?P<lang>.*?)?<\/span>\s*Calidad\s*<span[^>]+>[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
pattern = ".*?[^>]+>.*?Temporada.*?\[.*?(?P<season>\d+).*?\].*?Capitulo.*?\[\s*(?P<episode>\d+).*?\]?(?:.*?(?P<episode2>\d+)?)<.+?<span[^>]+>(?P<lang>.*?)?<\/span>\s*Calidad\s*<span[^>]+>[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
||||||
|
|
||||||
|
if not scrapertools.find_single_match(info, pattern): #en caso de error de formato, creo uno básico
|
||||||
|
logger.debug("patron episodioNEW: " + pattern)
|
||||||
|
logger.debug(info)
|
||||||
|
info = '><strong>%sTemporada %s Capitulo 0</strong> - <span >Español Castellano</span> Calidad <span >[%s]</span>' % (item.contentTitle, season, item.infoLabels['quality'])
|
||||||
r = re.compile(pattern)
|
r = re.compile(pattern)
|
||||||
match = [m.groupdict() for m in r.finditer(info)][0]
|
match = [m.groupdict() for m in r.finditer(info)][0]
|
||||||
|
|
||||||
@@ -540,11 +550,11 @@ def episodios(item):
|
|||||||
"(?P<episode2>\d{2}))?.*?\].*?(?:\[(?P<lang>.*?)\])?"
|
"(?P<episode2>\d{2}))?.*?\].*?(?:\[(?P<lang>.*?)\])?"
|
||||||
elif scrapertools.find_single_match(info, 'Cap.\d{2,3}'):
|
elif scrapertools.find_single_match(info, 'Cap.\d{2,3}'):
|
||||||
pattern = ".*?Temp.*?\s(?P<quality>.*?)\s.*?Cap.(?P<season>\d).*?(?P<episode>\d{2})(?:_(?P<season2>\d+)(?P<episode2>\d{2}))?.*?\s(?P<lang>.*)?"
|
pattern = ".*?Temp.*?\s(?P<quality>.*?)\s.*?Cap.(?P<season>\d).*?(?P<episode>\d{2})(?:_(?P<season2>\d+)(?P<episode2>\d{2}))?.*?\s(?P<lang>.*)?"
|
||||||
else:
|
|
||||||
logger.debug("patron episodio: " + pattern)
|
|
||||||
logger.debug(info)
|
|
||||||
continue
|
|
||||||
|
|
||||||
|
if not scrapertools.find_single_match(info, pattern): #en caso de error de formato, creo uno básico
|
||||||
|
logger.debug("patron episodioOLD: " + pattern)
|
||||||
|
logger.debug(info)
|
||||||
|
info = '%s [%s][Cap.%s00][Español]' % (item.contentTitle, item.infoLabels['quality'], season)
|
||||||
r = re.compile(pattern)
|
r = re.compile(pattern)
|
||||||
match = [m.groupdict() for m in r.finditer(info)][0]
|
match = [m.groupdict() for m in r.finditer(info)][0]
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
@@ -133,7 +133,8 @@ def listado(item):
|
|||||||
|
|
||||||
for scrapedurl, scrapedtitle, scrapedthumbnail, title_alt, calidad in matches:
|
for scrapedurl, scrapedtitle, scrapedthumbnail, title_alt, calidad in matches:
|
||||||
url = scrapedurl
|
url = scrapedurl
|
||||||
title = scrapedtitle
|
title = scrapedtitle.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "")
|
||||||
|
title_alt = title_alt.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "")
|
||||||
thumbnail = scrapedthumbnail
|
thumbnail = scrapedthumbnail
|
||||||
action = "findvideos"
|
action = "findvideos"
|
||||||
extra = ""
|
extra = ""
|
||||||
@@ -209,10 +210,11 @@ def listado_busqueda(item):
|
|||||||
|
|
||||||
for url, thumb, title in matches:
|
for url, thumb, title in matches:
|
||||||
real_title = scrapertools.find_single_match(title, r'<strong.*?>(.*?)Temporada.*?<\/strong>') #series
|
real_title = scrapertools.find_single_match(title, r'<strong.*?>(.*?)Temporada.*?<\/strong>') #series
|
||||||
if real_title == "":
|
if not real_title:
|
||||||
real_title = scrapertools.find_single_match(title, r'(.*?)\[.*?]') #movies
|
real_title = scrapertools.find_single_match(title, r'(.*?)\[.*?]') #movies
|
||||||
real_title = scrapertools.remove_htmltags(real_title).decode('iso-8859-1').encode('utf-8')
|
real_title = scrapertools.remove_htmltags(real_title).decode('iso-8859-1').encode('utf-8')
|
||||||
real_title = scrapertools.htmlclean(real_title)
|
real_title = scrapertools.htmlclean(real_title)
|
||||||
|
real_title = real_title.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "").replace("de la Serie", "")
|
||||||
calidad = scrapertools.find_single_match(title, r'.*?\s*Calidad.*?<span[^>]+>[\[]\s*(?P<quality>.*?)\s*[\]]<\/span>') #series
|
calidad = scrapertools.find_single_match(title, r'.*?\s*Calidad.*?<span[^>]+>[\[]\s*(?P<quality>.*?)\s*[\]]<\/span>') #series
|
||||||
if calidad == "":
|
if calidad == "":
|
||||||
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
||||||
@@ -220,9 +222,8 @@ def listado_busqueda(item):
|
|||||||
|
|
||||||
# fix encoding for title
|
# fix encoding for title
|
||||||
title = scrapertools.htmlclean(title)
|
title = scrapertools.htmlclean(title)
|
||||||
title = title.replace("�", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng")
|
|
||||||
title = re.sub(r'(Calidad.*?\])', '', title)
|
title = re.sub(r'(Calidad.*?\])', '', title)
|
||||||
|
title = title.replace("�", "ñ").replace("ñ", "ñ").replace("Temp", " Temp").replace("Esp", " Esp").replace("Ing", " Ing").replace("Eng", " Eng").replace("Calidad", "").replace("de la Serie", "")
|
||||||
if real_title == "":
|
if real_title == "":
|
||||||
real_title = title
|
real_title = title
|
||||||
if calidad == "":
|
if calidad == "":
|
||||||
@@ -236,18 +237,22 @@ def listado_busqueda(item):
|
|||||||
|
|
||||||
# Codigo para rescatar lo que se puede en pelisy.series.com de Series para la Videoteca. la URL apunta al capítulo y no a la Serie. Nombre de Serie frecuentemente en blanco. Se obtiene de Thumb, así como el id de la serie
|
# Codigo para rescatar lo que se puede en pelisy.series.com de Series para la Videoteca. la URL apunta al capítulo y no a la Serie. Nombre de Serie frecuentemente en blanco. Se obtiene de Thumb, así como el id de la serie
|
||||||
if ("/serie" in url or "-serie" in url) and "pelisyseries.com" in host:
|
if ("/serie" in url or "-serie" in url) and "pelisyseries.com" in host:
|
||||||
calidad_mps = "series/"
|
|
||||||
if "seriehd" in url:
|
if "seriehd" in url:
|
||||||
calidad_mps = "series-hd/"
|
calidad_mps = "series-hd/"
|
||||||
if "serievo" in url:
|
elif "serievo" in url:
|
||||||
calidad_mps = "series-vo/"
|
calidad_mps = "series-vo/"
|
||||||
if "serie-vo" in url:
|
elif "serie-vo" in url:
|
||||||
calidad_mps = "series-vo/"
|
calidad_mps = "series-vo/"
|
||||||
|
else:
|
||||||
|
calidad_mps = "series/"
|
||||||
|
|
||||||
real_title_mps = re.sub(r'.*?\/\d+_', '', thumb)
|
if "no_image" in thumb:
|
||||||
real_title_mps = re.sub(r'\.\w+.*?', '', real_title_mps)
|
real_title_mps = title
|
||||||
|
else:
|
||||||
|
real_title_mps = re.sub(r'.*?\/\d+_', '', thumb)
|
||||||
|
real_title_mps = re.sub(r'\.\w+.*?', '', real_title_mps)
|
||||||
|
|
||||||
if "/0_" not in thumb:
|
if "/0_" not in thumb and not "no_image" in thumb:
|
||||||
serieid = scrapertools.find_single_match(thumb, r'.*?\/\w\/(?P<serieid>\d+).*?.*')
|
serieid = scrapertools.find_single_match(thumb, r'.*?\/\w\/(?P<serieid>\d+).*?.*')
|
||||||
if len(serieid) > 5:
|
if len(serieid) > 5:
|
||||||
serieid = ""
|
serieid = ""
|
||||||
@@ -507,6 +512,11 @@ def episodios(item):
|
|||||||
"[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
"[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
||||||
if "Especial" in info: # Capitulos Especiales
|
if "Especial" in info: # Capitulos Especiales
|
||||||
pattern = ".*?[^>]+>.*?Temporada.*?\[.*?(?P<season>\d+).*?\].*?Capitulo.*?\[\s*(?P<episode>\d+).*?\]?(?:.*?(?P<episode2>\d+)?)<.+?<span[^>]+>(?P<lang>.*?)?<\/span>\s*Calidad\s*<span[^>]+>[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
pattern = ".*?[^>]+>.*?Temporada.*?\[.*?(?P<season>\d+).*?\].*?Capitulo.*?\[\s*(?P<episode>\d+).*?\]?(?:.*?(?P<episode2>\d+)?)<.+?<span[^>]+>(?P<lang>.*?)?<\/span>\s*Calidad\s*<span[^>]+>[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
||||||
|
|
||||||
|
if not scrapertools.find_single_match(info, pattern): #en caso de error de formato, creo uno básico
|
||||||
|
logger.debug("patron episodioNEW: " + pattern)
|
||||||
|
logger.debug(info)
|
||||||
|
info = '><strong>%sTemporada %s Capitulo 0</strong> - <span >Español Castellano</span> Calidad <span >[%s]</span>' % (item.contentTitle, season, item.infoLabels['quality'])
|
||||||
r = re.compile(pattern)
|
r = re.compile(pattern)
|
||||||
match = [m.groupdict() for m in r.finditer(info)][0]
|
match = [m.groupdict() for m in r.finditer(info)][0]
|
||||||
|
|
||||||
@@ -540,11 +550,11 @@ def episodios(item):
|
|||||||
"(?P<episode2>\d{2}))?.*?\].*?(?:\[(?P<lang>.*?)\])?"
|
"(?P<episode2>\d{2}))?.*?\].*?(?:\[(?P<lang>.*?)\])?"
|
||||||
elif scrapertools.find_single_match(info, 'Cap.\d{2,3}'):
|
elif scrapertools.find_single_match(info, 'Cap.\d{2,3}'):
|
||||||
pattern = ".*?Temp.*?\s(?P<quality>.*?)\s.*?Cap.(?P<season>\d).*?(?P<episode>\d{2})(?:_(?P<season2>\d+)(?P<episode2>\d{2}))?.*?\s(?P<lang>.*)?"
|
pattern = ".*?Temp.*?\s(?P<quality>.*?)\s.*?Cap.(?P<season>\d).*?(?P<episode>\d{2})(?:_(?P<season2>\d+)(?P<episode2>\d{2}))?.*?\s(?P<lang>.*)?"
|
||||||
else:
|
|
||||||
logger.debug("patron episodio: " + pattern)
|
|
||||||
logger.debug(info)
|
|
||||||
continue
|
|
||||||
|
|
||||||
|
if not scrapertools.find_single_match(info, pattern): #en caso de error de formato, creo uno básico
|
||||||
|
logger.debug("patron episodioOLD: " + pattern)
|
||||||
|
logger.debug(info)
|
||||||
|
info = '%s [%s][Cap.%s00][Español]' % (item.contentTitle, item.infoLabels['quality'], season)
|
||||||
r = re.compile(pattern)
|
r = re.compile(pattern)
|
||||||
match = [m.groupdict() for m in r.finditer(info)][0]
|
match = [m.groupdict() for m in r.finditer(info)][0]
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
Reference in New Issue
Block a user