anime-dl / anime-downloader

A simple but powerful anime downloader and streamer.
The Unlicense
1.92k stars 218 forks source link

fixed 4anime & added an unpacker for packed js that uses pure python #644

Closed ArjixWasTaken closed 3 years ago

ArjixWasTaken commented 3 years ago

needs testing

ArjixWasTaken commented 3 years ago

i did test it, but i can never be 100% sure so go wild testing

ArjixWasTaken commented 3 years ago

too bad that more and more providers depend on nodejs... maybe we should write our own unpacker for p,a,c,k,e,d js

ArjixWasTaken commented 3 years ago

found this beauty: https://github.com/beautify-web/js-beautify/blob/main/python/jsbeautifier/unpackers/packer.py will do some tests on it

ArjixWasTaken commented 3 years ago

aight, now 4anime doesnt use nodejs at all

ArjixWasTaken commented 3 years ago

the unpacker can be used like this:

from anime_downloader.sites import helpers

result = helpers.deobfuscate_packed_js(packed_js_string)
ArjixWasTaken commented 3 years ago

changed it to import the unpackers instead of just copy pasting their code in anime dl

ArjixWasTaken commented 3 years ago

this pr once again works

ArjixWasTaken commented 3 years ago

Ok, so I finished testing. The unpacker returns its own input if jsbeautifier is not installed. That way, it has the same result as if it was not there at all.