Merge branch 'master' into animtime

master
Arjix 2021-04-17 15:10:33 +03:00 committed by GitHub
commit f379be65a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 9 deletions

View File

@ -54,7 +54,8 @@ Yeah. Me too! That's why this tool exists.
## Supported Sites
**Details about the sites can be found in [FAQ](https://github.com/vn-ki/anime-downloader/wiki/FAQ)**
- 4Anime - requires jsbeautifier
- 4Anime
- AnimTime
- AnimeBinge
- Animedaisuki

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 = helpers.soupify(resp).source['src']
return [('no_extractor', stream_url)]
"""

View File

@ -207,11 +207,11 @@ def parse_ep_str(anime, grammar):
else:
from anime_downloader.sites.anime import AnimeEpisode
if grammar == '0':
if episode_grammar == '0':
ep = sorted(anime._episode_urls)[-1]
else:
ep = [x for x in anime._episode_urls if x[0]
== int(grammar)][0]
== int(episode_grammar)][0]
ep_cls = AnimeEpisode.subclasses[anime.sitename]