From 58ca87ce64ee0451cdaeefbae221e7f02272e5b7 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Fri, 23 Jun 2023 18:26:15 +0200 Subject: [PATCH] Fix AnimeWorld --- channels/animeworld.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/channels/animeworld.py b/channels/animeworld.py index 7bb9aab9..11ece706 100644 --- a/channels/animeworld.py +++ b/channels/animeworld.py @@ -4,7 +4,7 @@ # thanks to fatshotty # ---------------------------------------------------------- -from core import httptools, support, config +from core import httptools, support, config, jsontools host = support.config.get_channel_url() __channel__ = 'animeworld' @@ -186,8 +186,9 @@ def findvideos(item): title = support.match(url, patron=r'http[s]?://(?:www.)?([^.]+)', string=True).match itemlist.append(item.clone(action="play", title=title, url=url, server='directo')) else: - json = support.match(host + '/api/episode/info?id=' + epID + '&alt=0', headers=headers).json - # json = jsontools.load(dataJson) + dataJson = support.match(host + '/api/episode/info?id=' + epID + '&alt=0', headers=headers).data + json = jsontools.load(dataJson) + title = support.match(json['grabber'], patron=r'server\d+.([^.]+)', string=True).match if title: itemlist.append(item.clone(action="play", title=title, url=json['grabber'].split('=')[-1], server='directo')) else: urls.append(json['grabber'])