From 1a00926155ba11fb3f88e4ef7a35c59ff06b412e Mon Sep 17 00:00:00 2001
From: Alhaziel01
Date: Wed, 13 Jul 2022 15:41:55 +0200
Subject: [PATCH] Fix Cinemalibero (Wrestling)
---
channels/cinemalibero.py | 40 ++++++++++++++++++----------------------
1 file changed, 18 insertions(+), 22 deletions(-)
diff --git a/channels/cinemalibero.py b/channels/cinemalibero.py
index 267a424c..2ebb600e 100644
--- a/channels/cinemalibero.py
+++ b/channels/cinemalibero.py
@@ -97,6 +97,7 @@ def peliculas(item):
@support.scrape
def episodios(item):
data = item.data
+ # support.dbg()
# debugBlock = True
if item.args == 'anime':
logger.debug("Anime :", item)
@@ -104,6 +105,13 @@ def episodios(item):
patron = r'[^>]+>(?PEpisodio\s(?P\d+))(?::)?(?:(?P[^<]+))?.*?(?:
\d+))?(?:
|
|strong>)(?P.*?)(?:)'
item.contentType = 'tvshow'
+ elif item.args == 'wrestling':
+
+ logger.debug("Wrestling :", item)
+ # debugBlock = True
+ patron = r'(?:/>|
)\s*(?P
[^-]+)-(?P.+?)(?:
\s*(?P.*?)'
+ item.contentType = 'tvshow'
elif item.args == 'serie' or item.contentType == 'tvshow':
logger.debug("Serie :", item)
# debugBlock = True
@@ -120,6 +128,8 @@ def episodios(item):
def itemlistHook(itl):
ret = []
+ if item.args == 'wrestling':
+ return itl
for it in itl:
ep = scrapertools.find_single_match(it.title, r'(\d+x\d+)')
if not ep and 'http' in it.data: # stagione intera
@@ -203,39 +213,22 @@ def check(item):
data = support.match(item.url, headers=headers).data
if data:
ck = support.match(data, patron=r'Supportaci condividendo quest[oa] ([^:]+)').match.lower()
-
- if ck == 'serie tv':
- item.contentType = 'tvshow'
- item.args = 'serie'
- item.data = data
- return episodios(item)
-
- elif ck == 'anime':
- item.contentType = 'tvshow'
- item.args = 'anime'
- item.data = data
- itemlist = episodios(item)
- if not itemlist:
- item.data = data
- # item.action = 'findvideos'
- return findvideos(item)
-
- elif ck == 'film':
+ if ck == 'film':
item.contentType = 'movie'
item.data = data
# item.action = 'findvideos'
return findvideos(item)
- else:
+ elif ck in ['serie tv', 'wrestling wwe', 'anime']:
item.contentType = 'tvshow'
+ item.args = ck.split()[0]
item.data = data
itemlist = episodios(item)
if not itemlist:
- item.contentType = 'movie'
item.data = data
- # item.action = 'findvideos'
return findvideos(item)
+ return itemlist
def findvideos(item):
@@ -248,11 +241,14 @@ def findvideos(item):
item.contentEpisodeNumber).zfill(2):
servers.append(s)
logger.debug()
+ # support.dbg()
if item.servers:
return support.server(item, itemlist=[Item().fromurl(s) for s in item.servers])
if not item.data:
item.data = httptools.downloadpage(item.url)
- item.data = scrapertools.find_single_match(item.data, '