4anime source change.

MIght need some more testing, but it is working.
master
Gizmofire 2021-04-02 16:50:16 -07:00 committed by GitHub
parent a0e5434bfc
commit 941a20889b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 6 deletions

View File

@ -49,12 +49,7 @@ class Anime4Episode(AnimeEpisode, sitename='4anime'):
'user-agent': HEADERS[self.hash_url(self.url, len(HEADERS))]}
resp = helpers.get(self.url, headers=self.headers)
text = re.search(r"(eval\(function\(p,a,c,k,e,d\).*source.*\))", resp.text).group(1)
text = helpers.deobfuscate_packed_js(text)
# E.g. document.write( '<a class=\"mirror_dl\" href=\"https://v3.4animu.me/One-Piece/One-Piece-Episode-957-1080p.mp4\"><i class=\"fa fa-download\"></i> Download</a>' );
stream_url = re.search(r"src=\\\\\"(.*)\\\\\" type", str(helpers.soupify(f"<script>{text}</script>"))).group(1)
stream_url = soupify(resp).source['src']
return [('no_extractor', stream_url)]
"""