From bd68b83b6c2c1fa4332f146e51bae5aaef383053 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Wed, 1 Nov 2017 06:47:51 -0500 Subject: [PATCH 01/11] flashx: fix --- plugin.video.alfa/servers/flashx.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin.video.alfa/servers/flashx.py b/plugin.video.alfa/servers/flashx.py index 9730b95d..169c0a54 100644 --- a/plugin.video.alfa/servers/flashx.py +++ b/plugin.video.alfa/servers/flashx.py @@ -37,12 +37,16 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= cgi_counter = cgi_counter.replace("%0A","").replace("%22","") playnow = scrapertools.find_single_match(data, 'https://www.flashx.tv/dl[^"]+') # Para obtener el f y el fxfx - js_fxfx = "https://www." + scrapertools.find_single_match(data, """(?is)(flashx.tv/js/code.js.*?[^(?:'|")]+)""") + js_fxfx = "https://www." + scrapertools.find_single_match(data.replace("//","/"), """(?is)(flashx.tv/js/code.js.*?[^(?:'|")]+)""") data_fxfx = httptools.downloadpage(js_fxfx).data mfxfx = scrapertools.find_single_match(data_fxfx, 'get.*?({.*?})').replace("'","").replace(" ","") matches = scrapertools.find_multiple_matches(mfxfx, '(\w+):(\w+)') for f, v in matches: pfxfx += f + "=" + v + "&" + logger.info("mfxfxfx1= %s" %js_fxfx) + logger.info("mfxfxfx2= %s" %pfxfx) + if pfxfx == "": + pfxfx = "f=fail&fxfx=6" coding_url = 'https://www.flashx.tv/flashx.php?%s' %pfxfx # {f: 'y', fxfx: '6'} flashx_id = scrapertools.find_single_match(data, 'name="id" value="([^"]+)"') From 267c9d80315c4a94dd24a71132d39d4435990556 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Fri, 3 Nov 2017 10:07:46 -0500 Subject: [PATCH 02/11] gvideo: fix --- plugin.video.alfa/servers/gvideo.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/plugin.video.alfa/servers/gvideo.py b/plugin.video.alfa/servers/gvideo.py index 7ed9570c..8cb31f7a 100644 --- a/plugin.video.alfa/servers/gvideo.py +++ b/plugin.video.alfa/servers/gvideo.py @@ -30,12 +30,20 @@ def get_video_url(page_url, user="", password="", video_password=""): streams =[] logger.debug('page_url: %s'%page_url) if 'googleusercontent' in page_url: - data = httptools.downloadpage(page_url, follow_redirects = False, headers={"Referer": page_url}) - url=data.headers['location'] + + response = httptools.downloadpage(page_url, follow_redirects = False, cookies=False, headers={"Referer": page_url}) + url=response.headers['location'] + cookies = "" + cookie = response.headers["set-cookie"].split("HttpOnly, ") + for c in cookie: + cookies += c.split(";", 1)[0] + "; " + data = response.data.decode('unicode-escape') + data = urllib.unquote_plus(urllib.unquote_plus(data)) + headers_string = "|Cookie=" + cookies + quality = scrapertools.find_single_match (url, '.itag=(\d+).') streams.append((quality, url)) - headers_string="" else: response = httptools.downloadpage(page_url, cookies=False, headers={"Referer": page_url}) From 9cc30152f89d9696ad7ab6ee24964614e53b405a Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Fri, 3 Nov 2017 10:15:27 -0500 Subject: [PATCH 03/11] vshare: actualizado patron --- plugin.video.alfa/servers/vshare.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.video.alfa/servers/vshare.json b/plugin.video.alfa/servers/vshare.json index 04faa1bb..8752af78 100644 --- a/plugin.video.alfa/servers/vshare.json +++ b/plugin.video.alfa/servers/vshare.json @@ -3,8 +3,8 @@ "find_videos": { "patterns": [ { - "pattern": "(http://vshare.io/v/[\\w]+[^\"']*)[\"']", - "url": "\\1" + "pattern": "(vshare.io/v/[a-zA-Z0-9/-]+)", + "url": "http://\\1" } ] }, From 506e68e8a35db847a55b20edd8c6ea244144d305 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Fri, 3 Nov 2017 10:17:12 -0500 Subject: [PATCH 04/11] vshare: cambiado el orden de resoluciones --- plugin.video.alfa/servers/vshare.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugin.video.alfa/servers/vshare.py b/plugin.video.alfa/servers/vshare.py index d475229b..23a8ddfe 100644 --- a/plugin.video.alfa/servers/vshare.py +++ b/plugin.video.alfa/servers/vshare.py @@ -40,11 +40,8 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= arrayResult = [chr(int(value) - substract) for value in fields.group(1).split(",")] strResult = "".join(arrayResult) logger.debug(strResult) - videoSources = re.findall("[^\"']+)[^>]+label=[\"'](?P