From f3011b5b5dc0eee160bc9deefa8dc83c55be5aa9 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Tue, 8 Mar 2022 19:30:36 +0100 Subject: [PATCH] Fix 1337x e Film Streaming --- channels/1337x.py | 8 ++++++-- channels/filmstreaming.py | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/channels/1337x.py b/channels/1337x.py index 105dd781..ce1aabe0 100644 --- a/channels/1337x.py +++ b/channels/1337x.py @@ -58,8 +58,8 @@ def moviefilter(item): return platformtools.show_channel_settings(list_controls=controls, item=item, caption='Filtro', callback='filtered') -def filtered(item, values): +def filtered(item, values): genre = item.genreValues[values['genre']] lang = item.langValues[values['lang']] sortby = item.sortValues[values['sort']] @@ -97,8 +97,11 @@ def search(item, text): def peliculas(item): if item.args == 'filter': item.url = moviefilter(item) + if not item.url: + data = ' ' + else: + data = support.match(item).data - data = support.match(item).data if item.args == 'search': sceneTitle = 'undefined' patron = r'(?P[^<]+)<(?:[^>]+>){3,7}(?P<seed>[^<]+)<(?:[^>]+>){6}(?P<size>[^<]+)<span' @@ -118,6 +121,7 @@ def peliculas(item): nextPage = int(currentPage) + 1 support.nextPage(itemlist, item, next_page=item.url.replace(f'/{currentPage}', f'/{nextPage}'), function_or_level='peliculas') return itemlist + return locals() diff --git a/channels/filmstreaming.py b/channels/filmstreaming.py index 1d73759d..3d086aa6 100644 --- a/channels/filmstreaming.py +++ b/channels/filmstreaming.py @@ -84,8 +84,8 @@ def genres(item): def findvideos(item): data = support.match(item.url).data - urls = support.match(data, patron=r'<span data-link="([^"]+)').matches - if urls: + urls = support.match(data, patron=r'<span data-link="([^"]+)',).matches + if len(urls) > 1: data = urls else: url = support.match(item.url, patron='<iframe.*?src="([^"]+)').match