diff --git a/plugin.video.alfa/channels/cinetux.py b/plugin.video.alfa/channels/cinetux.py index adc47772..3ac3cd94 100644 --- a/plugin.video.alfa/channels/cinetux.py +++ b/plugin.video.alfa/channels/cinetux.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- -import urlparse - from core import httptools from core import scrapertools from core import servertools @@ -48,13 +46,11 @@ def mainlist(item): "/0/Genre.png", text_color=color1)) - url = urlparse.urljoin(CHANNEL_HOST, "genero/documental/") itemlist.append(item.clone(title="Documentales", text_bold=True, text_color=color2, action="")) - itemlist.append(item.clone(action="peliculas", title=" Novedades", url=url, text_color=color1, + itemlist.append(item.clone(action="peliculas", title=" Novedades", url=CHANNEL_HOST + "genero/documental/", text_color=color1, thumbnail="https://raw.githubusercontent.com/master-1970/resources/master/images/genres" "/0/Documentaries.png")) - url = urlparse.urljoin(CHANNEL_HOST, "genero/documental/?orderby=title&order=asc&gdsr_order=asc") - itemlist.append(item.clone(action="peliculas", title=" Por orden alfabético", text_color=color1, url=url, + itemlist.append(item.clone(action="peliculas", title=" Por orden alfabético", text_color=color1, url=CHANNEL_HOST + "genero/documental/?orderby=title&order=asc&gdsr_order=asc", thumbnail="https://raw.githubusercontent.com/master-1970/resources/master/images/genres" "/0/A-Z.png")) itemlist.append(item.clone(title="", action="")) @@ -100,7 +96,7 @@ def newest(categoria): itemlist.pop() elif categoria == 'documentales': - item.url = urlparse.urljoin(CHANNEL_HOST, "genero/documental/") + item.url = CHANNEL_HOST + "genero/documental/" item.action = "peliculas" itemlist = peliculas(item) @@ -108,7 +104,7 @@ def newest(categoria): itemlist.pop() elif categoria == 'infantiles': - item.url = urlparse.urljoin(CHANNEL_HOST, "genero/infantil/") + item.url = CHANNEL_HOST + "genero/infantil/" item.action = "peliculas" itemlist = peliculas(item) @@ -130,7 +126,6 @@ def peliculas(item): itemlist = [] item.text_color = color2 - # Descarga la página data = httptools.downloadpage(item.url).data patron = '(?s)class="(?:result-item|item movies)">.*?Lista de géneros
+ data = httptools.downloadpage(item.url).data data = scrapertools.find_single_match(data, ']+>Lista de g(.*?)/table') - # Historia antigua [With This Ring
-
[18/07/15 (VS)(VC)(VL)] [HD-R]—–Comedia, Romántica
- ''' - ''' - The Adventures of Tintin
-
(2011) [10/07/15 (VS)(VC)(VL)] [DVD-R]—–Animación, Infantil, Aventuras
- ''' # Descarga la página - data = scrapertools.cachePage(item.url) - patron = '([^<]+)(.*?)
') item.plot = scrapertools.htmlclean(item.plot).strip() item.contentPlot = item.plot + patron = 'Ver película online.*?>.*?>([^<]+)' + scrapedopcion = scrapertools.find_single_match(data, patron) + titulo_opcional = scrapertools.find_single_match(scrapedopcion, ".*?, (.*)").upper() + bloque = scrapertools.find_multiple_matches(data, 'contenedor_tab.*?/table') + cuenta = 0 + for datos in bloque: + cuenta = cuenta + 1 + patron = '(opción %s.*?)' %cuenta + scrapedopcion = scrapertools.find_single_match(data, patron) + titulo_opcion = "(" + scrapertools.find_single_match(scrapedopcion, "op.*?, (.*)").upper() + ")" + if "TRAILER" in titulo_opcion or titulo_opcion == "()": + titulo_opcion = "(" + titulo_opcional + ")" + urls = scrapertools.find_multiple_matches(datos, '(?:src|href)="([^"]+)') + titulo = "Ver en %s " + titulo_opcion + for url in urls: + itemlist.append(Item(channel = item.channel, + action = "play", + contentThumbnail = item.thumbnail, + fulltitle = item.contentTitle, + title = titulo, + url = url + )) + itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize()) + return itemlist - newthumbnail = scrapertools.find_single_match(data, - '
[^(?:
([^<]+)
|)([^<]+)
' matches = scrapertools.find_multiple_matches(data, patron) - for scrapedurl, scrapedthumbnail, marca, serie, episodio, scrapedtitle in matches: tipo = "movie" scrapedurl = host + scrapedurl.rsplit("-dc=")[0] diff --git a/plugin.video.alfa/servers/flashx.json b/plugin.video.alfa/servers/flashx.json index af46c3c0..ce0c3633 100644 --- a/plugin.video.alfa/servers/flashx.json +++ b/plugin.video.alfa/servers/flashx.json @@ -19,7 +19,7 @@ "patterns": [ { "pattern": "flashx.(?:tv|pw)/(?:embed.php\\?c=|embed-|playvid-|)([A-z0-9]+)", - "url": "https://www.flashx.tv/playvid-\\1.html" + "url": "https://www.flashx.tv/\\1.html" } ] }, diff --git a/plugin.video.alfa/servers/flashx.py b/plugin.video.alfa/servers/flashx.py index 86fac9d8..69ad0430 100644 --- a/plugin.video.alfa/servers/flashx.py +++ b/plugin.video.alfa/servers/flashx.py @@ -27,8 +27,6 @@ def test_video_exists(page_url): def get_video_url(page_url, premium=False, user="", password="", video_password=""): logger.info("url=" + page_url) - page_url = page_url.replace("playvid-", "") - headers = {'Host': 'www.flashx.tv', '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', @@ -60,8 +58,18 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= headers['Content-Type'] = 'application/x-www-form-urlencoded' data = httptools.downloadpage('https://www.flashx.tv/dl?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 + if "You try to access this video with Kodi" in data: + 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?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 + matches = scrapertools.find_multiple_matches(data, "(eval\(function\(p,a,c,k.*?)\s+") - video_urls = [] for match in matches: try: diff --git a/plugin.video.alfa/servers/rapidvideo.json b/plugin.video.alfa/servers/rapidvideo.json index 75ec9156..a462660e 100755 --- a/plugin.video.alfa/servers/rapidvideo.json +++ b/plugin.video.alfa/servers/rapidvideo.json @@ -18,7 +18,7 @@ "ignore_urls": [], "patterns": [ { - "pattern": "rapidvideo.(?:org|com)/(?:\\?v=|e/|embed/)([A-z0-9]+)", + "pattern": "rapidvideo.(?:org|com)/(?:\\?v=|e/|embed/|v/)([A-z0-9]+)", "url": "https://www.rapidvideo.com/e/\\1" } ]