From 31bbe6aa485dc0b385e45c88cb11978cdd0dbf60 Mon Sep 17 00:00:00 2001 From: pipcat Date: Sun, 22 Jul 2018 12:45:35 +0200 Subject: [PATCH] Vidoza, detectar tb file: --- plugin.video.alfa/servers/vidoza.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugin.video.alfa/servers/vidoza.py b/plugin.video.alfa/servers/vidoza.py index 91f18fce..934b902d 100755 --- a/plugin.video.alfa/servers/vidoza.py +++ b/plugin.video.alfa/servers/vidoza.py @@ -23,18 +23,19 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= video_urls = [] s = scrapertools.find_single_match(data, 'sourcesCode\s*:\s*(\[\{.*?\}\])') - s = s.replace('src:', '"src":').replace('type:', '"type":').replace('label:', '"label":').replace('res:', '"res":') + s = s.replace('src:', '"src":').replace('file:', '"file":').replace('type:', '"type":').replace('label:', '"label":').replace('res:', '"res":') try: data = jsontools.load(s) for enlace in data: - if 'src' in enlace: + if 'src' in enlace or 'file' in enlace: + url = enlace['src'] if 'src' in enlace else enlace['file'] tit = '' if 'label' in enlace: tit += '[%s]' % enlace['label'] if 'res' in enlace: tit += '[%s]' % enlace['res'] if tit == '' and 'type' in enlace: tit = enlace['type'] if tit == '': tit = '.mp4' - video_urls.append(["%s [vidoza]" % tit, enlace['src']]) + video_urls.append(["%s [vidoza]" % tit, url]) except: logger.debug('No se detecta json %s' % s) pass