From ceed742ca9d5b6da545d31e8af2d698e8d4f50c9 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Tue, 17 Apr 2018 11:17:38 -0500 Subject: [PATCH 1/4] documentalesonline: updated --- .../channels/documentalesonline.py | 113 ++++++++---------- 1 file changed, 53 insertions(+), 60 deletions(-) diff --git a/plugin.video.alfa/channels/documentalesonline.py b/plugin.video.alfa/channels/documentalesonline.py index ee8ce0f5..6b4818d5 100755 --- a/plugin.video.alfa/channels/documentalesonline.py +++ b/plugin.video.alfa/channels/documentalesonline.py @@ -4,55 +4,79 @@ import re from core import httptools from core import scrapertools +from core import servertools from core.item import Item -from platformcode import logger from channelselector import get_thumb +from platformcode import logger HOST = "http://documentales-online.com/" def mainlist(item): logger.info() - itemlist = list() - - itemlist.append(Item(channel=item.channel, title="Novedades", action="listado", url=HOST, + itemlist.append(Item(channel=item.channel, title="Novedades", action="videos", url=HOST, thumbnail=get_thumb('newest', auto=True))) itemlist.append(Item(channel=item.channel, title="Destacados", action="seccion", url=HOST, extra="destacados", thumbnail=get_thumb('hot', auto=True))) - itemlist.append(Item(channel=item.channel, title="Series", action="seccion", url=HOST, extra="series", + itemlist.append(Item(channel=item.channel, title="Series destacadas", action="seccion", url=HOST, extra="series", thumbnail=get_thumb('tvshows', auto=True))) itemlist.append(Item(channel=item.channel, title="Categorías", action="categorias", url=HOST, thumbnail=get_thumb('categories', auto=True))) - # itemlist.append(Item(channel=item.channel, title="Top 100", action="categorias", url=HOST)) - # itemlist.append(Item(channel=item.channel, title="Populares", action="categorias", url=HOST)) - + itemlist.append(Item(channel=item.channel, title="Top 100", action="listado", url=HOST + "top/", + thumbnail=get_thumb('more voted', auto=True))) + itemlist.append(Item(channel=item.channel, title="Populares", action="listado", url=HOST + "populares/", + thumbnail=get_thumb('more watched', auto=True))) + itemlist.append(Item(channel=item.channel, title="Series y Temas", action="listado", url=HOST + "series-temas/", + thumbnail=get_thumb('tvshows', auto=True))) itemlist.append(Item(channel=item.channel, title="Buscar", action="search", thumbnail=get_thumb('search', auto=True))) + return itemlist - # itemlist.append(Item(channel=item.channel, title=" Series y Temas", action="categorias", url=HOST)) +def listado(item): + logger.info() + itemlist = [] + data = httptools.downloadpage(item.url).data + data = data.replace('', '') + bloque = scrapertools.find_single_match(data, 'class="post-entry(.*?)class="post-share') + if "series-temas" not in item.url: + patron = '([^<]+)<.*?""" + matches = scrapertools.find_multiple_matches(bloque, patron) + for scrapedurl, scrapedtitle in matches: + itemlist.append(Item(action = "videos", + channel = item.channel, + title = scrapedtitle, + url = HOST + scrapedurl + )) return itemlist def seccion(item): logger.info() itemlist = [] - data = httptools.downloadpage(item.url).data data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", data) - if item.extra == "destacados": patron_seccion = '

Destacados

    (.*?)
' action = "findvideos" else: patron_seccion = '

Series destacadas

    (.*?)
' - action = "listado" - + action = "videos" data = scrapertools.find_single_match(data, patron_seccion) - - matches = re.compile('
(.*?)', re.DOTALL).findall(data) - + matches = scrapertools.find_multiple_matches(data, '(.*?)') aux_action = action for url, title in matches: if item.extra != "destacados" and "Cosmos (Carl Sagan)" in title: @@ -60,61 +84,46 @@ def seccion(item): else: action = aux_action itemlist.append(item.clone(title=title, url=url, action=action, fulltitle=title)) - return itemlist -def listado(item): +def videos(item): logger.info() - itemlist = [] - data = httptools.downloadpage(item.url).data data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", data) - - pagination = scrapertools.find_single_match(data, '
\d' '') - patron = '
    (.*?)
' data = scrapertools.find_single_match(data, patron) - matches = re.compile('
(.*?).*?Categorías') - matches = re.compile('(.*?)', re.DOTALL).findall(data) - + matches = scrapertools.find_multiple_matches(data, '(.*?)') for url, title in matches: - itemlist.append(item.clone(title=title, url=url, action="listado", fulltitle=title)) - + itemlist.append(item.clone(title=title, url=url, action="videos", fulltitle=title)) return itemlist def search(item, texto): logger.info() - texto = texto.replace(" ", "+") - try: item.url = HOST + "?s=%s" % texto - return listado(item) + return videos(item) # Se captura la excepción, para no interrumpir al buscador global si un canal falla except: import sys @@ -125,37 +134,21 @@ def search(item, texto): def findvideos(item): logger.info() - itemlist = [] - data = httptools.downloadpage(item.url).data data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", data) - - if item.fulltitle == "Cosmos (Carl Sagan)": - - matches = scrapertools.find_multiple_matches(data, - '

(.*?)
Date: Tue, 17 Apr 2018 11:19:51 -0500 Subject: [PATCH 2/4] danimados: fix --- plugin.video.alfa/channels/danimados.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.video.alfa/channels/danimados.py b/plugin.video.alfa/channels/danimados.py index 0046da46..a3df1ecb 100644 --- a/plugin.video.alfa/channels/danimados.py +++ b/plugin.video.alfa/channels/danimados.py @@ -148,11 +148,11 @@ def findvideos(item): data = httptools.downloadpage(item.url).data data = re.sub(r"\n|\r|\t|\s{2}| ", "", data) - data1 = scrapertools.find_single_match(data, + data1 = scrapertools.find_single_match(data, '

(.+?)<\/nav><\/div><\/div>') patron='src="(.+?)"' itemla = scrapertools.find_multiple_matches(data1,patron) - if "favicons?domain" in itemla[1]: + if "favicons?domain" in itemla[0]: method = 1 data2=scrapertools.find_single_match(data, "var \$user_hashs = {(.+?)}") patron='".+?":"(.+?)"' From 94d359b8c82b79b7259b6626a01da3c8d6bd0a9c Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Wed, 18 Apr 2018 15:11:21 -0500 Subject: [PATCH 3/4] flashx: fix --- plugin.video.alfa/servers/flashx.py | 52 +++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/plugin.video.alfa/servers/flashx.py b/plugin.video.alfa/servers/flashx.py index 33d9a8d3..7ad3a1a7 100644 --- a/plugin.video.alfa/servers/flashx.py +++ b/plugin.video.alfa/servers/flashx.py @@ -18,6 +18,58 @@ def test_video_exists(page_url): def get_video_url(page_url, premium=False, user="", password="", video_password=""): logger.info("url=" + page_url) + + data = httptools.downloadpage(page_url).data + + cgi_counter = scrapertools.find_single_match(data, """(?is)src=.(https://www.flashx.bz/counter.cgi.*?[^(?:'|")]+)""") + cgi_counter = cgi_counter.replace("%0A","").replace("%22","") + httptools.downloadpage(cgi_counter, cookies=False) + + time.sleep(6) + + url_playitnow = "https://www.flashx.bz/dl?playitnow" + fid = scrapertools.find_single_match(data, 'input type="hidden" name="id" value="([^"]*)"') + fname = scrapertools.find_single_match(data, 'input type="hidden" name="fname" value="([^"]*)"') + fhash = scrapertools.find_single_match(data, 'input type="hidden" name="hash" value="([^"]*)"') + + headers = {'Content': 'application/x-www-form-urlencoded'} + post_parameters = { + "op": "download1", + "usr_login": "", + "id": fid, + "fname": fname, + "referer": "https://www.flashx.bz/", + "hash": fhash, + "imhuman": "Continue To Video" + } + data = httptools.downloadpage(url_playitnow, urllib.urlencode(post_parameters), headers=headers).data + + video_urls = [] + media_urls = scrapertools.find_multiple_matches(data, "{src: '([^']+)'.*?,label: '([^']+)'") + subtitle = "" + for media_url, label in media_urls: + if media_url.endswith(".srt") and label == "Spanish": + try: + from core import filetools + data = httptools.downloadpage(media_url) + subtitle = os.path.join(config.get_data_path(), 'sub_flashx.srt') + filetools.write(subtitle, data) + except: + import traceback + logger.info("Error al descargar el subtítulo: " + traceback.format_exc()) + + for media_url, label in media_urls: + if not media_url.endswith("png") and not media_url.endswith(".srt"): + video_urls.append(["." + media_url.rsplit('.', 1)[1] + " [flashx]", media_url, 0, subtitle]) + + for video_url in video_urls: + logger.info("%s - %s" % (video_url[0], video_url[1])) + + return video_urls + + +def get_video_url_anterior(page_url, premium=False, user="", password="", video_password=""): + logger.info("url=" + page_url) pfxfx = "" data = httptools.downloadpage(page_url, cookies=False).data data = data.replace("\n","") From 6cbad988fed0e6b41f6657eaa98ce132a6b64334 Mon Sep 17 00:00:00 2001 From: Alfa <30527549+alfa-addon@users.noreply.github.com> Date: Wed, 18 Apr 2018 15:42:04 -0500 Subject: [PATCH 4/4] v2.5.10 --- plugin.video.alfa/addon.xml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/plugin.video.alfa/addon.xml b/plugin.video.alfa/addon.xml index 2cb10757..5f2b4cd5 100755 --- a/plugin.video.alfa/addon.xml +++ b/plugin.video.alfa/addon.xml @@ -1,5 +1,5 @@ - + @@ -19,17 +19,10 @@ [B]Estos son los cambios para esta versión:[/B] [COLOR green][B]Canales agregados y arreglos[/B][/COLOR] - » torrentrapid » torrentlocura - » mispelisyseries » descargas2020 - » mejortorrent » tvsinpagar - » cinefox » newpct - » peliculasdk » netutv - » pepecine » seriespapaya - » doomtv » dostream - » pelisgratis » estream - » plusdede + » documentalesonline » flashx + » danimados + ¤ arreglos internos - ¤ Gracias a @pipcat,@Rhinox117,@lopezvg por colaborar en ésta versión Navega con Kodi por páginas web para ver sus videos de manera fácil. Browse web pages using Kodi