diff --git a/plugin.video.alfa/channels/pepecine.py b/plugin.video.alfa/channels/pepecine.py index fd3d6986..8619c527 100644 --- a/plugin.video.alfa/channels/pepecine.py +++ b/plugin.video.alfa/channels/pepecine.py @@ -15,7 +15,7 @@ from core.item import Item, InfoLabels from platformcode import config, logger from channels import filtertools -host = "https://pepecine.io" +host = "https://pepecine.me" # "https://pepecine.io" IDIOMAS = {'c': 'Castellano', 'i': 'Inglés', 'l': 'Latino', 's': 'VOSE', 'v': 'VO'} list_idiomas = IDIOMAS.values() @@ -30,34 +30,34 @@ def mainlist(item): itemlist.append(item.clone( title = " Últimas películas", - url = host + '/las-peliculas-online', + url = host + '/mis-peliculas-online', action = 'list_latest', type = 'movie')) itemlist.append(item.clone(title = " Películas por género", - url = host + '/ver-pelicula', + url = host + '/ver-la-pelicula', action = 'genero', type = 'movie')) itemlist.append(item.clone(title = " Todas las películas", - url = host + '/ver-pelicula', + url = host + '/ver-la-pelicula', action = 'list_all', type = 'movie')) itemlist.append(Item(title = "Series")) itemlist.append(item.clone(title = " Últimos episodios", - url = host + '/las-series-online', + url = host + '/mis-series-online', action = 'list_latest', type = 'series')) itemlist.append(item.clone(title = " Series por género", - url = host + '/ver-serie-tv', + url = host + '/ver-la-serie', action = 'genero', type = 'series')) itemlist.append(item.clone(title = " Todas las series", - url = host + '/ver-serie-tv', + url = host + '/ver-la-serie', action ='list_all', type = 'series')) @@ -251,11 +251,11 @@ def list_all(item): new_item.contentTitle = element['title'] new_item.fulltitle = element['title'] if new_item.extra != "links_encoded": - new_item.url = host + "/ver-pelicula/" + str(element['id']) + new_item.url = host + "/ver-la-pelicula/" + str(element['id']) elif item.type == 'series': new_item.action = 'seasons' - new_item.url = host + "/ver-serie-tv/" + str(element['id']) + new_item.url = host + "/ver-la-serie/" + str(element['id']) new_item.show = element['title'] new_item.contentType = 'tvshow' new_item.contentSerieName = element['title'] @@ -334,8 +334,8 @@ def findvideos(item): if item.extra != "links_encoded": data = httptools.downloadpage(item.url).data - patron = "renderTab\.bind.*?'([^']+)" - patron += '.*?([^<]*)' + patron = "renderTab\.bind[^']+'([^']+)" + patron += '.*?]*>([^<]*)]*>([^<]*)' patron += '.*?]*>([^<]*)' diff --git a/plugin.video.alfa/resources/settings.xml b/plugin.video.alfa/resources/settings.xml index b9b426cc..a8b93528 100644 --- a/plugin.video.alfa/resources/settings.xml +++ b/plugin.video.alfa/resources/settings.xml @@ -4,7 +4,7 @@ - + diff --git a/plugin.video.alfa/servers/powvideo.py b/plugin.video.alfa/servers/powvideo.py index 086f8896..2fb9fa1f 100644 --- a/plugin.video.alfa/servers/powvideo.py +++ b/plugin.video.alfa/servers/powvideo.py @@ -27,18 +27,32 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= referer = page_url.replace('iframe', 'preview') data = httptools.downloadpage(page_url, headers={'referer': referer}).data + switch = 0 if '_0x4a3f' in data else 1 if '_0x34ab' in data else 2 if '_0x5db1' in data else 3 packed = scrapertools.find_single_match(data, "") unpacked = jsunpack.unpack(packed) url = scrapertools.find_single_match(unpacked, "(?:src):\\\\'([^\\\\]+.mp4)\\\\'") - itemlist.append([".mp4" + " [powvideo]", decode_video_url(url)]) + itemlist.append([".mp4" + " [powvideo]", decode_video_url(url, switch)]) itemlist.sort(key=lambda x: x[0], reverse=True) return itemlist -def decode_video_url(url): +def decode_video_url(url, switch): tria = re.compile('[0-9a-z]{40,}', re.IGNORECASE).findall(url)[0] gira = tria[::-1] - x = gira[1:] - return re.sub(tria, x, url) + x = gira[0] + gira[2:] + r = list(x) + if switch == 0: + r[7], r[4] = r[4], r[7] + r[0], r[9] = r[9], r[0] + r[3], r[2] = r[2], r[3] + elif switch == 1: + r[5], r[0] = r[0], r[5] + r[3], r[6] = r[6], r[3] + r[8], r[9] = r[9], r[8] + elif switch == 2: + r[9], r[3] = r[3], r[9] + r[6], r[1] = r[1], r[6] + r[0], r[7] = r[7], r[0] + return re.sub(tria, ''.join(r), url) diff --git a/plugin.video.alfa/servers/streamplay.py b/plugin.video.alfa/servers/streamplay.py index 7171b569..933380fa 100644 --- a/plugin.video.alfa/servers/streamplay.py +++ b/plugin.video.alfa/servers/streamplay.py @@ -30,6 +30,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= referer = re.sub(r"embed-|player-", "", page_url)[:-5] data = httptools.downloadpage(page_url, headers={'Referer': referer}).data + switch = 1 if '_0x4b94' in data else 0 if data == "File was deleted": return "El archivo no existe o ha sido borrado" @@ -38,13 +39,22 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= unpacked = jsunpack.unpack(packed) url = scrapertools.find_single_match(unpacked, '(http[^,]+\.mp4)') - itemlist.append([".mp4" + " [streamplay]", decode_video_url(url)]) + itemlist.append([".mp4" + " [streamplay]", decode_video_url(url, switch)]) itemlist.sort(key=lambda x: x[0], reverse=True) return itemlist -def decode_video_url(url): +def decode_video_url(url, switch): tria = re.compile('[0-9a-z]{40,}', re.IGNORECASE).findall(url)[0] gira = tria[::-1] - x = gira[:4] + gira[6:] - return re.sub(tria, x, url) + x = gira[0] + gira[2:] + r = list(x) + if switch == 0: + r[4], r[2] = r[2], r[4] + r[5], r[9] = r[9], r[5] + r[1], r[7] = r[7], r[1] + else: + r[7], r[0] = r[0], r[7] + r[3], r[6] = r[6], r[3] + r[2], r[5] = r[5], r[2] + return re.sub(tria, ''.join(r), url)