From e37bbc32ec7dd0a556a76d6733cb895ef4dbc536 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Thu, 28 May 2020 10:23:08 +0200 Subject: [PATCH] Fix D.S.D.A --- channels/dsda.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/channels/dsda.py b/channels/dsda.py index 71f270d4..8fc342c1 100644 --- a/channels/dsda.py +++ b/channels/dsda.py @@ -93,16 +93,6 @@ def peliculas(item): item.action = 'peliculas' item.contentTitle = title item.contentSerieName = '' - # elif 'collezion' in item.fulltitle.lower(): - # item.args = 'collection' - # item.action = 'peliculas' - # item.contentTitle = title - # item.contentSerieName = '' - # elif 'raccolta' in item.fulltitle.lower(): - # item.args = 'collection' - # item.action = 'peliculas' - # item.contentTitle = title - # item.contentSerieName = '' else: item.contentTitle = title item.contentSerieName = '' @@ -124,7 +114,21 @@ def peliculas(item): @support.scrape def episodios(item): - patron = r'class="title-episodio">(?P[^<]+)<(?P.*?)(\d+x\d+)') + data = html.data + if html.match: + patron = r'class="title-episodio">(?P[^<]+)<(?P.*?)(?P[^<]+)<(?P<url>.*?)<p' + + def itemlistHook(itemlist): + counter = 0 + for item in itemlist: + episode = support.match(item.title, patron=r'\d+').match + if episode == '1': + counter += 1 + item.title = support.typo(str(counter) + 'x' + episode.zfill(2) + support.re.sub(r'\[[^\]]+\](?:\d+)?','',item.title),'bold') + return itemlist return locals()