From 5fa341950ccaea092c5281a7dab739a40bffb4e4 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Sat, 21 Oct 2017 12:12:34 -0500 Subject: [PATCH 01/18] flashx: fix again --- plugin.video.alfa/servers/flashx.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/plugin.video.alfa/servers/flashx.py b/plugin.video.alfa/servers/flashx.py index bac474c1..e962aa9a 100644 --- a/plugin.video.alfa/servers/flashx.py +++ b/plugin.video.alfa/servers/flashx.py @@ -32,13 +32,18 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= 'Accept-Encoding': 'gzip, deflate, br', 'Connection': 'keep-alive', 'Upgrade-Insecure-Requests': '1', 'Cookie': ''} data = httptools.downloadpage(page_url, headers=headers, replace_headers=True).data + data = data.replace("\n","") + cgi_counter = scrapertools.find_single_match(data, '(?s)SRC="(https://www.flashx.tv/counter.cgi\?fx=[^"]+)') + 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 = scrapertools.find_single_match(data, 'src="(https://www.flashx.tv/js/code.js\?cache=[0-9]+)') + js_fxfx = scrapertools.find_single_match(data, 'src="(https://www.flashx.tv/js/code.js.*?cache=[0-9]+)') 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 + "&" + coding_url = 'https://www.flashx.tv/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="([^"]+)"') @@ -51,10 +56,11 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= headers['Referer'] = "https://www.flashx.tv/" headers['Accept'] = "*/*" headers['Host'] = "www.flashx.tv" - - coding_url = 'https://www.flashx.tv/flashx.php?%s' %pfxfx headers['X-Requested-With'] = 'XMLHttpRequest' - httptools.downloadpage(coding_url, headers=headers) + + # Obligatorio descargar estos 2 archivos, porque si no, muestra error + httptools.downloadpage(coding_url, headers=headers, replace_headers=True) + httptools.downloadpage(cgi_counter, headers=headers, replace_headers=True) try: time.sleep(int(wait_time) + 1) @@ -63,7 +69,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= headers.pop('X-Requested-With') headers['Content-Type'] = 'application/x-www-form-urlencoded' - data = httptools.downloadpage('https://www.flashx.tv/dl?playitnow', post, headers, replace_headers=True).data + data = httptools.downloadpage(playnow, post, headers, replace_headers=True).data # Si salta aviso, se carga la pagina de comprobacion y luego la inicial # LICENSE GPL3, de alfa-addon: https://github.com/alfa-addon/ ES OBLIGATORIO AÑADIR ESTAS LÍNEAS @@ -71,7 +77,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= url_reload = scrapertools.find_single_match(data, 'try to reload the page.*?href="([^"]+)"') try: data = httptools.downloadpage(url_reload, cookies=False).data - data = httptools.downloadpage('https://www.flashx.tv/dl?playitnow', post, headers, replace_headers=True).data + data = httptools.downloadpage(playnow, post, headers, replace_headers=True).data # LICENSE GPL3, de alfa-addon: https://github.com/alfa-addon/ ES OBLIGATORIO AÑADIR ESTAS LÍNEAS except: pass From 107262cef337a55a65297131f3055e7cd859f14c Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 23 Oct 2017 10:38:23 -0500 Subject: [PATCH 02/18] cinetux: patron actualizado --- plugin.video.alfa/channels/cinetux.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin.video.alfa/channels/cinetux.py b/plugin.video.alfa/channels/cinetux.py index 39a48373..a2c86f67 100644 --- a/plugin.video.alfa/channels/cinetux.py +++ b/plugin.video.alfa/channels/cinetux.py @@ -30,7 +30,7 @@ def mainlist(item): data = httptools.downloadpage(CHANNEL_HOST).data total = scrapertools.find_single_match(data, "TENEMOS\s(.*?)") - titulo = "Peliculas (%s)" % total + titulo = "Peliculas" itemlist.append(item.clone(title=titulo, text_color=color2, action="", text_bold=True)) itemlist.append(item.clone(action="peliculas", title=" Novedades", url=CHANNEL_HOST + "pelicula", thumbnail="https://raw.githubusercontent.com/master-1970/resources/master/images/genres" @@ -283,7 +283,7 @@ def bloque_enlaces(data, filtro_idioma, dict_idiomas, type, item): if type == "descarga": t_tipo = "Descargar" data = data.replace("\n", "") if type == "online": - patron = '(?is)class="playex.*?visualizaciones' + patron = '(?is)class="playex.*?sheader' bloque1 = scrapertools.find_single_match(data, patron) patron = '(?is)#(option-[^"]+).*?png">([^<]+)' match = scrapertools.find_multiple_matches(data, patron) @@ -303,7 +303,7 @@ def bloque_enlaces(data, filtro_idioma, dict_idiomas, type, item): bloque2 = scrapertools.find_single_match(data, '(?s)box_links.*?dt_social_single') bloque2 = bloque2.replace("\t", "").replace("\r", "") patron = '(?s)optn" href="([^"]+)' - patron += '.*?title="([^\.]+)' + patron += '.*?alt="([^\.]+)' patron += '.*?src.*?src="[^>]+"?/>([^<]+)' patron += '.*?src="[^>]+"?/>([^<]+)' patron += '.*?/span>([^<]+)' From 4dcc6395bebcdb7ae15576c9aced11120fc46639 Mon Sep 17 00:00:00 2001 From: danielr460 Date: Mon, 23 Oct 2017 11:37:53 -0500 Subject: [PATCH 03/18] Arreglos Menores --- plugin.video.alfa/channels/cartoonlatino.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin.video.alfa/channels/cartoonlatino.py b/plugin.video.alfa/channels/cartoonlatino.py index 98e1676d..47acdacb 100644 --- a/plugin.video.alfa/channels/cartoonlatino.py +++ b/plugin.video.alfa/channels/cartoonlatino.py @@ -73,6 +73,7 @@ def lista_gen(item): Item(channel=item.channel, title=title, url=scrapedurl, thumbnail=scrapedthumbnail, action="episodios", show=scrapedtitle, context=renumbertools.context(item))) tmdb.set_infoLabels(itemlist) + logger.info("Prueba git"+item.title) # Paginacion patron_pag = '
  • ') - data = scrapertools.find_single_match(data, '
    (.*?)
    (.*?).+?' '
    (.*?)
    .+?class="full">(.*?)

    ', re.DOTALL).findall(data) - itemlist = [] - for thumbnail, url, title, genres, plot in matches: title = clean_title(title) url = urlparse.urljoin(HOST, url) thumbnail = urlparse.urljoin(HOST, thumbnail) - new_item = Item(channel=item.channel, action="episodios", title=title, url=url, thumbnail=thumbnail, fulltitle=title, plot=plot) @@ -192,28 +185,22 @@ def listado(item): else: new_item.show = title new_item.context = renumbertools.context(item) - itemlist.append(new_item) - if url_pagination: url = urlparse.urljoin(HOST, url_pagination) title = ">> Pagina Siguiente" itemlist.append(Item(channel=item.channel, action="listado", title=title, url=url)) - return itemlist def episodios(item): logger.info() itemlist = [] - data = httptools.downloadpage(item.url).data data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", data) - if item.plot == "": item.plot = scrapertools.find_single_match(data, 'Description[^>]+>

    (.*?)

    ') - data = scrapertools.find_single_match(data, '
    (.*?)
    ') matches = re.compile(']+>(.+?) Date: Mon, 23 Oct 2017 12:22:33 -0500 Subject: [PATCH 05/18] streamixclud: fix test_video_exists --- plugin.video.alfa/servers/streamixcloud.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/plugin.video.alfa/servers/streamixcloud.py b/plugin.video.alfa/servers/streamixcloud.py index cab197f2..5f99d151 100755 --- a/plugin.video.alfa/servers/streamixcloud.py +++ b/plugin.video.alfa/servers/streamixcloud.py @@ -11,27 +11,20 @@ def test_video_exists(page_url): data = httptools.downloadpage(page_url).data if "Not Found" in data: - return False, "[streamixcloud] El archivo no existe o ha sido borrado" - + return False, "[streamixcloud] El archivo no existe o ha sido borrado" + if "Video is processing" in data: + return False, "[streamixcloud] El video se está procesando, inténtelo mas tarde" return True, "" def get_video_url(page_url, premium=False, user="", password="", video_password=""): logger.info("(page_url='%s')" % page_url) - data = httptools.downloadpage(page_url).data - video_urls = [] packed = scrapertools.find_single_match(data, - "