From 5699bc082d5ec5071b536be3ce90e5082b55d8ba Mon Sep 17 00:00:00 2001 From: marco Date: Thu, 23 Apr 2020 16:03:40 +0200 Subject: [PATCH] fix cinamlibero serietv --- channels/cinemalibero.py | 4 ++-- core/support.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/channels/cinemalibero.py b/channels/cinemalibero.py index 10408118..2aabd907 100644 --- a/channels/cinemalibero.py +++ b/channels/cinemalibero.py @@ -97,8 +97,8 @@ def episodios(item): item.contentType = 'tvshow' else:# item.extra == 'serie': support.log("Serie :", item) - patron = r'(?P\d+(?:×|×)?\d+\-\d+|\d+(?:×|×)\d+)[;]?[ ]?(?:(?P[^<]+)(?P<url>.*?)|(\2[ ])(?:<(\3.*?)))(?:</a><br />|</a></p>|$)' - patronBlock = r'<p><strong>(?:.+?[Ss]tagione\s)?(?:(?P<lang>iTA|ITA|Sub-ITA|Sub-iTA))?.*?</strong>(?P<block>.+?)(?:</span|</p)' + patron = r'(?:>| )(?P<episode>\d+(?:x|×|×)\d+)[;]?[ ]?(?:(?P<title>[^<–-]+)(?P<url>.*?)|(\2[ ])(?:<(\3.*?)))(?:</a><br />|</a></p>|$)' + patronBlock = r'>(?:[^<]+[Ss]tagione\s|[Ss]tagione [Uu]nica)(?:(?P<lang>iTA|ITA|Sub-ITA|Sub-iTA))?.*?</strong>(?P<block>.+?)(?:<strong|<div class="at-below)' item.contentType = 'tvshow' def itemHook(item): if not scrapertools.find_single_match(item.title, r'(\d+x\d+)'): diff --git a/core/support.py b/core/support.py index 8b930e61..43b4a6df 100755 --- a/core/support.py +++ b/core/support.py @@ -125,9 +125,9 @@ def regexDbg(item, patron, headers, data=''): html = data headers = {'content-type': 'application/json'} data = { - 'regex': patron, + 'regex': patron.decode('utf-8'), 'flags': 'gm', - 'testString': html, + 'testString': html.decode('utf-8'), 'delimiter': '"""', 'flavor': 'python' }