From 0c891a375385a69d05dddd1403a03049d5feaf3a Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Sat, 17 Feb 2018 12:01:15 -0500 Subject: [PATCH 01/17] youtube: fix --- plugin.video.alfa/servers/youtube.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.video.alfa/servers/youtube.py b/plugin.video.alfa/servers/youtube.py index 989cfde6..5a398635 100755 --- a/plugin.video.alfa/servers/youtube.py +++ b/plugin.video.alfa/servers/youtube.py @@ -17,7 +17,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= page_url = "http://www.youtube.com/watch?v=%s" % page_url logger.info(" page_url->'%s'" % page_url) - video_id = scrapertools.find_single_match(page_url, 'v=([A-z0-9_-]{11})') + video_id = scrapertools.find_single_match(page_url, '(?:v=|embed/)([A-z0-9_-]{11})') video_urls = extract_videos(video_id) video_urls.reverse() From 82fe2b67c9ffdbc58c920691f32d596e876c8e0a Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 19 Feb 2018 11:34:27 -0500 Subject: [PATCH 02/17] flashx: fix --- plugin.video.alfa/servers/flashx.py | 32 +++++++++++------------------ 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/plugin.video.alfa/servers/flashx.py b/plugin.video.alfa/servers/flashx.py index 6c33cac0..6efb18d0 100644 --- a/plugin.video.alfa/servers/flashx.py +++ b/plugin.video.alfa/servers/flashx.py @@ -13,21 +13,13 @@ from platformcode import config, logger def test_video_exists(page_url): logger.info("(page_url='%s')" % page_url) - data = httptools.downloadpage(page_url, cookies=False).data - if 'file was deleted' in data: - return False, "[FlashX] El archivo no existe o ha sido borrado" - elif 'File Not Found' in data: - return False, "[FlashX] El archivo no existe" - elif 'Video is processing now' in data: - return False, "[FlashX] El archivo se está procesando" - return True, "" def get_video_url(page_url, premium=False, user="", password="", video_password=""): logger.info("url=" + page_url) pfxfx = "" - headers = {'Host': 'www.flashx.tv', + headers = {'Host': 'www.flashx.sx', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Language': 'en-US,en;q=0.5', @@ -35,11 +27,11 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= 'Cookie': ''} data = httptools.downloadpage(page_url, cookies=False).data data = data.replace("\n","") - cgi_counter = scrapertools.find_single_match(data, """(?is)src=.(https://www.flashx.tv/counter.cgi.*?[^(?:'|")]+)""") + cgi_counter = scrapertools.find_single_match(data, """(?is)src=.(https://www.flashx.sx/counter.cgi.*?[^(?:'|")]+)""") cgi_counter = cgi_counter.replace("%0A","").replace("%22","") - playnow = scrapertools.find_single_match(data, 'https://www.flashx.tv/dl[^"]+') + playnow = scrapertools.find_single_match(data, 'https://www.flashx.sx/dl[^"]+') # Para obtener el f y el fxfx - js_fxfx = "https://www." + scrapertools.find_single_match(data.replace("//","/"), """(?is)(flashx.tv/js\w+/c\w+.*?[^(?:'|")]+)""") + js_fxfx = "https://www." + scrapertools.find_single_match(data.replace("//","/"), """(?is)(flashx.sx/js\w+/c\w+.*?[^(?:'|")]+)""") 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+)') @@ -49,19 +41,20 @@ 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.tv/flashx.php?%s' %pfxfx + coding_url = 'https://www.flashx.sx/flashx.php?%s' %pfxfx # {f: 'y', fxfx: '6'} - flashx_id = scrapertools.find_single_match(data, 'name="id" value="([^"]+)"') - fname = scrapertools.find_single_match(data, 'name="fname" value="([^"]+)"') - hash_f = scrapertools.find_single_match(data, 'name="hash" value="([^"]+)"') - imhuman = scrapertools.find_single_match(data, "value='([^']+)' name='imhuman'") + bloque = scrapertools.find_single_match(data, '(?s)Form method="POST" action(.*?)