@@ -161,6 +161,7 @@ def findvideos(item):
|
||||
itemlist.extend(servertools.find_video_items(data=data))
|
||||
|
||||
for videoitem in itemlist:
|
||||
videoitem.channel = item.channel
|
||||
videoitem.title = '[%s]' % videoitem.server.capitalize()
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -324,7 +324,7 @@ def findvideos(item):
|
||||
url = server_url[server_id] + video_id + '.html'
|
||||
elif server_id == 'BitTorrent':
|
||||
import urllib
|
||||
base_url = '%sprotect/v.php' % host
|
||||
base_url = '%s/protect/v.php' % host
|
||||
post = {'i':video_id, 'title':item.title}
|
||||
post = urllib.urlencode(post)
|
||||
headers = {'Referer':item.url}
|
||||
|
||||
Executable → Regular
+1
-1
@@ -355,7 +355,7 @@ def findvideos(item):
|
||||
new_url = get_link(get_source(item.url))
|
||||
new_url = get_link(get_source(new_url))
|
||||
video_id = scrapertools.find_single_match(new_url, 'http.*?h=(\w+)')
|
||||
new_url = '%s%s' % (host, 'playeropstream/api.php')
|
||||
new_url = '%s%s' % (host.replace('.com','.tv'), 'playeropstream/api.php')
|
||||
post = {'h': video_id}
|
||||
post = urllib.urlencode(post)
|
||||
data = httptools.downloadpage(new_url, post=post).data
|
||||
|
||||
Executable → Regular
+2
@@ -519,6 +519,7 @@ def findvideos(item):
|
||||
if item.video_urls:
|
||||
import random
|
||||
import base64
|
||||
|
||||
item.video_urls.sort(key=lambda it: (it[1], random.random()), reverse=True)
|
||||
i = 0
|
||||
actual_quality = ""
|
||||
@@ -534,6 +535,7 @@ def findvideos(item):
|
||||
title += " [COLOR green]Mirror %s[/COLOR] - %s" % (str(i + 1), item.fulltitle)
|
||||
url = vid % "%s" % base64.b64decode("dHQ9MTQ4MDE5MDQ1MSZtbT1NRzZkclhFand6QmVzbmxSMHNZYXhBJmJiPUUwb1dVVVgx"
|
||||
"WTBCQTdhWENpeU9paUE=")
|
||||
url += '|User-Agent=%s' % httptools.get_user_agent
|
||||
itemlist.append(item.clone(title=title, action="play", url=url, video_urls=""))
|
||||
i += 1
|
||||
|
||||
|
||||
@@ -356,7 +356,7 @@ def get_links_by_language(item, data):
|
||||
patron = 'data-source=(.*?)data.*?srt=(.*?)data-iframe.*?Opci.*?<.*?hidden>[^\(]\((.*?)\)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
if language in IDIOMAS:
|
||||
language == IDIOMAS[language]
|
||||
language = IDIOMAS[language]
|
||||
|
||||
for url, sub, quality in matches:
|
||||
if 'http' not in url:
|
||||
@@ -403,7 +403,7 @@ def findvideos(item):
|
||||
i.quality) )
|
||||
# Requerido para FilterTools
|
||||
|
||||
itemlist = filtertools.get_links(video_list, item, list_language)
|
||||
video_list = filtertools.get_links(video_list, item, list_language)
|
||||
|
||||
# Requerido para AutoPlay
|
||||
|
||||
|
||||
@@ -620,7 +620,7 @@ def play(item):
|
||||
data['a']['tt']) + \
|
||||
"&mm=" + data['a']['mm'] + "&bb=" + data['a']['bb']
|
||||
|
||||
url += "|User-Agent=Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Mobile Safari/537.36"
|
||||
url += "|User-Agent=%s" % httptools.get_user_agent
|
||||
|
||||
itemlist.append(item.clone(action="play", server="directo", url=url, folder=False))
|
||||
|
||||
|
||||
Executable → Regular
+14
@@ -19,6 +19,20 @@
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostrar enlaces en idioma...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"No filtrar",
|
||||
"LAT",
|
||||
"CAST",
|
||||
"VOSE"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_latino",
|
||||
"type": "bool",
|
||||
|
||||
@@ -8,6 +8,7 @@ from core import servertools
|
||||
from core import jsontools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from channels import filtertools, autoplay
|
||||
from platformcode import config, logger
|
||||
|
||||
host = 'http://www.ultrapeliculashd.com'
|
||||
@@ -63,39 +64,51 @@ tcalidad = {'1080P': 'https://s21.postimg.cc/4h1s0t1wn/hd1080.png',
|
||||
'720P': 'https://s12.postimg.cc/lthu7v4q5/hd720.png', "HD": "https://s27.postimg.cc/m2dhhkrur/image.png"}
|
||||
|
||||
|
||||
IDIOMAS = {'Latino': 'LAT', 'Español': 'CAST', 'SUB':'VOSE'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_quality = ['default', '1080p']
|
||||
list_servers = ['openload','directo']
|
||||
|
||||
__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'ultrapeliculashd')
|
||||
__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'ultrapeliculashd')
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist = []
|
||||
|
||||
itemlist.append(item.clone(title="Todas",
|
||||
action="lista",
|
||||
thumbnail='https://s18.postimg.cc/fwvaeo6qh/todas.png',
|
||||
fanart='https://s18.postimg.cc/fwvaeo6qh/todas.png',
|
||||
url=host + '/movies/'
|
||||
))
|
||||
itemlist.append(Item(channel=item.channel, title="Todas",
|
||||
action="lista",
|
||||
thumbnail='https://s18.postimg.cc/fwvaeo6qh/todas.png',
|
||||
fanart='https://s18.postimg.cc/fwvaeo6qh/todas.png',
|
||||
url=host + '/movies/'
|
||||
))
|
||||
|
||||
itemlist.append(item.clone(title="Generos",
|
||||
action="generos",
|
||||
url=host,
|
||||
thumbnail='https://s3.postimg.cc/5s9jg2wtf/generos.png',
|
||||
fanart='https://s3.postimg.cc/5s9jg2wtf/generos.png'
|
||||
))
|
||||
itemlist.append(Item(channel=item.channel, title="Generos",
|
||||
action="generos",
|
||||
url=host,
|
||||
thumbnail='https://s3.postimg.cc/5s9jg2wtf/generos.png',
|
||||
fanart='https://s3.postimg.cc/5s9jg2wtf/generos.png'
|
||||
))
|
||||
|
||||
itemlist.append(item.clone(title="Alfabetico",
|
||||
action="seccion",
|
||||
url=host,
|
||||
thumbnail='https://s17.postimg.cc/fwi1y99en/a-z.png',
|
||||
fanart='https://s17.postimg.cc/fwi1y99en/a-z.png',
|
||||
extra='alfabetico'
|
||||
))
|
||||
itemlist.append(Item(channel=item.channel, title="Alfabetico",
|
||||
action="seccion",
|
||||
url=host,
|
||||
thumbnail='https://s17.postimg.cc/fwi1y99en/a-z.png',
|
||||
fanart='https://s17.postimg.cc/fwi1y99en/a-z.png',
|
||||
extra='alfabetico'
|
||||
))
|
||||
|
||||
itemlist.append(item.clone(title="Buscar",
|
||||
action="search",
|
||||
url=host + '/?s=',
|
||||
thumbnail='https://s30.postimg.cc/pei7txpa9/buscar.png',
|
||||
fanart='https://s30.postimg.cc/pei7txpa9/buscar.png'
|
||||
))
|
||||
itemlist.append(Item(channel=item.channel, title="Buscar",
|
||||
action="search",
|
||||
url=host + '/?s=',
|
||||
thumbnail='https://s30.postimg.cc/pei7txpa9/buscar.png',
|
||||
fanart='https://s30.postimg.cc/pei7txpa9/buscar.png'
|
||||
))
|
||||
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -160,13 +173,13 @@ def generos(item):
|
||||
title = scrapedtitle
|
||||
url = scrapedurl
|
||||
if scrapedtitle not in ['PRÓXIMAMENTE', 'EN CINE']:
|
||||
itemlist.append(item.clone(action="lista",
|
||||
title=title,
|
||||
fulltitle=item.title,
|
||||
url=url,
|
||||
thumbnail=thumbnail,
|
||||
fanart=fanart
|
||||
))
|
||||
itemlist.append(Item(channel=item.channel, action="lista",
|
||||
title=title,
|
||||
fulltitle=item.title,
|
||||
url=url,
|
||||
thumbnail=thumbnail,
|
||||
fanart=fanart
|
||||
))
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -209,15 +222,33 @@ def alpha(item):
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
from lib import jsunpack
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
||||
patron = '<iframe.*?rptss src=(.*?) (?:width.*?|frameborder.*?) allowfullscreen><\/iframe>'
|
||||
patron = '<div id=(option.*?) class=play.*?<iframe.*?'
|
||||
patron += 'rptss src=(.*?) (?:width.*?|frameborder.*?) allowfullscreen><\/iframe>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for video_url in matches:
|
||||
if 'stream' in video_url and 'streamango' not in video_url:
|
||||
for option, video_url in matches:
|
||||
language = scrapertools.find_single_match(data, '#%s>.*?-->(.*?)(?:\s|<)' % option)
|
||||
if 'sub' in language.lower():
|
||||
language = 'SUB'
|
||||
language = IDIOMAS[language]
|
||||
if 'ultrapeliculashd' in video_url:
|
||||
new_data = httptools.downloadpage(video_url).data
|
||||
new_data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", new_data)
|
||||
if 'drive' not in video_url:
|
||||
quality= '1080p'
|
||||
packed = scrapertools.find_single_match(new_data, '<script>(eval\(.*?)eval')
|
||||
unpacked = jsunpack.unpack(packed)
|
||||
url = scrapertools.find_single_match(unpacked, 'file:(http.?:.*?)\}')
|
||||
else:
|
||||
quality= '1080p'
|
||||
url = scrapertools.find_single_match(new_data, '</div><iframe src=([^\s]+) webkitallowfullscreen')
|
||||
|
||||
elif 'stream' in video_url and 'streamango' not in video_url:
|
||||
data = httptools.downloadpage('https:'+video_url).data
|
||||
if not 'iframe' in video_url:
|
||||
new_url=scrapertools.find_single_match(data, 'iframe src="(.*?)"')
|
||||
@@ -233,26 +264,42 @@ def findvideos(item):
|
||||
url = url.replace('download', 'preview')+headers_string
|
||||
|
||||
sub = scrapertools.find_single_match(new_data, 'file:.*?"(.*?srt)"')
|
||||
new_item = (Item(title=item.title, url=url, quality=quality, subtitle=sub, server='directo'))
|
||||
new_item = (Item(title=item.title, url=url, quality=quality, subtitle=sub, server='directo',
|
||||
language = language))
|
||||
itemlist.append(new_item)
|
||||
|
||||
else:
|
||||
itemlist.extend(servertools.find_video_items(data=video_url))
|
||||
url = video_url
|
||||
quality = 'default'
|
||||
|
||||
for videoitem in itemlist:
|
||||
videoitem.channel = item.channel
|
||||
videoitem.action = 'play'
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
videoitem.infoLabels = item.infoLabels
|
||||
videoitem.title = item.contentTitle + ' (' + videoitem.server + ')'
|
||||
if 'youtube' in videoitem.url:
|
||||
videoitem.title = '[COLOR orange]Trailer en Youtube[/COLOR]'
|
||||
if not config.get_setting("unify"):
|
||||
title = ' [%s] [%s]' % (quality, language)
|
||||
else:
|
||||
title = ''
|
||||
|
||||
itemlist = servertools.get_servers_itemlist(itemlist)
|
||||
new_item = (Item(channel=item.channel, title='%s'+title, url=url, action='play', quality=quality,
|
||||
language=language, infoLabels=item.infoLabels))
|
||||
itemlist.append(new_item)
|
||||
|
||||
|
||||
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__)
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
|
||||
@@ -221,7 +221,7 @@ def findvideos(item):
|
||||
language = ''
|
||||
if 'latino' in link.lower():
|
||||
language='Latino'
|
||||
elif 'español' in link.lower():
|
||||
elif 'espaÑol' in link.lower():
|
||||
language = 'Español'
|
||||
elif 'subtitulado' in link.lower():
|
||||
language = 'VOSE'
|
||||
|
||||
Executable → Regular
+3
@@ -56,6 +56,9 @@ default_headers["Accept-Encoding"] = "gzip"
|
||||
HTTPTOOLS_DEFAULT_DOWNLOAD_TIMEOUT = config.get_setting('httptools_timeout', default=15)
|
||||
if HTTPTOOLS_DEFAULT_DOWNLOAD_TIMEOUT == 0: HTTPTOOLS_DEFAULT_DOWNLOAD_TIMEOUT = None
|
||||
|
||||
def get_user_agent():
|
||||
# Devuelve el user agent global para ser utilizado cuando es necesario para la url.
|
||||
return default_headers["User-Agent"]
|
||||
|
||||
def get_url_headers(url):
|
||||
domain_cookies = cj._cookies.get("." + urlparse.urlparse(url)[1], {}).get("/", {})
|
||||
|
||||
Reference in New Issue
Block a user