Fix AnimeWorld

This commit is contained in:
Alhaziel01
2023-06-23 18:26:15 +02:00
parent 60807b637b
commit 58ca87ce64
+4 -3
View File
@@ -4,7 +4,7 @@
# thanks to fatshotty # thanks to fatshotty
# ---------------------------------------------------------- # ----------------------------------------------------------
from core import httptools, support, config from core import httptools, support, config, jsontools
host = support.config.get_channel_url() host = support.config.get_channel_url()
__channel__ = 'animeworld' __channel__ = 'animeworld'
@@ -186,8 +186,9 @@ def findvideos(item):
title = support.match(url, patron=r'http[s]?://(?:www.)?([^.]+)', string=True).match title = support.match(url, patron=r'http[s]?://(?:www.)?([^.]+)', string=True).match
itemlist.append(item.clone(action="play", title=title, url=url, server='directo')) itemlist.append(item.clone(action="play", title=title, url=url, server='directo'))
else: else:
json = support.match(host + '/api/episode/info?id=' + epID + '&alt=0', headers=headers).json dataJson = support.match(host + '/api/episode/info?id=' + epID + '&alt=0', headers=headers).data
# json = jsontools.load(dataJson) json = jsontools.load(dataJson)
title = support.match(json['grabber'], patron=r'server\d+.([^.]+)', string=True).match 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')) if title: itemlist.append(item.clone(action="play", title=title, url=json['grabber'].split('=')[-1], server='directo'))
else: urls.append(json['grabber']) else: urls.append(json['grabber'])