Update allcalidad.py
This commit is contained in:
@@ -75,12 +75,6 @@ def peliculas(item):
|
|||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
patron = '(?s)short_overlay.*?<a href="([^"]+)'
|
|
||||||
patron += '.*?img.*?src="([^"]+)'
|
|
||||||
patron += '.*?title="([^"]+)'
|
|
||||||
patron += '.*?kinopoisk">([^<]+)'
|
|
||||||
patron += '</span(.*?)small_rating'
|
|
||||||
|
|
||||||
patron = '(?s)short_overlay.*?<a href="([^"]+)'
|
patron = '(?s)short_overlay.*?<a href="([^"]+)'
|
||||||
patron += '.*?img.*?src="([^"]+)'
|
patron += '.*?img.*?src="([^"]+)'
|
||||||
patron += '.*?title="(.*?)"'
|
patron += '.*?title="(.*?)"'
|
||||||
@@ -118,13 +112,10 @@ def findvideos(item):
|
|||||||
bloque = scrapertools.find_single_match(data, patron)
|
bloque = scrapertools.find_single_match(data, patron)
|
||||||
match = scrapertools.find_multiple_matches(bloque, '(?is)(?:iframe|script) .*?src="([^"]+)')
|
match = scrapertools.find_multiple_matches(bloque, '(?is)(?:iframe|script) .*?src="([^"]+)')
|
||||||
for url in match:
|
for url in match:
|
||||||
server = servertools.get_server_from_url(url)
|
titulo = "Ver en: %s"
|
||||||
titulo = "Ver en: " + server
|
if "youtube" in url:
|
||||||
if "youtube" in server:
|
titulo = "[COLOR = yellow]Ver trailer: %s[/COLOR]"
|
||||||
if "embed" in url:
|
if "ad.js" in url or "script" in url:
|
||||||
url = "http://www.youtube.com/watch?v=" + scrapertools.find_single_match(url, 'embed/(.*)')
|
|
||||||
titulo = "[COLOR = yellow]Ver trailer: " + server + "[/COLOR]"
|
|
||||||
elif "directo" in server:
|
|
||||||
continue
|
continue
|
||||||
elif "vimeo" in url:
|
elif "vimeo" in url:
|
||||||
url += "|" + "http://www.allcalidad.com"
|
url += "|" + "http://www.allcalidad.com"
|
||||||
@@ -134,9 +125,10 @@ def findvideos(item):
|
|||||||
title = titulo,
|
title = titulo,
|
||||||
fulltitle = item.fulltitle,
|
fulltitle = item.fulltitle,
|
||||||
thumbnail = item.thumbnail,
|
thumbnail = item.thumbnail,
|
||||||
server = server,
|
server = "",
|
||||||
url = url
|
url = url
|
||||||
))
|
))
|
||||||
|
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||||
if itemlist:
|
if itemlist:
|
||||||
itemlist.append(Item(channel = item.channel))
|
itemlist.append(Item(channel = item.channel))
|
||||||
itemlist.append(item.clone(channel="trailertools", title="Buscar Tráiler", action="buscartrailer", context="",
|
itemlist.append(item.clone(channel="trailertools", title="Buscar Tráiler", action="buscartrailer", context="",
|
||||||
|
|||||||
Reference in New Issue
Block a user