.*?href.*?>' \
- '(.*?)'
- matches = scrapertools.find_multiple_matches(data_season, patron)
-
- elementos = []
- for url, status, title in matches:
- if not "Enlaces Disponibles" in status:
- continue
- elementos.append(title)
- item_epi = item.clone(action="findvideos", url=url, text_color=color1)
- item_epi.infoLabels["season"] = scrapedtitle
- episode = scrapertools.find_single_match(title, 'Capitulo (\d+)')
- titulo = scrapertools.find_single_match(title, 'Capitulo \d+\s*-\s*(.*?)$')
- item_epi.infoLabels["episode"] = episode
- item_epi.infoLabels["mediatype"] = "episode"
- item_epi.title = "%sx%s %s" % (scrapedtitle, episode.zfill(2), titulo)
-
- itemlist.insert(0, item_epi)
- if elementos:
- itemlist.insert(0, new_item)
-
- if item.infoLabels["tmdb_id"] and itemlist:
- try:
- tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
- except:
- pass
-
- if itemlist:
- if config.get_videolibrary_support():
- itemlist.append(Item(channel=item.channel, title="Añadir serie a la videoteca", text_color="green",
- filtro=True, action="add_serie_to_library", fulltitle=item.fulltitle,
- extra="episodios", url=item.url, infoLabels=item.infoLabels, show=item.show))
- else:
- itemlist.append(item.clone(title="Serie sin episodios disponibles", action="", text_color=color3))
- return itemlist
-
-
-def findvideos(item):
- logger.info()
- itemlist = list()
-
- try:
- filtro_idioma = config.get_setting("filterlanguages", item.channel)
- filtro_enlaces = config.get_setting("filterlinks", item.channel)
- except:
- filtro_idioma = 3
- filtro_enlaces = 2
-
- dict_idiomas = {'Castellano': 2, 'Latino': 1, 'Subtitulada': 0}
-
- data = httptools.downloadpage(item.url).data
- data = re.sub(r"\n|\r|\t| |\s{2}", "", data)
-
- if not item.infoLabels["tmdb_id"]:
- year = scrapertools.find_single_match(data, 'Lanzamiento.*?(\d{4})')
-
- if year != "":
- item.infoLabels['filtro'] = ""
- item.infoLabels['year'] = int(year)
-
- # Ampliamos datos en tmdb
- try:
- tmdb.set_infoLabels_item(item, __modo_grafico__)
- except:
- pass
-
- if not item.infoLabels['plot']:
- plot = scrapertools.find_single_match(data, '
(.*?)
')
- item.infoLabels['plot'] = plot
-
- if filtro_enlaces != 0:
- list_enlaces = bloque_enlaces(data, filtro_idioma, dict_idiomas, "Ver Online", item)
- if list_enlaces:
- itemlist.append(item.clone(action="", title="Enlaces Online", text_color=color1,
- text_bold=True))
- itemlist.extend(list_enlaces)
- if filtro_enlaces != 1:
- list_enlaces = bloque_enlaces(data, filtro_idioma, dict_idiomas, "Descarga Directa", item)
- if list_enlaces:
- itemlist.append(item.clone(action="", title="Enlaces Descargas", text_color=color1,
- text_bold=True))
- itemlist.extend(list_enlaces)
-
- # Opción "Añadir esta película a la videoteca de XBMC"
- if itemlist and item.contentType == "movie":
- contextual = config.is_xbmc()
- itemlist.append(item.clone(channel="trailertools", title="Buscar Tráiler", action="buscartrailer", context="",
- text_color="magenta", contextual=contextual))
- if item.extra != "findvideos":
- if config.get_videolibrary_support():
- itemlist.append(Item(channel=item.channel, title="Añadir enlaces a la videoteca", text_color="green",
- filtro=True, action="add_pelicula_to_library", fulltitle=item.fulltitle,
- extra="findvideos", url=item.url, infoLabels=item.infoLabels,
- contentType=item.contentType, contentTitle=item.contentTitle, show=item.show))
- elif not itemlist and item.contentType == "movie":
- itemlist.append(item.clone(title="Película sin enlaces disponibles", action="", text_color=color3))
-
- return itemlist
-
-
-def bloque_enlaces(data, filtro_idioma, dict_idiomas, tipo, item):
- logger.info()
-
- lista_enlaces = list()
- bloque = scrapertools.find_single_match(data, tipo + '(.*?)')
- patron = '
\s*.*? | ([^<]+) | ' \
- '.*?
(.*?) | '
- matches = scrapertools.find_multiple_matches(bloque, patron)
- filtrados = []
- for language, scrapedurl, calidad, orden in matches:
- language = language.strip()
- server = scrapertools.find_single_match(scrapedurl, 'http(?:s|)://(?:www.|)(\w+).')
- if server == "ul":
- server = "uploadedto"
- if server == "streamin":
- server = "streaminto"
- if server == "waaw":
- server = "netutv"
-
- if servertools.is_server_enabled(server):
- try:
- servers_module = __import__("servers." + server)
- title = " Mirror en " + server + " (" + language + ") (Calidad " + calidad.strip() + ")"
- if filtro_idioma == 3 or item.filtro:
- lista_enlaces.append(item.clone(title=title, action="play", server=server, text_color=color2,
- url=scrapedurl, idioma=language, orden=orden, language=language))
- else:
- idioma = dict_idiomas[language]
- if idioma == filtro_idioma:
- lista_enlaces.append(item.clone(title=title, text_color=color2, action="play",
- url=scrapedurl, server=server, idioma=language, orden=orden,
- language=language))
- else:
- if language not in filtrados:
- filtrados.append(language)
- except:
- pass
-
- order = config.get_setting("orderlinks", item.channel)
- if order == 0:
- lista_enlaces.sort(key=lambda item: item.server)
- elif order == 1:
- lista_enlaces.sort(key=lambda item: item.idioma)
- else:
- lista_enlaces.sort(key=lambda item: item.orden, reverse=True)
-
- if filtro_idioma != 3:
- if len(filtrados) > 0:
- title = "Mostrar enlaces filtrados en %s" % ", ".join(filtrados)
- lista_enlaces.append(item.clone(title=title, action="findvideos", url=item.url, text_color=color3,
- filtro=True))
-
- return lista_enlaces
-
-
-def play(item):
- logger.info()
- itemlist = list()
- enlace = servertools.findvideosbyserver(item.url, item.server)
- itemlist.append(item.clone(url=enlace[0][1]))
-
- return itemlist
diff --git a/plugin.video.alfa/servers/downace.py b/plugin.video.alfa/servers/downace.py
index c77d4c34..c3f81e18 100644
--- a/plugin.video.alfa/servers/downace.py
+++ b/plugin.video.alfa/servers/downace.py
@@ -8,9 +8,10 @@ from platformcode import logger
def test_video_exists(page_url):
logger.info("(page_url='%s')" % page_url)
data = httptools.downloadpage(page_url).data
- if "no longer exists" in data:
- return False, "[Downace] El fichero ha sido borrado"
-
+ if "no longer exists" in data or "to copyright issues" in data:
+ return False, "[Downace] El video ha sido borrado"
+ if "please+try+again+later." in data:
+ return False, "[Downace] Error de downace, no se puede generar el enlace al video"
return True, ""
diff --git a/plugin.video.alfa/servers/flashx.py b/plugin.video.alfa/servers/flashx.py
index e8e2a385..bac474c1 100644
--- a/plugin.video.alfa/servers/flashx.py
+++ b/plugin.video.alfa/servers/flashx.py
@@ -14,8 +14,7 @@ def test_video_exists(page_url):
logger.info("(page_url='%s')" % page_url)
data = httptools.downloadpage(page_url, cookies=False).data
-
- if 'File Not Found' in data or 'file was deleted' in data:
+ if 'file was deleted' in data:
return False, "[FlashX] El archivo no existe o ha sido borrado"
elif 'Video is processing now' in data:
return False, "[FlashX] El archivo se está procesando"
@@ -25,7 +24,7 @@ def test_video_exists(page_url):
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.info("url=" + page_url)
-
+ pfxfx = ""
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',
@@ -33,6 +32,14 @@ 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
+ # 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]+)')
+ 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 + "&"
+ # {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="([^"]+)"')
@@ -45,7 +52,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
headers['Accept'] = "*/*"
headers['Host'] = "www.flashx.tv"
- coding_url = 'https://www.flashx.tv/flashx.php?f=x&fxfx=6'
+ coding_url = 'https://www.flashx.tv/flashx.php?%s' %pfxfx
headers['X-Requested-With'] = 'XMLHttpRequest'
httptools.downloadpage(coding_url, headers=headers)
@@ -56,7 +63,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?playnow', post, headers, replace_headers=True).data
+ data = httptools.downloadpage('https://www.flashx.tv/dl?playitnow', 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
@@ -64,7 +71,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?playnow', post, headers, replace_headers=True).data
+ data = httptools.downloadpage('https://www.flashx.tv/dl?playitnow', 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