diff --git a/fastanime/libs/anime_provider/animepahe/utils.py b/fastanime/libs/anime_provider/animepahe/utils.py index ef25a9b..3769a3c 100644 --- a/fastanime/libs/anime_provider/animepahe/utils.py +++ b/fastanime/libs/anime_provider/animepahe/utils.py @@ -21,12 +21,12 @@ def animepahe_embed_decoder( encoded_js_p: str, base_a: int, no_of_keys_c: int, - key_values_k: list, - decode_mapper_d: dict = {}, + values_to_replace_with_k: list, ): + decode_mapper_d: dict = {} for i in range(no_of_keys_c): key = animepahe_key_creator(i, base_a) - val = key_values_k[i] or key + val = values_to_replace_with_k[i] or key decode_mapper_d[key] = val return re.sub( r"\b\w+\b", lambda match: decode_mapper_d[match.group(0)], encoded_js_p @@ -64,18 +64,12 @@ def process_animepahe_embed_page(embed_page: str): if __name__ == "__main__": - data = """""" - p = "h o='1D://1C-11.1B.1A.1z/1y/11/1x/1w/1v.1u';h d=s.r('d');h 0=B 1t(d,{'1s':{'1r':i},'1q':'16:9','D':1,'1p':5,'1o':{'1n':'1m'},1l:['7-1k','7','1j','1i-1h','1g','1f-1e','1d','D','1c','1b','1a','19','C','18'],'C':{'17':i}});8(!A.15()){d.14=o}x{j z={13:12,10:Z,Y:X,W:i,V:i};h c=B A(z);c.U(o);c.T(d);g.c=c}0.3(\"S\",6=>{g.R.Q.P(\"O\")});0.N=1;k v(b,n,m){8(b.y){b.y(n,m,M)}x 8(b.w){b.w('3'+n,m)}}j 4=k(l){g.L.K(l,'*')};v(g,'l',k(e){j a=e.a;8(a==='7')0.7();8(a==='f')0.f();8(a==='u')0.u()});0.3('t',6=>{4('t')});0.3('7',6=>{4('7')});0.3('f',6=>{4('f')});0.3('J',6=>{4(0.q);s.r('.I-H').G=F(0.q.E(2))});0.3('p',6=>{4('p')});" - result = animepahe_embed_decoder( - p, - a, - c, - k, - ) - print(result) # Output: j player = B A(); + print(process_animepahe_embed_page(data))