From 349e79c9fb10c788f34559e24909139fbd8eab60 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Mon, 25 May 2020 18:00:00 +0200 Subject: [PATCH] Fix D.S.D.A --- channels/dsda.py | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/channels/dsda.py b/channels/dsda.py index 2293ed29..71f270d4 100644 --- a/channels/dsda.py +++ b/channels/dsda.py @@ -64,10 +64,16 @@ def search(item, texto): @support.scrape def peliculas(item): + blacklist = ['GUIDA PRINCIPIANTI Vedere film e documentari streaming gratis', 'Guida Dsda'] + data = support.match(item).data + # debug =True if item.args == 'collection': - patron = r'
\s*]+>\s*]+>[^>]+>(?P[^<]+)<' - elif item.args == 'raccolta': - patron = r'<a (?:style="[^"]+" )?href="(?P<url>[^"]+)"[^>]+>(?:[^>]+><strong>)?(?P<title>[^<]+)(?:</a>)?</strong' + if 'class="panel"' in data: + item.args = 'raccolta' + patron = r'class="title-episodio">(?P<title>[^<]+)<(?P<url>.*?)<p' + # patron = r'<a (?:style="[^"]+" )?href="(?P<url>[^"]+)"[^>]+>(?:[^>]+><strong>)?(?P<title>[^<]+)(?:</a>)?</strong' + else: + patron = r'<div class="cover-racolta">\s*<a href="(?P<url>[^"]+)"[^>]+>\s*<img width="[^"]+" height="[^"]+" src="(?P<thumb>[^"]+)".*?<p class="title[^>]+>(?P<title>[^<]+)<' else: patron = r'<article[^>]+>[^>]+>[^>]+>(?:<img width="[^"]+" height="[^"]+" src="(?P<thumb>[^"]+)"[^>]+>)?.*?<a href="(?P<url>[^"]+)">\s*(?P<title>[^<]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*<p>(?P<plot>[^<]+)<' patronNext = r'<a class="page-numbers next" href="([^"]+)">' @@ -80,16 +86,23 @@ def peliculas(item): item.action = 'episodios' item.contentSerieName = title item.contentTitle = '' - elif 'collezione' in item.fulltitle.lower(): + elif 'collezion' in item.fulltitle.lower() or \ + 'raccolt' in item.fulltitle.lower() or \ + 'filmografia' in item.fulltitle.lower(): item.args = 'collection' item.action = 'peliculas' item.contentTitle = title item.contentSerieName = '' - elif 'raccolta' in item.fulltitle.lower(): - item.args = 'raccolta' - 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 = ''