From b9ecf6aa9871d61c0b5cb0a7d179c28ede57138e Mon Sep 17 00:00:00 2001 From: Alhaziel Date: Thu, 16 Jan 2020 17:50:42 +0100 Subject: [PATCH] Fix Animesaturn --- channels/animesaturn.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/channels/animesaturn.py b/channels/animesaturn.py index 6650f81a..cf528b3d 100644 --- a/channels/animesaturn.py +++ b/channels/animesaturn.py @@ -87,9 +87,9 @@ def peliculas(item): if item.args == 'incorso': patron = r'"slider_title"\s*href="(?P[^"]+)">]+>(?P[^\(<]+)(?:\((?P<year>\d+)\))?</a>' else: patron = r'href="(?P<url>[^"]+)"[^>]+>[^>]+>(?P<title>.+?)(?:\((?P<lang>ITA)\))?(?:(?P<year>\((\d+)\)))?</span>' action = 'check' - def itemHook(item): - item.url = item.url.replace('www.','') - return item + def itemHook(item): + item.url = item.url.replace('www.','') + return item return locals() @@ -120,10 +120,11 @@ def episodios(item): def findvideos(item): support.log() itemlist = [] - urls = support.match(item, patron=r'<a href="([^"]+)"><div class="downloadestreaming">', headers=headers).matches + # support.dbg() + urls = support.match(item, patron=r'<a href="([^"]+)"><div class="downloadestreaming">', headers=headers, debug=False).matches if urls: - links = support.match(urls[0].replace('www.',''), patron=r'(?:<source type="[^"]+"\s*src=|file:\s*)"([^"]+)"', headers=headers).matches - for link in links: + links = support.match(urls[0].replace('www.',''), patron=r'(?:<source type="[^"]+"\s*src=|file:\s*)"([^"]+)"', headers=headers, debug=False) + for link in links.matches: itemlist.append( support.Item(channel=item.channel, action="play", @@ -135,7 +136,7 @@ def findvideos(item): show=item.show, contentType=item.contentType, folder=False)) - return support.server(item, itemlist=itemlist) + return support.server(item, links, itemlist=itemlist)