From 5e828f73b1ae82001f617eabb037674917878bde Mon Sep 17 00:00:00 2001 From: Intel1 Date: Tue, 14 Aug 2018 17:58:05 -0500 Subject: [PATCH] flashx: fix --- plugin.video.alfa/servers/flashx.json | 4 ++++ plugin.video.alfa/servers/flashx.py | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/plugin.video.alfa/servers/flashx.json b/plugin.video.alfa/servers/flashx.json index 20c5e9ff..a43573b3 100644 --- a/plugin.video.alfa/servers/flashx.json +++ b/plugin.video.alfa/servers/flashx.json @@ -6,6 +6,10 @@ { "pattern": "flashx.(?:tv|pw|ws|sx|to)/(?:embed.php\\?c=|embed-|playvid-|)([A-z0-9]+)", "url": "https://www.flashx.tv/\\1.html" + }, + { + "pattern": "flashx.co/([A-z0-9]+).jsp", + "url": "https://www.flashx.to/\\1.jsp" } ] }, diff --git a/plugin.video.alfa/servers/flashx.py b/plugin.video.alfa/servers/flashx.py index 987ea410..d752b14b 100644 --- a/plugin.video.alfa/servers/flashx.py +++ b/plugin.video.alfa/servers/flashx.py @@ -17,15 +17,16 @@ def test_video_exists(page_url): def get_video_url(page_url, premium=False, user="", password="", video_password=""): + domain_fx = "(?:co|tv)" logger.info("url=" + page_url) pfxfx = "" data = httptools.downloadpage(page_url, cookies=False).data data = data.replace("\n","") - cgi_counter = scrapertools.find_single_match(data, """(?is)src=.(https://www.flashx.co/counter.cgi.*?[^(?:'|")]+)""") + cgi_counter = scrapertools.find_single_match(data, """(?is)src=.(https://www.flashx.%s/counter.cgi.*?[^(?:'|")]+)""" %domain_fx) cgi_counter = cgi_counter.replace("%0A","").replace("%22","") - playnow = scrapertools.find_single_match(data, 'https://www.flashx.co/dl[^"]+') + playnow = scrapertools.find_single_match(data, 'https://www.flashx.%s/dl[^"]+' %domain_fx) # Para obtener el f y el fxfx - js_fxfx = "https://www." + scrapertools.find_single_match(data.replace("//","/"), """(?is)(flashx.co/js\w+/c\w+.*?[^(?:'|")]+)""") + js_fxfx = "https://www." + scrapertools.find_single_match(data.replace("//","/"), """(?is)(flashx.%s/js\w+/c\w+.*?[^(?:'|")]+)""" %domain_fx) 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+)') @@ -35,7 +36,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= logger.info("mfxfxfx2= %s" %pfxfx) if pfxfx == "": pfxfx = "ss=yes&f=fail&fxfx=6" - coding_url = 'https://www.flashx.co/flashx.php?%s' %pfxfx + coding_url = 'https://www.flashx.co/flashx.php?%s' %(pfxfx) # {f: 'y', fxfx: '6'} bloque = scrapertools.find_single_match(data, '(?s)Form method="POST" action(.*?)span') flashx_id = scrapertools.find_single_match(bloque, 'name="id" value="([^"]+)"')