Merge pull request #530 from Alfa-beto/fixes

Correcciones
This commit is contained in:
Alfa
2019-01-16 14:29:44 -05:00
committed by GitHub
4 changed files with 56 additions and 31 deletions

View File

@@ -33,8 +33,8 @@ tgenero = {"Comedia": "https://s7.postimg.cc/ne9g9zgwb/comedia.png",
host = "http://www.animeshd.tv"
__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'poseidonhd')
__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'poseidonhd')
__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'animeshd')
__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'animeshd')
IDIOMAS = {'Castellano':'CAST','Latino': 'LAT', 'Subtitulado': 'VOSE'}
@@ -215,16 +215,37 @@ def findvideos(item):
itemlist = []
data = get_source(item.url)
patron = "<option value=(.*?) data-content=.*?width='16'> (.*?) <span class='text-muted'>"
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:
if 'jpg' in scrapedurl:
vip_data = httptools.downloadpage(scrapedurl, follow_redirects=False)
scrapedurl = vip_data.headers['location']
vip = False
title = '%s [%s]'
itemlist.append(item.clone(title=title, url=scrapedurl.strip(), action='play',
language=IDIOMAS[language]))
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'))
vip = True
elif 'server' in scrapedurl:
new_data = get_source(scrapedurl)
scrapedurl = scrapertools.find_single_match(new_data, '<iframe src="([^"]+)"')
if not vip:
itemlist.append(item.clone(title=title, url=scrapedurl.strip(), action='play',
language=IDIOMAS[language]))
itemlist = servertools.get_servers_itemlist(itemlist, lambda x: x.title % (x.server.capitalize(), x.language))

View File

@@ -247,11 +247,11 @@ def findvideos(item):
quality=quality, infoLabels=item.infoLabels))
else:
if not 'vidoza' in video_url:
if not 'vidoza' in video_url and not 'pelishd' in video_url:
url_data = get_source(video_url)
if 'vidoza' not in video_url:
if 'vidoza' not in video_url and not 'pelishd' in video_url:
url = scrapertools.find_single_match(url_data, '<iframe src="([^"]+)"')
else:
url = video_url
@@ -262,11 +262,17 @@ def findvideos(item):
vip_data = httptools.downloadpage(url, headers={'Referer':item.url}, follow_redirects=False)
try:
dejuiced = generictools.dejuice(vip_data.data)
url = scrapertools.find_single_match(dejuiced, '"file":"([^"]+)"')
urls = scrapertools.find_multiple_matches(dejuiced, '"file":"([^"]+)","label":"([^"]+)"')
for new_url, quality in urls:
new_url = new_url.replace('unicorn', 'dragon')
new_url = new_url + '|referer:%s' % url
itemlist.append(
Item(channel=item.channel, title='%s' + title, url=new_url, action='play',
language=IDIOMAS[language], quality=quality, infoLabels=item.infoLabels))
except:
pass
if url != '' and 'rekovers' not in url:
if url != '' and 'rekovers' not in url and not 'pelishd' in url:
itemlist.append(Item(channel=item.channel, title='%s'+title, url=url, action='play', language=IDIOMAS[language],
infoLabels=item.infoLabels))

View File

@@ -154,15 +154,15 @@ def search(item, texto):
def findvideos(item):
logger.info()
itemlist = []
servers = {'netu': 'https://hqq.tv/player/embed_player.php?vid=',
servers = {'netu': 'http://hqq.tv/player/embed_player.php?vid=',
'open': 'https://openload.co/embed/',
'netv': 'http://goo.gl/',
'gamo': 'http://gamovideo.com/embed-',
'powvideo': 'http://powvideo.net/embed-',
'play': 'http://streamplay.to/embed-',
'vido': 'http://vidoza.net/embed-',
'net': 'https://hqq.tv/player/embed_player.php?vid=',
'ntu': 'https://hqq.tv/player/embed_player.php?vid='
'net': 'http://hqq.tv/player/embed_player.php?vid=',
'ntu': 'http://hqq.tv/player/embed_player.php?vid='
}
data = get_source(item.url)
noemitido = scrapertools.find_single_match(data, '<p><img src=(http://darkiller.com/images/subiendo.png) border=0\/><\/p>')

View File

@@ -86,7 +86,8 @@ def sub_menu(item):
logger.info()
itemlist = []
url = host + '/%s/es/ajax/1/' % item.type
url = host + '/%s/es/' % item.type
search_url = host + '/search/'
link_type = item.title.lower()
if link_type == 'streaming':
link_type = 'flash'
@@ -118,8 +119,8 @@ def sub_menu(item):
url=url + '?q=%s+subtitulado' % link_type, action='list_all',
thumbnail=get_thumb('vose', auto=True), type=item.type, send_lang='VOSE',
link_type=link_type))
itemlist.append(Item(channel=item.channel, title="Buscar", action="search", url=url + '?q=',
thumbnail=get_thumb("search", auto=True), type=item.type, link_type=link_type))
itemlist.append(Item(channel=item.channel, title="Buscar", action="search", url=search_url + '?q=',
thumbnail=get_thumb("search", auto=True), type='search', link_type=link_type))
return itemlist
@@ -144,7 +145,7 @@ def section(item):
for scrapedurl, scrapedtitle in matches:
title = scrapedtitle
url = host+scrapedurl.replace('/?','/ajax/1/?')
url = host+scrapedurl
if (item.title=='Generos' and title.lower() not in excluded and not title.isdigit()) or (item.title=='Por Año' and title.isdigit()):
itemlist.append(Item(channel=item.channel, url=url, title=title, action='list_all', type=item.type))
@@ -158,11 +159,8 @@ def list_all(item):
listed =[]
quality=''
infoLabels = {}
json_data= jsontools.load(get_source(item.url))
data = json_data['render']
data = re.sub(r'\n|\r|\t|&nbsp;|<br>|\s{2,}', "", data)
data= get_source(item.url, referer='%s/%s/es/' %(host, item.type))
#if item.type == 'peliculas':
patron = '<img class="cover".*?src="([^"]+)" data-id="\d+" '
patron +='alt="Ver ([^\(]+)(.*?)">'
patron += '<div class="mdl-card__menu"><a class="clean-link" href="([^"]+)">'
@@ -224,7 +222,7 @@ def list_all(item):
infoLabels = infoLabels
)
if item.type == 'peliculas' or item.type == 'all':
if item.type == 'peliculas' or item.type == 'all' or item.type == 'search':
new_item.contentTitle = scrapedtitle
else:
scrapedtitle = scrapedtitle.split(' - ')
@@ -237,12 +235,12 @@ def list_all(item):
itemlist.sort(key=lambda it: it.title)
# Paginación
if json_data['next']:
actual_page = scrapertools.find_single_match(item.url, 'ajax/(\d+)/')
next_page =int(actual_page) + 1
url_next_page = item.url.replace('ajax/%s' % actual_page, 'ajax/%s' % next_page)
itemlist.append(item.clone(title="Siguiente >>", url=url_next_page, type=item.type,
action='list_all', send_lang=item.send_lang))
# if json_data['next']:
# actual_page = scrapertools.find_single_match(item.url, 'ajax/(\d+)/')
# next_page =int(actual_page) + 1
# url_next_page = item.url.replace('ajax/%s' % actual_page, 'ajax/%s' % next_page)
# itemlist.append(item.clone(title="Siguiente >>", url=url_next_page, type=item.type,
# action='list_all', send_lang=item.send_lang))
return itemlist
@@ -304,7 +302,7 @@ def findvideos(item):
def search(item, texto):
logger.info()
texto = texto.replace(" ", "+")
item.url = item.url + texto
item.url = '%spelicula+%s+%s&o=2' % (item.url, texto, item.link_type)
if texto != '':
return list_all(item)