From 2e794b1c6f125189656d2985bc7ea0d1855bde75 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Tue, 21 Jul 2020 20:14:22 +0200 Subject: [PATCH] Fix AnimeWorld --- channels/animeworld.py | 94 +++++++++++++++++++++++++++++++----------- 1 file changed, 70 insertions(+), 24 deletions(-) diff --git a/channels/animeworld.py b/channels/animeworld.py index 727ea78c..c7b4005c 100644 --- a/channels/animeworld.py +++ b/channels/animeworld.py @@ -1,12 +1,15 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------ # Canale per animeworld +# thanks to fatshotty # ---------------------------------------------------------- from core import support, jsontools +from platformcode import config +from lib import js2py host = support.config.get_channel_url() -headers = [['Referer', host]] +headers = {} __channel__ = 'animeworld' @@ -15,6 +18,38 @@ def order(): # Seleziona l'ordinamento dei risultati return str(support.config.get_setting("order", __channel__)) +def get_data(item, head=[]): + global headers + for h in head: + headers[h[0]] = h[1] + if not item.count: item.count = 0 + if not config.get_setting('KTVSecurity', item.channel): + # resolve js for key + jshe = 'var document = {}, location = {}' + aesjs = str(support.match(host + '/aes.min.js').data) + jstr = support.match(item.url, patron=r'