Coder Social home page Coder Social logo

anime-dl / anime-downloader Goto Github PK

View Code? Open in Web Editor NEW
1.9K 65.0 223.0 1.67 MB

A simple but powerful anime downloader and streamer.

License: The Unlicense

Python 100.00%
anime downloader 9anime kissanime anime-downloader episodes batch nyaa hacktoberfest

anime-downloader's Introduction

anime-dl

Rewrite of anime-dl/anime-downloader from scratch.

anime-downloader's People

Contributors

29ayush avatar abdullahm0hamed avatar andrewlef avatar animeavi avatar arjixwastaken avatar autumnalmodding avatar bg1987 avatar blatzar avatar chenrui333 avatar cylow98 avatar dekan avatar dependabot[bot] avatar displicit avatar enderlein avatar iguanasinpyjamas avatar lagradost avatar lieux avatar literacyfanatic avatar mrigank11 avatar nate-moo avatar natezyz avatar nexwastaken avatar ngomile avatar phanirithvij avatar pjzzz avatar raitaroh avatar slagrave avatar sreekaransrinath avatar thecow61 avatar vn-ki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

anime-downloader's Issues

Got this error after downloading 60 episodes

Describe the bug
I was downloading bleach episodes with the command "anime dl bleach" then all of a sudden i got an error. details below.

anime dl bleach

Traceback (most recent call last):
  File "c:\python\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\python\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python\Scripts\anime.exe\__main__.py", line 9, in <module>
  File "c:\python\lib\site-packages\click\core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "c:\python\lib\site-packages\click\core.py", line 697, in main
    rv = self.invoke(ctx)
  File "c:\python\lib\site-packages\click\core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\python\lib\site-packages\click\core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\python\lib\site-packages\click\core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "c:\python\lib\site-packages\click\decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "c:\python\lib\site-packages\anime_downloader\cli.py", line 133, in dl
    format=file_format)
  File "c:\python\lib\site-packages\anime_downloader\sites\anime.py", line 180, in download
    total_size = int(r.headers['Content-length'])
  File "c:\python\lib\site-packages\requests\structures.py", line 52, in __getitem__
    return self._store[key.lower()][1]
KeyError: 'content-length'

random stopping issue

hey, sorry for bothering you, but it seems I have managed to run into an issue. Hopefully this isnt a waste of your time.

C:\Windows\System32>anime dl blackclover --url --provider kissanime
�[32manime�[0m: anime-downloader 3.1.0
 1: Black Clover
 2: Black Clover (TV) (Dub)
 3: Black Clover (TV) (Sub)

Enter the anime no:  [1]: 2
anime: Selected Black Clover (TV) (Dub)
anime: Extracting episode info from page
anime: Found anime: Black Clover (TV) (Dub)
anime: Quality 720p not found. Trying 360p.
Traceback (most recent call last):
  File "c:\program files (x86)\python36-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\program files (x86)\python36-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Program Files (x86)\Python36-32\Scripts\anime.exe\__main__.py", line 9, in <module>
  File "c:\program files (x86)\python36-32\lib\site-packages\click\core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "c:\program files (x86)\python36-32\lib\site-packages\click\core.py", line 697, in main
    rv = self.invoke(ctx)
  File "c:\program files (x86)\python36-32\lib\site-packages\click\core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\program files (x86)\python36-32\lib\site-packages\click\core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\program files (x86)\python36-32\lib\site-packages\click\core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "c:\program files (x86)\python36-32\lib\site-packages\click\decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "c:\program files (x86)\python36-32\lib\site-packages\anime_downloader\cli.py", line 115, in dl
    util.print_episodeurl(episode)
  File "c:\program files (x86)\python36-32\lib\site-packages\anime_downloader\util.py", line 95, in print_episodeurl
    print(episode.source().stream_url)
  File "c:\program files (x86)\python36-32\lib\site-packages\anime_downloader\extractors\base_extractor.py", line 26, in stream_url
    self.get_data()
  File "c:\program files (x86)\python36-32\lib\site-packages\anime_downloader\extractors\base_extractor.py", line 41, in get_data
    raise NotFoundError
anime_downloader.sites.exceptions.NotFoundError`

it looks like an issue with how it finds the quality, but i'm no expert
```

Kissanime search returns episodes rather than series when query returns a single result.

On kissanime, if your search returns only one result, it automatically takes you to the episode page. This is handy when you're using the site, but it causes problems with the tool.

i.e. If you use the command anime dl bakemonogatari --provider kissanime, you get a list that looks like this:

 1: Bakemonogatari Episode 015
 2: Bakemonogatari Episode 014
 3: Bakemonogatari Episode 013
 4: Bakemonogatari Episode 012
 5: Bakemonogatari Episode 011
 6: Bakemonogatari Episode 010
 7: Bakemonogatari Episode 009
 8: Bakemonogatari Episode 008
 9: Bakemonogatari Episode 007
10: Bakemonogatari Episode 006
11: Bakemonogatari Episode 005.5 (Recap)
12: Bakemonogatari Episode 005
13: Bakemonogatari Episode 004
14: Bakemonogatari Episode 003
15: Bakemonogatari Episode 002
16: Bakemonogatari Episode 001

And if you choose one of the episodes, you get the error 'NoneType' object has no attribute 'text'

Perhaps the tool could mimic kissanime and just skip the selection process and head straight to downloading the series if there is only one search result.

If you're working on this, the queries "Made in Abyss" and "Saint Young Men" both do the same thing.

Default file hoster

I was testing out the anime dl function on 9anime when I noticed that the default source is RapidVideo. Is there any way that the source can be changed? RapidVideo is nice since it has quality options, but the other sources are far more consistent with quality.

Can't perform a search when selecting a provider

When using the new --provider option with kissanime, the following error is thrown:

(venv) PS D:\git\anime-downloader> anime dl "made in abyss" --provider kissanime
anime: anime-downloader 2.6.0
anime: 'NoneType' object has no attribute 'search'

It if I choose 9anime it does allow me to search, but that ends after I make a selection and AnimeDLError is thrown. (seems 9anime changed their token again)

9anime downloading not working

Running latest version, have even tried uninstall/reinstall. Receiving this message for every download

�[32manime�[0m: Found anime: JoJo's Bizarre Adventure: Stardust Crusaders - Battle in Egypt (Dub)
�[32manime�[0m: Downloading to C:\Users\username\Videos\Anime
�[32manime�[0m: Quality 720p not found. Trying 360p.
�[32manime�[0m: Quality 360p not found. Trying 1080p.
�[32manime�[0m: Downloading episode 1 of JoJo's Bizarre Adventure: Stardust Crusaders - Battle in Egypt (Dub)
Traceback (most recent call last):
File "c:\users\username\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\users\username\appdata\local\programs\python\python37\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\username\AppData\Local\Programs\Python\Python37\Scripts\anime.exe_main
.py", line 9, in
File "c:\users\username\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 722, in call
return self.main(*args, **kwargs)
File "c:\users\username\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "c:\users\username\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\username\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\username\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "c:\users\username\appdata\local\programs\python\python37\lib\site-packages\click\decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "c:\users\username\appdata\local\programs\python\python37\lib\site-packages\anime_downloader\cli.py", line 128, in dl
file_format, path=download_dir)
File "c:\users\username\appdata\local\programs\python\python37\lib\site-packages\anime_downloader\util.py", line 163, in external_download
cmd = format_command(cmd, episode, file_format, path=path)
File "c:\users\username\appdata\local\programs\python\python37\lib\site-packages\anime_downloader\util.py", line 143, in format_command
'stream_url': episode.source().stream_url,
File "c:\users\username\appdata\local\programs\python\python37\lib\site-packages\anime_downloader\extractors\base_extractor.py", line 26, in stream_url
self.get_data()
File "c:\users\username\appdata\local\programs\python\python37\lib\site-packages\anime_downloader\extractors\base_extractor.py", line 41, in get_data
raise NotFoundError
anime_downloader.sites.exceptions.NotFoundError

errorCode 19

Describe the bug

After downloading more than 70 episodes of an Anime,it suddenly started giving me this error:

anime: Downloading episode 112 of Fairy Tail (Sub)

07/14 16:57:19 [NOTICE] Downloading 1 item(s)

07/14 16:57:19 [ERROR] CUID#7 - Download aborted. URI=https://www506.playercdn.net/173/0/YQP6zD5DBZMiOYTFngdJVw/1531623439/170427/6iXPJXswijp2FOR.mp4
Exception: [AbstractCommand.cc:351] errorCode=19 URI=https://www506.playercdn.net/173/0/YQP6zD5DBZMiOYTFngdJVw/1531623439/170427/6iXPJXswijp2FOR.mp4
  -> [AbstractCommand.cc:792] errorCode=19 CUID#7 - Name resolution for www506.playercdn.net failed:Domain name not found

07/14 16:57:19 [NOTICE] Download GID#aa6433af9f705a65 not complete: /media/johnpyp/sdb3/tv/Fairy_Tail/Fairy Tail - s01e112.mp4

Download Results:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
aa6433|ERR |       0B/s|/media/johnpyp/sdb3/tv/Fairy_Tail/Fairy Tail - s01e112.mp4

Status Legend:
(ERR):error occurred.

aria2 will resume download if the transfer is restarted.
If there are any errors, then see the log file. See '-l' option in help/man page for details.

And in turn stopping the process.

Now I might be able to download 3-4 episodes before it stops working again.
To reproduce

anime dl -e 1:175 'http://kissanime.ru/Anime/Fairy-Tail' -xd "{aria2}" -q 360p --provider kissanime --download-dir ./Fairy_Tail -ff "Fairy Tail - s01e{ep_no}"

Same issue when searching rather than using a direct url.

LOG
$ anime dl -e 112:175 'http://kissanime.ru/Anime/Fairy-Tail' -xd "{aria2}" -q 360p --provider kissanime --download-dir ./Fairy_Tail -ff "Fairy Tail - s01e{ep_no}" --log-level DEBUG
INFO root: anime-downloader 3.2.0
DEBUG root: Platform: Linux-4.15.0-24-generic-x86_64-with-Ubuntu-18.04-bionic
DEBUG root: Python 3.6.5
INFO root: Extracting episode info from page
DEBUG root: Unfiltered episodes : ['http://kissanime.ru/Anime/Fairy-Tail/Episode-175?id=26397', 'http://kissanime.ru/Anime/Fairy-Tail/Episode-174?id=25364', 'http://kissanime.ru/Anime/Fairy-Tail/Episode-173?id=24123',
// Long list of episodes
'http://kissanime.ru/Anime/Fairy-Tail/Episode-001?id=816']
DEBUG root: Filtered episodes : ['http://kissanime.ru/Anime/Fairy-Tail/Episode-175?',
// Long list of episodes
'http://kissanime.ru/Anime/Fairy-Tail/Episode-001?id=816']
DEBUG root: EPISODE IDS: length: 175, ids: ['http://kissanime.ru/Anime/Fairy-Tail/Episode-001?id=816', 'http://kissanime.ru/Anime/Fairy-Tail/Episode-002?id=817', 'http://kissanime.ru/Anime/Fairy-Tail/Episode-003?id=818', 'http://kissanime.ru/Anime/Fairy-Tail/Episode-004?id=819', 
// Long list of episodes
'http://kissanime.ru/Anime/Fairy-Tail/Episode-175?id=26397']
INFO root: Found anime: Fairy Tail (Sub)
INFO root: Downloading to /media/johnpyp/sdb3/tv/Fairy_Tail
DEBUG root: Extracting stream info of id: http://kissanime.ru/Anime/Fairy-Tail/Episode-112?id=734
DEBUG root: Calling url: http://kissanime.ru/Anime/Fairy-Tail/Episode-112?id=734&s=rapidvideo
DEBUG root: Calling Rapid url: https://www.rapidvideo.com/e/FF2TV2UHL7&q=360p
INFO root: Downloading episode 112 of Fairy Tail (Sub)
DEBUG root: cmd: {aria2}
DEBUG root: episode: <anime_downloader.sites.kissanime.KissanimeEpisode object at 0x7f04bfe76e10>
DEBUG root: file format: Fairy Tail - s01e{ep_no}
DEBUG root: formatted cmd: aria2c https://www506.playercdn.net/173/0/304GNCnncWrO-6BohJ82yw/1531623911/170427/6iXPJXswijp2FOR.mp4 -x 12 -s 12 -j 12 -k 10M -o Fairy Tail - s01e112.mp4 --continue=true --dir=/media/johnpyp/sdb3/tv/Fairy_Tail --stream-piece-selector=inorder --min-split-size=5M

07/14 17:05:12 [NOTICE] Downloading 1 item(s)

07/14 17:05:12 [ERROR] CUID#7 - Download aborted. URI=https://www506.playercdn.net/173/0/304GNCnncWrO-6BohJ82yw/1531623911/170427/6iXPJXswijp2FOR.mp4
Exception: [AbstractCommand.cc:351] errorCode=19 URI=https://www506.playercdn.net/173/0/304GNCnncWrO-6BohJ82yw/1531623911/170427/6iXPJXswijp2FOR.mp4
  -> [AbstractCommand.cc:792] errorCode=19 CUID#7 - Name resolution for www506.playercdn.net failed:Domain name not found

07/14 17:05:12 [NOTICE] Download GID#ab7fc31b72737590 not complete: /media/johnpyp/sdb3/tv/Fairy_Tail/Fairy Tail - s01e112.mp4

Download Results:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
ab7fc3|ERR |        n/a|/media/johnpyp/sdb3/tv/Fairy_Tail/Fairy Tail - s01e112.mp4

Status Legend:
(ERR):error occurred.

aria2 will resume download if the transfer is restarted.
If there are any errors, then see the log file. See '-l' option in help/man page for details.

Needs Documentation

Currently the documentation of anime-downloader is lacking and that's making it difficult to incorporate some changes or just understand what's going on. While I have managed to grasp how this is working for the most part, I think that better comments in the source such as making use of docstrings will be helpful. Not only will this get others like myself up to speed but it will make contributing less painful and understand why some decisions were made. Thank you.

Name of anime not being intepreted as a string

description

When I pass the name of the anime to the dl function, I get an error stating that an extra argument has been passed. It's as if the name of the anime is being split into separate arguments. The command I used is directly copied from the wiki as I was just testing this out now.

anime dl 'code geass' --provider kissanime
LOG ``` Usage: anime-script.py dl [OPTIONS] ANIME_URL

Error: Got unexpected extra argument (geass')

Using Windows 8.1
</details>

NotFoundError on kissanime and 9anime

Version: 3.1.1

In kissmanga and also 9anime when I started downloading code geass it says

anime dl 'code geass' --provider 9anime

Output:

...

anime_downloader.sites.exceptions.NotFoundError

Screenshot:

9animeeeor

anime dl 'code geass' --provider kissanime

Output:

...

anime_downloader.sites.exceptions.NotFoundError

Screenshot:

kissanimeerror

9anime stopped working again on v.3.4.0

Describe the bug
Hey. first of all, really awesome program. thanks for your work and for publishing and maintaining it. :)
to the bug:

To reproduce

tried it on win10 and the ubuntu app from the store. updated node (+node-legacy) and python3 but didin't make any difference.

anime dl "dragon ball" -ll DEBUG
anime dl "dragon ball" -ll DEBUG
INFO root: anime-downloader 3.4.0
DEBUG root: Platform: Linux-4.4.0-17134-Microsoft-x86_64-with-Ubuntu-16.04-xenial
DEBUG root: Python 3.5.2
DEBUG root: https://www8.9anime.is/search?keyword=dragon+ball
DEBUG root: Search results
DEBUG root: Dragon Ball
DEBUG root: Dragon Ball (Dub)
DEBUG root: Dragon Ball Super
DEBUG root: Dragon Ball Z Kai
DEBUG root: Dragon Ball Super Movie (Dub)
DEBUG root: Dragon Ball Z (Uncrop)
DEBUG root: Dragon Ball GT (Dub)
DEBUG root: Dragon Ball Specials
DEBUG root: Dragon Ball Z
DEBUG root: Dragon Ball Z (Dub)
DEBUG root: Dragon Ball Super Movie
DEBUG root: Dragon Ball Super (Dub)
DEBUG root: Dragon Ball GT
DEBUG root: Dragon Ball Z Kai (Dub)
DEBUG root: Dragon Ball Specials (Dub)
DEBUG root: Dragon Ball Z: Resurrection 'F' (Dub)
DEBUG root: Dragon Ball Z: Resurrection 'F'
DEBUG root: Dragon Ball: Episode of Bardock (Dub)
DEBUG root: Dragon Ball: Episode of Bardock
DEBUG root: Dragon Ball Z Movie 12: Fusion Reborn
DEBUG root: Dragon Ball Z Movie 09: Bojack Unbound (Dub)
DEBUG root: Dragon Ball Z Movie 05: Cooler's Revenge (Dub)
DEBUG root: Dragon Ball Z: Saiya-jin Zetsumetsu Keikaku
DEBUG root: Dragon Ball Z Kai: The Final Chapters (Dub)
DEBUG root: Dragon Ball: Super Saiya-jin Zetsumetsu Keikaku (Dub)
DEBUG root: Dragon Ball Z Movie 12: Fusion Reborn (Dub)
DEBUG root: Dragon Ball Special - History of Japan
DEBUG root: Dragon Ball Movie 3: Mystical Adventure (Dub)
DEBUG root: Dragon Ball Z Movie 05: Cooler's Revenge
DEBUG root: Dragon Ball Z Kai: The Final Chapters
 1: Dragon Ball                                 Ep 153/153
 2: Dragon Ball (Dub)                           DUB | Ep 153/153
 3: Dragon Ball Super                           Ep 131/131
 4: Dragon Ball Z Kai                           Ep 98/98
 5: Dragon Ball Super Movie (Dub)               DUB | Preview
 6: Dragon Ball Z (Uncrop)                      Ep ?/291
 7: Dragon Ball GT (Dub)                        DUB | Ep 64/64
 8: Dragon Ball Specials                        Special | Ep 2/2
 9: Dragon Ball Z                               Ep 291/291
10: Dragon Ball Z (Dub)                         DUB | Ep 291/291
11: Dragon Ball Super Movie                     Preview
12: Dragon Ball Super (Dub)                     DUB | Ep 74/131
13: Dragon Ball GT                              Ep 64/64
14: Dragon Ball Z Kai (Dub)                     DUB | Ep 98/98
15: Dragon Ball Specials (Dub)                  Special | DUB | Ep 2
16: Dragon Ball Z: Resurrection 'F' (Dub)       DUB | Movie
17: Dragon Ball Z: Resurrection 'F'             Movie
18: Dragon Ball: Episode of Bardock (Dub)       DUB | OVA
19: Dragon Ball: Episode of Bardock             OVA
20: Dragon Ball Z Movie 12: Fusion Reborn       Movie
21: Dragon Ball Z Movie 09: Bojack Unbound (    DUB | Movie
22: Dragon Ball Z Movie 05: Cooler's Revenge    DUB | Movie
23: Dragon Ball Z: Saiya-jin Zetsumetsu Keik    OVA | Ep 2/2
24: Dragon Ball Z Kai: The Final Chapters (D    DUB | Ep 69/69
25: Dragon Ball: Super Saiya-jin Zetsumetsu     DUB | OVA
26: Dragon Ball Z Movie 12: Fusion Reborn (D    DUB | Movie
27: Dragon Ball Special - History of Japan      Special | Ep 02 RAW/
28: Dragon Ball Movie 3: Mystical Adventure     DUB | Movie
29: Dragon Ball Z Movie 05: Cooler's Revenge    Movie
30: Dragon Ball Z Kai: The Final Chapters       Ep 69/69

Enter the anime no:  [1]: 9
INFO root: Selected Dragon Ball Z
INFO root: Extracting episode info from page
DEBUG root: Metadata scraping error: list index out of range
DEBUG root: data-ts: 1533834000
Traceback (most recent call last):
  File "/usr/local/bin/anime", line 9, in <module>
    load_entry_point('anime-downloader==3.4.0', 'console_scripts', 'anime')()
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/anime_downloader-3.4.0-py3.5.egg/anime_downloader/cli.py", line 99, in dl
  File "/usr/local/lib/python3.5/dist-packages/anime_downloader-3.4.0-py3.5.egg/anime_downloader/sites/anime.py", line 42, in __init__
  File "/usr/local/lib/python3.5/dist-packages/anime_downloader-3.4.0-py3.5.egg/anime_downloader/sites/anime.py", line 60, in get_data
  File "/usr/local/lib/python3.5/dist-packages/anime_downloader-3.4.0-py3.5.egg/anime_downloader/sites/nineanime.py", line 102, in _scarpe_episodes
anime_downloader.sites.exceptions.NotFoundError: ('No episodes found in url "https://www8.9anime.is/watch/dragon-ball-z.51ov"', 'https://www8.9anime.is/watch/dragon-ball-z.51ov')
<details>
<summary>LOG</summary>
</details>

Key error in download

Hi--I just stumbled onto this tool today; I'm trying to download episode 22 from the show Nichijou and I'm erroring out with this error:

  File "/Library/Frameworks/Python.framework/Versions/3.6/bin/anime", line 11, in <module>
    load_entry_point('anime-downloader', 'console_scripts', 'anime')()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/isaiahmayerchak/anime-downloader/anime_downloader/cli.py", line 104, in dl
    format=file_format)
  File "/Users/isaiahmayerchak/anime-downloader/anime_downloader/sites/anime.py", line 150, in download
    total_size = int(r.headers['Content-length'])
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/structures.py", line 52, in __getitem__
    return self._store[key.lower()][1]
KeyError: 'content-length'

I'm looking into it myself and will make a PR if I find a solution, but thought I'd post it here in case someone more familiar with the codebase sees this and instantly knows a quick fix

Kisscartoon not working with Provider command ( Kissanime works )

@vn-ki
i found this when trying to use the downloader to download cartoons from kisscartoon

X:>anime dl --provider KissCartoon "winx"
Usage: anime dl [OPTIONS] ANIME_URL

Error: Invalid value for "--provider": invalid choice: KissCartoon. (choose from 9anime, kissanime)


Kissanime does work:
X:>
X:>anime dl --provider kissanime "no souma"
�[32manime�[0m: anime-downloader 3.1.1
1: Food Wars! The First Plate (Dub)

Find a new primary anime provider

9anime has been unreliable for the past week. A new fix has emerged but it would probably need running javascript on the machine unless someone decides to run a server with that code.

Ref: DxCx/plugin.video.9anime#267

The best way for us would be to move onto a different primary provider. I am asking you guys for suggestions for the new provider because I generally watch old anime and I don't know which websites get the new ones first.

I am thinking of making gogoanime primary after making the code more robust (Right now it has lots of bugs).

Please note the suggestion should not be cloudflare secured.

Different results for same command

Bug

The output was different for same command

Importance

Not Important
I don't think this is an important issue.
But I think this issue has zero probability to occur.

anime dl 'gintama' --provider kissanime

Output:

anime: anime-downloader 3.1.1
 1: Hikari to Mizu no Daphne Specials (Dub) 	                    

Enter the anime no:  [1]:
anime dl 'gintama' --provider kissanime

Output:

anime: anime-downloader 3.1.1
 1: Gintama                                 	                    
 2: Gintama Season 4 (Dub)                  	                    
 3: Gintama Season 4 (Sub)                  	                    
 4: Gintama Season 5                        	                    
 5: Gintama Season 6                        	                    
 6: Gintama Season 7                        	                    
 7: Gintama Season 8                        	                    
 8: Gintama: Aizome Kaori-hen               	                    
 9: Gintama: Dai Hanseikai                  	                    
10: Gintama: Jump Festa 2005 Special        	                    
11: Gintama: Jump Festa 2008 Special        	                    
12: Gintama: Jump Festa 2014 Special        	                    
13: Gintama: Jump Festa 2015 Special        	                    
14: Gintama: Kanketsu-hen - Yorozuya yo Eien	                    
15: Gintama: Shinyaku Benizakura-hen (Dub)  	                    
16: Gintama: Shinyaku Benizakura-hen (Sub)  	                    
17: Gintama: Shinyaku Benizakura-hen Special	                    
18: Gintama: Yorinuki Gintama-san on Theater	                    

Enter the anime no:  [1]: 

To reproduce

I don't think it's possible to reproduce

Debug info

I was unable to reproduce the different results

Additional info

Screen Shot:

gintamaerr

Support more sites

  • Gogoanime
  • Masterani
  • Kisscartoon (?)
  • twist.moe
  • animepahe.com
  • animeflv.net
  • itsaturday.com
  • http://animeflix.io (very easy, has an API)
  • animefreak
  • Ryuanime
  • kickassanime
  • animekisa (captcha?)
  • chia-anime.tv
  • turkanime.tv
  • animebam.se
  • wonderfulsubs (dash stream, needs hls downloader)
  • kimcartoon (has encryption for urls)
  • Animehaven (has captcha)
  • www13.animeultima.eu (very easy, iframes episode page, episode page has stream url)

Suggestions accepted.

Errors when search result returns nothing.

When a search result in anime watch --new returns nothing (i.e. anime watch --new "Kanpai"), it still displays a list of search results, even though it's completely empty.
image

If you select an option, it aborts the search, telling you to input a number less than 31:
image

I think this should be made more graceful. There should either be an option for the user to abort the search on their own or it should tell the user that there are no search results and then abort.

nineanime.py error

Describe the bug
Download error when downloading from 9anime.is. It was downloading fine till 12 hr ago.

To reproduce command used below
anime dl https://www7.9anime.is/watch/one-piece-dub.34r/0vmw79 --episodes 380:401 --quality 360p --log-level DEBUG

LOG INFO root: anime-downloader 3.1.1 DEBUG root: Platform: Windows-10-10.0.17134-SP0 DEBUG root: Python 3.7.0 INFO root: Extracting episode info from page DEBUG root: data-ts: 1531382400 DEBUG root: EPISODE IDS: length: 572, ids: ['v07k4l', 'q37rr5', 'y6wn3z', '1wz61p', '5m1ln9', 'xz240v', '8p1oqy', 'j0wxk3', 'l21zm6', '4lwmlx', 'xz24ow', '0v07vr', 'p1wq19', '4lwk0j', 'j0wx73', 'k09y76', 'm83nz8', 'n0w17j', 'p1w97x', 'm83nz7', 'v07ko6', 'xz24x3', 'y6wnx1', '1wz65q', '3k9j59', 'm8380z', 'n0w018', 'o04028', 'p1w196', 'l2xmz3', 'q37343', '8p2qoo', 'r0305q', '3k0lw6', 'v070k4', 'wzwzl4', 'xz2zmq', 'y6w6nx', 'zzwzop', '0v0v5k', '1wzw6m', '2jwj7l', '3k9kj2', '4lwlkk', '5m1ml0', '6n1n29', '7o1o4j', '8p1p6n', '9q1q80', 'j0w0o2', 'k090q9', 'l212vn', 'm838xz', 'n0w0z8', 'o04018', 'p1w136', '3k9188', 'q37353', 'r0307q', 'l21y5z', 'v070p4', 'wzwzr4', 'xz2zwq', 'y6w6yx', 'zzwz0p', '0v0vnk', 'xz1qpz', '1wzwpm', '2jwjrl', '3k9kw2', '4lwlyk', 'r03yvy', '5m1m00', '6n1499', 'k0x7w9', '6n1zop', '3k0zr2', '7o19mj', '8p14kn', 'j0w8n2', 'k09jo9', 'l21kpn', 'm83lmz', 'n0wmn8', 'p1wok6', 'r03qmq', 'xz1qjq', 'y6w01x', '1wz42m', '4lw4rk', 'l2x7rn', '5mwj90', '6n14l9', 'j0w8v2', 'j0w8v3', 'n0wm3m', 'p1worq', 'v0qoq4', 'wzw017', 'zzw6lm', '3k947r', '5m17k9', '9q142m', 'l21k36', 'j027w2', 'o04no5', 'r03qjn', 'xz20j3', '0v04r5', '3k94pr', '4lw42j', '5m1799', '6n14w0', '9q140m', 'm83lv8', 'p1wopq', 'v07x9l', 'y6w0vz', 'r0ok3n', '9qjnym', '1wz4qp', '5m17w9', 'rqlz9q', '7o1901', 'j0w823', 'p1womq', 'wzw0q7', 'j027z3', 'y6w0jz', '1wz47p', 'y6jr8z', 'l2x7y6', '4lw4wj', '7o1911', '9q141m', 'k09j94', 'm83l38', 'zzw65l', '4lw4xx', '9q14yq', 'l21knm', 'p1wo4x', 'r03qrp', 'xz20xw', 'zzw68l', '0vmwo5', '3k94v9', '6n14jz', 'j02763', '9q14mq', 'o04374', 'l21k8m', 'n0wm4j', '2j7xj0', 'r03q4p', 'wzw08l', '9qjn3q', 'zzw6ql', 'y6jr61', '1wz49q', '4lw4zx', 'm8j787', '7o19zy', 'j0w838', 'm83ly7', '1wz9xx', 'o04n3y', '3k0z49', 'r03qyp', 'v07xm6', 'm83y1v', 'y6w091', 'xz1q0w', '1wz4yq', 'k0x766', '0vmw79', 'p1m7q9', 'l2x77q', '8p2m5q', '5mwj6m', 'v0qo37', '4lw49x', 'p1m7vj', 'k0x7nv', '9qjnvx', '6n0k57', '1w7x6x', 'p1m734', 'o0lk94', '7o19yy', '9q147q', 'k0xzww', 'l21k4m', '6n07lp', 'j0w86y', 'l21k4q', 'o04n8z', 'q37p25', 'v07xjv', 'xz19jq', 'q3zmn3', 'l2x0xn', '6n0719', 'y6jxwx', 'l2x0n6', '9qj5mm', 'q3zm8j', 'm8j148', 'k0xz16', 'y6jx01', 'wzqv0l', 'wzqv3l', 'm8j1np', 'l2x07q', '6n0774', '1w758v', 'y6jx7j', 'n0kjqn', '8p25wv', '2j05l4', 'wzqvj6', 'p1ml9j', 'm8j10x', '1w75px', 'v0qln2', 'o0lyj4', 'm8jwqv', 'k0xr3w', '4l162k', '0vm6mk', 'o0ly48', '9qj6y0', '8p29ln', '2j06q2', 'zzkpqm', 'p1mz2q', 'n0kx6m', '9qj6qm', 'xz1nzw', 'wzqm0l', 'm8jw57', '7o07py', 'zzkpvl', 'm8jw7p', '8p295q', '6n0664', '2j06mq', 'wzqm2o', 'j02qm4', '9qj6vx', '2j0614', 'o0ly2j', '4l16km', 'r0o17o', 'k0xrqv', 'zzk7r3', 'v0q3v2', 'l2xq33', '7o0rw6', 'y6j7v0', 'k0xpx9', '5mwpw0', '4l1owk', 'v0q3y4', 'l2xq8n', '4l1ovk', 'r0ozyn', '9qjw7m', 'zzk72m', 'o0lw65', '4l1olj', 'v0q30l', '9qjw4m', 'o0lwny', '4l1o8x', 'p1mx5x', '7o0rpy', 'v0q3z6', '8p2vm3', 'wzq7pl', 'j029y8', '1w7l8v', 'r0ozzm', 'j0299y', '6n0qr4', 'zzk79w', 'o0lwzj', '5mwp4j', 'v0q3k7', '4l1okm', 'p1mx3j', '2j0mr4', 'r0oxmo', 'k0xnov', 'zzkjl3', 'o0lro4', '5mwqkq', 'r0oxwy', '8p2wxo', 'xz131z', 'j02mwn', 'q3zw73', '6n0rx9', 'xz13xq', '8p2wln', '5mwqv0', 'q3zw83', 'm8jp48', 'l2xo66', 'm8jp88', 'j02m83', 'l2xo56', '9qjxrq', 'j02m78', '9qjx5q', '4l1p6x', 'v0q13v', 'r0oxxm', 'p1mvv9', '4l1pn7', 'v0q16v', 'j02mry', 'y6w0mj', 'r0ox5o', 'j02mx4', 'zzkj02', 'l2xovz', '1w7k2w', 'l2xjpz', 'y6jzqp', 'j024jn', '0vmjr7', 'v0qw92', 'r0opoy', 'v0qw72', 'j024l2', 'o0lmv8', 'l2xjyn', 'l2xj4n', 'l2xj6n', '5mwom9', '7o0q91', '4l1n8j', '1w7k1p', 'q3zorw', 'n0kl7j', 'p1mnlx', 'v0qwl6', 'r0opxm', 'v0qwwv', 'zzk9mw', '5mwolm', '2j0lr4', '3k02q8', '2j01o4', '4l13jm', '0vmzq7', '1w707x', '4l13wo', '2j01x5', '0vmzxk', '2j01ql', '2j01zl', '8p2jpn', '1w70wp', '4l138j', '5mw4n9', '3k02zr', 'xz1kqw', '3k0269', '9qjkwq', 'j02rmy', 'v0q66v', 'n0kyyl', 'y6jlyj', '0vm5p3', 'zzkol2', '2j0794', '6n0mw7', '2j7j95', '9qjp18', 'j02xzn', 'm8j0yv', 'l2xz4n', 'n0k168', 'n0k108', 'p1m9oq', 'o0l255', 'zzko4m', 'y6jnrz', 'o0l2ky', 'l2xz9m', 'k0xyp6', 'l2xzom', '7o0nqy', 'zzkomw', 'q3z415', 'k0xyyr', 'j02xoy', '6n0294', 'zzk0l2', 'wzqro6', 'xz1wv8', 'v0qpq7', 'l2xv13', '7o0416', '6n02xp', '0vmnx7', 'y6jyp0', 'p1m326', 'm83ywv', 'l2xv6n', 'j02o02', '7o049j', 'r0o7qq', '7o048j', 'wzqr37', 'o0l1p5', 'l2xv76', 'l2xv06', 'j02oq3', '2j0rm0', 'wzqr7l', 'y6jyz1', 'y6jyl1', 'n0kzyl', 'o0l12z', 'q3z555', 'zzwrlw', 'm83m2x', 'j0wnj4', '6n19w7', '3k9q08', '3k9q98', 'r03mry', 'q37lvv', 'k09o8w', 'n0wn2k', 'l21p6n', 'l21p2n', 'o049n8', 'n0wn58', 'l21pmn', 'k09o74', 'k09oz4', 'xz2pn3', 'wzw97l', '0v0pjr', '4lwr3x', '8p1ko3', '5m1r0m', '6n1l94', '3k9rry', '9q1o2n', 'y6wqvp', 'wzw1q6', '0v0439', '3k943y', '5m173m', '8p143q', 'xz2r28', 'k09j1r', 'm83l6p', 'q37p65', '0v0o67', 'wzw0zo', '2jw4jq', '4lw4l7', '6n14n4', '9q14qn', 'k09j0r', 'r03lro', 'n0wm0l', 'p1wo19', 'q37p35', 'j0wvzn', 'r03qqm', 'v07xxv', 'k09w8w', 'wzw00o', '8p10zo', '7o1jy6', '7o1j36', '0v02vk', 'xz200v', 'y6w00j', 'zzw66w', 'y6wq0x', 'p1wr56', '0v0449', '1wz44v', '2jw44q', 'p1wrq6', 'k09w79', '3k944y', '4lwq5j', '2jwo62', '4lw447', 'xz2rn3', 'l21lq6', '5m12q9', 'r03lxp', '7o1jqy', '2jwo10', 'xz2rkw', 'n0w31j', 'j0wvo8', 'y6wk1j', 'v075vv', 'n0wr3l', '3k977y', 'v0759v', '6n1vw4', 'p1wjmj', '3k9708', 'r03j3o', '5m1k1j', 'v075y7', 'k09kmv', '6n1vj7', 'xz2joz', 'l21343', '4lwj9o', 'p1wj64', '9q1238', '2jw9j5', 'm83qlz', '4lwj4k', 'xz2j5q', 'k09kl9', '7o1wlj', '2jw9yl', 'n0wrjm', '5m1k69', 'xz2jn3', 'n0wrvm', 'zzw1jm', 'n0wrlj', '3k9729', 'v07566', 'l213zm', '9q128q', 'm83vm7', '7o12j8', '1wzqrv', 'n0wprl', '7o1228', 'xz2v1v', 'n0wpwn', '7o1217', '4lw2xm', 'xz2v88', 'xz2vo8', 'k0934w', '6n1wyp', '0v0q37', 'm83v8v', '4lw2lo', 'v079x2', '7o1296', 'm83v5z', 'k0k2jv', '3k7v88', 'v05847', 'o0ov5j', 'j0jz04', '7owk97', 'l2346q', '2j9zz0', '9q277q', 'k0k44r', '8pn73q'] INFO root: Found anime: One Piece (Dub) INFO root: Downloading to Y:\TV\One Piece DEBUG root: Extracting stream info of id: 2j7j95 DEBUG root: API call URL: https://9anime.is/ajax/episode/info with params {'id': '2j7j95', 'server': '33', 'ts': '1531382400', '_': 674} DEBUG root: URL: https://www8.9anime.is/ajax/episode/info?id=2j7j95&server=33&ts=1531382400&_=674 DEBUG root: Returned data: {'error': 'token'} DEBUG root: API call URL: http://9anime.cloud/ajax/episode/info with params {'id': '2j7j95', 'server': '33'} DEBUG root: URL: http://9anime.cloud/ajax/episode/info?id=2j7j95&server=33 DEBUG root: Returned data: {'error': 'token'} Traceback (most recent call last): File "c:\python\lib\site-packages\anime_downloader\sites\nineanime.py", line 33, in _get_sources url = get_stream_url(self._base_url, params) File "c:\python\lib\site-packages\anime_downloader\sites\nineanime.py", line 30, in get_stream_url return data['target'] KeyError: 'target'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\python\lib\site-packages\anime_downloader\sites\nineanime.py", line 42, in _get_sources
url = data['target']
KeyError: 'target'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "c:\python\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\python\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Python\Scripts\anime.exe_main
.py", line 9, in
File "c:\python\lib\site-packages\click\core.py", line 722, in call
return self.main(*args, **kwargs)
File "c:\python\lib\site-packages\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "c:\python\lib\site-packages\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\python\lib\site-packages\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\python\lib\site-packages\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "c:\python\lib\site-packages\click\decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "c:\python\lib\site-packages\anime_downloader\cli.py", line 113, in dl
for episode in anime:
File "c:\python\lib\site-packages\anime_downloader\sites\anime.py", line 74, in getitem
ep_no=ep_id[0])
File "c:\python\lib\site-packages\anime_downloader\sites\anime.py", line 118, in init
self.get_data()
File "c:\python\lib\site-packages\anime_downloader\sites\anime.py", line 152, in get_data
self._sources = self._get_sources()
File "c:\python\lib\site-packages\anime_downloader\sites\nineanime.py", line 48, in _get_sources
) from e
anime_downloader.sites.exceptions.AnimeDLError: 9anime probably changed their API again. Check the issueshere https://github.com/vn-ki/anime-downloader/issues. If it has not been reported yet, please open a new issue

URL filename problem

when I use the --url command, then download using IDM, the video files are just a bunch of gibberish that i can't sort out. does anybody have a way to sort them so i can write the correct names for each file? I know this isn't an issue with the software but I don't know what to do with these files.

last one for now? :D 3.4.2 bug if selection not default

Describe the bug
if selection not 1, then error

To reproduce

PS D:\!!Downloads\!Anime> anime dl "Bravo"
�[32manime�[0m: anime-downloader 3.4.2
 1: Girls Bravo                                 Ep 11/11
 2: Girls Bravo (Dub)                           DUB | Ep 11/11
 3: Girls Bravo: Second Season                  Ep 13/13
 4: Girls Bravo: Second Season (Dub)            DUB | Ep 13/13

Enter the anime no:  [1]: 3
�[32manime�[0m: Selected Girls Bravo: Second Season
�[32manime�[0m: Extracting episode info from page
'NoneType' object has no attribute 'find_all'
PS D:\!!Downloads\!Anime> anime dl "Bravo" -ll DEBUG
INFO root: anime-downloader 3.4.2
DEBUG root: Platform: Windows-10-10.0.17134-SP0
DEBUG root: Python 3.7.0
DEBUG root: https://www8.9anime.is/search?keyword=Bravo
DEBUG root: Search results
DEBUG root: Girls Bravo
DEBUG root: Girls Bravo (Dub)
DEBUG root: Girls Bravo: Second Season
DEBUG root: Girls Bravo: Second Season (Dub)
 1: Girls Bravo                                 Ep 11/11
 2: Girls Bravo (Dub)                           DUB | Ep 11/11
 3: Girls Bravo: Second Season                  Ep 13/13
 4: Girls Bravo: Second Season (Dub)            DUB | Ep 13/13

Enter the anime no:  [1]: 3
INFO root: Selected Girls Bravo: Second Season
INFO root: Extracting episode info from page
DEBUG root: Metadata scraping error: list index out of range
DEBUG root: data-ts: 1533798000
Traceback (most recent call last):
  File "c:\users\alistair1231\appdata\local\programs\python\python37-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\alistair1231\appdata\local\programs\python\python37-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Alistair1231\AppData\Local\Programs\Python\Python37-32\Scripts\anime.exe\__main__.py", line 9, in <module>
  File "c:\users\alistair1231\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\alistair1231\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 697, in main
    rv = self.invoke(ctx)
  File "c:\users\alistair1231\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\alistair1231\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\alistair1231\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "c:\users\alistair1231\appdata\local\programs\python\python37-32\lib\site-packages\click\decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "c:\users\alistair1231\appdata\local\programs\python\python37-32\lib\site-packages\anime_downloader\cli.py", line 99, in dl
    fallback_qualities=fallback_qualities)
  File "c:\users\alistair1231\appdata\local\programs\python\python37-32\lib\site-packages\anime_downloader\sites\anime.py", line 42, in __init__
    self.get_data()
  File "c:\users\alistair1231\appdata\local\programs\python\python37-32\lib\site-packages\anime_downloader\sites\anime.py", line 60, in get_data
    self._episode_urls = self._scarpe_episodes(soup)
  File "c:\users\alistair1231\appdata\local\programs\python\python37-32\lib\site-packages\anime_downloader\sites\nineanime.py", line 106, in _scarpe_episodes
    episodes = episodes.find_all('li')
AttributeError: 'NoneType' object has no attribute 'find_all'
PS D:\!!Downloads\!Anime>

w/ def. selection

PS D:\!!Downloads\!Anime> anime dl "Bravo" -ll DEBUG
INFO root: anime-downloader 3.4.2
DEBUG root: Platform: Windows-10-10.0.17134-SP0
DEBUG root: Python 3.7.0
DEBUG root: https://www8.9anime.is/search?keyword=Bravo
DEBUG root: Search results
DEBUG root: Girls Bravo
DEBUG root: Girls Bravo (Dub)
DEBUG root: Girls Bravo: Second Season
DEBUG root: Girls Bravo: Second Season (Dub)
 1: Girls Bravo                                 Ep 11/11
 2: Girls Bravo (Dub)                           DUB | Ep 11/11
 3: Girls Bravo: Second Season                  Ep 13/13
 4: Girls Bravo: Second Season (Dub)            DUB | Ep 13/13

Enter the anime no:  [1]:
INFO root: Selected Girls Bravo
INFO root: Extracting episode info from page
DEBUG root: Metadata scraping error: list index out of range
DEBUG root: data-ts: 1533798000
DEBUG root: EPISODE IDS: length: 11, ids: ['w0ly87', 'w0lyn7', 'j8x663', '84o73y', 'z6o2nm', 'qp423w', 'po92ox', 'ml0457', 'po92qx', '57lyjv', '045y89']
INFO root: Found anime: Girls Bravo
INFO root: Downloading to D:\!!Downloads\!Anime
DEBUG root: Extracting stream info of id: w0ly87
DEBUG root: API call URL: https://9anime.is/ajax/episode/info with params {'id': 'w0ly87', 'server': '33', 'ts': '1533798000', '_': 777}
DEBUG root: URL: https://www8.9anime.is/ajax/episode/info?id=w0ly87&server=33&ts=1533798000&_=777
DEBUG root: Returned data: {'grabber': 'https://www8.9anime.is/grabber-api/?server=33', 'params': [], 'backup': 0, 'target': 'https://www.rapidvideo.com/e/FU3FEOMPV4', 'type': 'iframe', 'name': '01', 'subtitle': ''}
DEBUG root: Calling Rapid url: https://www.rapidvideo.com/e/FU3FEOMPV4&q=1080p
INFO root: Downloading episode 1 of Girls Bravo
DEBUG root: cmd: {aria2}
DEBUG root: episode: <anime_downloader.sites.nineanime.NineAnimeEpisode object at 0x045D0770>
DEBUG root: file format: {anime_title}_{ep_no}
DEBUG root: formatted cmd: aria2c https://www2372.playercdn.net/173/0/ZwVqu8kxIVfxX3UPOabTJg/1533865440/180809/aRYO58qFajOlpkX.mp4 -x 12 -s 12 -j 12 -k 10M -o Girls_Bravo_1.mp4 --continue=true --dir=D:\!!Downloads\!Anime --stream-piece-selector=inorder --min-split-size=5M

08/09 21:44:00 [NOTICE] Downloading 1 item(s)

Aborted!

How to Install

Hi, I'm extremely new to Github and have no idea what to do but i really want to Use Your Anime Downloader... Only problem is i, as mentioned before, have no idea So i was wondering if you could give me a detailed walk through or a short video of how to install it and if i'll need anything specific To install it , if it's not too much hassle.

Kissanime is not working.

Describe the bug

Fails to extract Info from the page in KissAnime

To reproduce

anime dl "http://kissanime.ru/Anime/Gintama-Shirogane-no-Tamashii-hen-2/Episode-354?id=147594&s=rapidvideo" -ll DEBUG

Log

INFO root: anime-downloader 3.1.1
DEBUG root: Platform: Linux-4.8.0-53-generic-x86_64-with-LinuxMint-18.2-sonya
DEBUG root: Python 3.5.2
INFO root: Extracting episode info from page
'NoneType' object has no attribute 'text'

Twist.moe decrypt key

Please tell me how you were able to get the key to decrypt api-sources of twist.moe

I spent a huge amount of time inspecting and searching for the key on twist.moe

I am not that familiar with chrome dev tools so (Just an excuse, At the end I was unable to find the key).

I followed some path like

Searched for Crypto (hoping they didn't implement their own encryption),
then found

CryptoJS.AES.decrypt(src, this.sourceKey).toString(CryptoJS.enc.Utf8)

(The decrypting step on twist.moe)

then I searched for sourceKey,
then found

'sourceKey':'e.$options.k'

then searched for $options, $options.k,$options["k"] etc...
but went nowhere. (I gave up)

I am requesting as a fellow anime_fan, anime_downloader (not a tool), python_user and a human (male? 🤔 etc..) the way which you were able to get the key.

KEY = b"k8B$B@0L8D$tDYHGmRg98sQ7!%GOEGOX27T"

🙏 😄

Aria2 error

e: anime-downloader 3.1.1
1: Plastic Memories

Enter the anime no: [1]: 1
anime: Selected Plastic Memories
anime: Extracting episode info from page
anime: Found anime: Plastic Memories
anime: Downloading to /sdcard/Anime
anime: Downloading episode 1 of Plastic Memories

07/11 23:34:32 [NOTICE] Downloading 1 item(s)
[#1c697d 0B/0B CN:1 DL:0B]
07/11 23:34:34 [ERROR] CUID#7 - Download aborted. URI=https://www511.playercdn.net/173/0/zj-PeVxszB2s3GwU9P863A/1531353872/170427/Mfl2V9pcNI2CH3r.mp4
Exception: [/home/fornwall/.termux-build/aria2/src/src/AbstractCommand.cc:351] errorCode=1 URI=https://www511.playercdn.net/173/0/zj-PeVxszB2s3GwU9P863A/1531353872/170427/Mfl2V9pcNI2CH3r.mp4
-> [/home/fornwall/.termux-build/aria2/src/src/SocketCore.cc:1015] errorCode=1 SSL/TLS handshake failure: hostname does not match

07/11 23:34:34 [NOTICE] Download GID#1c697da02286a59f not complete: /sdcard/Anime/Plastic_Memories/Plastic_Memories_1.mp4

Download Results:
gid |stat|avg speed |path/URI
======+====+===========+=======================================================
1c697d|ERR | 0B/s|/sdcard/Anime/Plastic_Memories/Plastic_Memories_1.mp4

Status Legend:
(ERR):error occurred.

aria2 will resume download if the transfer is restarted.
If there are any errors, then see the log file. See '-l' option in help/man page for details.

Sent from my Redmi Note 3 using FastHub

Error raised when trying to read from watch file if you still have the old watch file.

When I tried to open my watch list in the most recent version, the following error was thrown:

Kevin@CHF117 MINGW32 /d/git/anime-downloader (master)
$ anime watch -l
anime: anime-downloader 2.6.0
Traceback (most recent call last):
  File "C:\Users\Kevin\AppData\Local\Programs\Python\Python36-32\Scripts\anime-s                                                                                                                           cript.py", line 11, in <module>
    load_entry_point('anime-downloader', 'console_scripts', 'anime')()
  File "c:\users\kevin\appdata\local\programs\python\python36-32\lib\site-packag                                                                                                                           es\click\core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\kevin\appdata\local\programs\python\python36-32\lib\site-packag                                                                                                                           es\click\core.py", line 697, in main
    rv = self.invoke(ctx)
  File "c:\users\kevin\appdata\local\programs\python\python36-32\lib\site-packag                                                                                                                           es\click\core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\kevin\appdata\local\programs\python\python36-32\lib\site-packag                                                                                                                           es\click\core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\kevin\appdata\local\programs\python\python36-32\lib\site-packag                                                                                                                           es\click\core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "d:\git\anime-downloader\anime_downloader\cli.py", line 190, in watch
    list_animes(watcher, quality, download_dir)
  File "d:\git\anime-downloader\anime_downloader\cli.py", line 208, in list_anim                                                                                                                           es
    watcher.list()
  File "d:\git\anime-downloader\anime_downloader\watch.py", line 34, in list
    animes = self._read_from_watch_file()
  File "d:\git\anime-downloader\anime_downloader\watch.py", line 114, in _read_f                                                                                                                           rom_watch_file
    data = json.load(watch_file)
  File "c:\users\kevin\appdata\local\programs\python\python36-32\lib\json\__init                                                                                                                           __.py", line 296, in load
    return loads(fp.read(),
  File "c:\users\kevin\appdata\local\programs\python\python36-32\lib\encodings\c                                                                                                                           p1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 43: chara                                                                                                                           cter maps to <undefined>

I figured it was because the old file was a pickle file and it was trying to decode it as a json file, so I deleted the old file (AppData > Roaming > anime downloader on Windows) and voila, it works.

Is there a way we can identify and delete the old watch file automatically so that people don't have to do this on their own?

There's something wrong with Rapidvideo

Feature request

Rapidvideo refuses to connect when I try using my usual internet connection
They are blocking my IP address and It happened after I started downloading a lot of videos from rapidvideo.(I think that might be a logical reason but It doesn't make sense because It's no different from iframe in 9anime or kissanime)
I don't know why they'd do that to a random user.

I can't use 9anime and kissanime through anime_downloader but I can use it for twist.moe and others which don't entirely rely on rapidvideo so I thought extending 9anime by a source like openload as kissanime has image capcha thing.

I know it's a selfish request and I can just revert it by changing my network provider or some tor browser or a proxy

Please think about adding openload extractor.

i am getting a"No connection adapters were found for ''https://9anime.is/watch/fullmetal-alchemist-brotherhood.0r7/j69y93''" error when i enter anime dl 'https://9anime.is/watch/fullmetal-alchemist-brotherhood.0r7/j69y93' --episodes 1 as

Describe the bug

After doing all the installation steps when i enter anime dl 'https://9anime.is/watch/fullmetal-alchemist-brotherhood.0r7/j69y93' --episodes 1, i get an error as No connection adapters were found for ''https://9anime.is/watch/fullmetal-alchemist-brotherhood.0r7/j69y93''

To reproduce

anime dl 'https://9anime.is/watch/fullmetal-alchemist-brotherhood.0r7/j69y93' --episodes 1
LOG ```

INFO root: anime-downloader 3.2.0
DEBUG root: Platform: Windows-10-10.0.17713-SP0
DEBUG root: Python 3.7.0
INFO root: Extracting episode info from page
Traceback (most recent call last):
File "c:\program files\python37\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\program files\python37\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Program Files\Python37\Scripts\anime.exe_main
.py", line 9, in
File "c:\program files\python37\lib\site-packages\click\core.py", line 722, in call
return self.main(*args, **kwargs)
File "c:\program files\python37\lib\site-packages\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "c:\program files\python37\lib\site-packages\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\program files\python37\lib\site-packages\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\program files\python37\lib\site-packages\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "c:\program files\python37\lib\site-packages\click\decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "c:\program files\python37\lib\site-packages\anime_downloader\cli.py", line 89, in dl
anime = cls(anime_url, quality=quality)
File "c:\program files\python37\lib\site-packages\anime_downloader\sites\anime.py", line 39, in init
self.get_data()
File "c:\program files\python37\lib\site-packages\anime_downloader\sites\anime.py", line 49, in get_data
r = requests.get(self.url, headers=desktop_headers)
File "c:\program files\python37\lib\site-packages\requests\api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "c:\program files\python37\lib\site-packages\requests\api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "c:\program files\python37\lib\site-packages\requests\sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "c:\program files\python37\lib\site-packages\requests\sessions.py", line 616, in send
adapter = self.get_adapter(url=request.url)
File "c:\program files\python37\lib\site-packages\requests\sessions.py", line 707, in get_adapter
raise InvalidSchema("No connection adapters were found for '%s'" % url)
requests.exceptions.InvalidSchema: No connection adapters were found for ''https://www8.9anime.is/watch/my-hero-academia-3.l7yq/93kpjn''


</details>

Resolution Fallback [Feature Request]

Hey mate,

Is there any way to implement a standard resolution fallback?

As an example, the flag could be something like --maxres which overrides -q

The idea would be to automatically try different resolutions in order of highest to lowest. If a 1080p version is available, it is downloaded and the script moves on to the next episode.

If on the other hand a 1080p version is not available, then it will automatically retry in order of highest resolution to lowest, until it finds a valid download.

Currently, if when using -q 1080p, a 1080p version does not exist, it doesn't seem to fallback to 720p, then 480p etc. Instead, it seems to jump directly to the lowest available resolution.

Thanks! Great script BTW! Keep up the great work :)

Download issues with 9anime and kissanime

When I tried to download the Black Clover Dub from 9anime it came up with a failure notice.

anime_downloader.sites.exceptions.AnimeDLError: 9anime probably changed their API again. Check the issueshere https://github.com/vn-ki/anime-downloader/issues. If it has not been reported yet, please open a new issue

It seems like nobody else has this problem, so I think my setup is wrong

Getting this error

Hey man, sorry i'm bothering you again. What is this?

image

I tried uninstalling and reinstalling everything, with and without cloudfare support, with and without bugfix version.

If anything then since the last time i had used it i've only installed node.js using its setup from the website and cfscrape using pip install cfscrape. I can work without kissanime so should i uninstall these if thats what is the solution?

Problem with windows version

Traceback (most recent call last):
File "C:\Python27\Scripts\anime-script.py", line 11, in
load_entry_point('anime-downloader==2.4.1', 'console_scripts', 'anime')()
File "C:\Python27\lib\site-packages\pkg_resources_init_.py", line 476, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "C:\Python27\lib\site-packages\pkg_resources_init_.py", line 2700, in load_entry_point
return ep.load()
File "C:\Python27\lib\site-packages\pkg_resources_init_.py", line 2318, in load
return self.resolve()
File "C:\Python27\lib\site-packages\pkg_resources_init_.py", line 2324, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "build\bdist.win-amd64\egg\anime_downloader\cli.py", line 9, in
File "build\bdist.win-amd64\egg\anime_downloader\players\mpv.py", line 1, in
File "C:\Python27\lib\site-packages\anime_downloader-2.4.1-py2.7.egg\anime_downloader\players\baseplayer.py", line 8
class BasePlayer(metaclass=ABCMeta):
^
SyntaxError: invalid syntax

Test on windows

I have not tested this on a windows system and I will not be near one for some time.

If someone could test this on windows, it would be awesome!

Aria2 error

e: anime-downloader 3.1.1
1: Plastic Memories

Enter the anime no: [1]: 1
anime: Selected Plastic Memories
anime: Extracting episode info from page
anime: Found anime: Plastic Memories
anime: Downloading to /sdcard/Anime
anime: Downloading episode 1 of Plastic Memories

07/11 23:34:32 [NOTICE] Downloading 1 item(s)
[#1c697d 0B/0B CN:1 DL:0B]
07/11 23:34:34 [ERROR] CUID#7 - Download aborted. URI=https://www511.playercdn.net/173/0/zj-PeVxszB2s3GwU9P863A/1531353872/170427/Mfl2V9pcNI2CH3r.mp4
Exception: [/home/fornwall/.termux-build/aria2/src/src/AbstractCommand.cc:351] errorCode=1 URI=https://www511.playercdn.net/173/0/zj-PeVxszB2s3GwU9P863A/1531353872/170427/Mfl2V9pcNI2CH3r.mp4
-> [/home/fornwall/.termux-build/aria2/src/src/SocketCore.cc:1015] errorCode=1 SSL/TLS handshake failure: hostname does not match

07/11 23:34:34 [NOTICE] Download GID#1c697da02286a59f not complete: /sdcard/Anime/Plastic_Memories/Plastic_Memories_1.mp4

Download Results:
gid |stat|avg speed |path/URI
======+====+===========+=======================================================
1c697d|ERR | 0B/s|/sdcard/Anime/Plastic_Memories/Plastic_Memories_1.mp4

Status Legend:
(ERR):error occurred.

aria2 will resume download if the transfer is restarted.
If there are any errors, then see the log file. See '-l' option in help/man page for details.

This error also persist without aria2 , with inbuilt dwnloader

anime: Downloading Plastic Memories-1
anime: /sdcard/Anime/Plastic_Memories/Plastic_Memories_1.mp4
anime: Certificate did not match expected hostname: www511.playercdn.net. Certificate: {'subject': ((('organizationalUnitName', 'Domain Control Validated'),), (('organizationalUnitName', 'EssentialSSL Wildcard'),), (('commonName', '.geokaps.com'),)), 'issuer': ((('countryName', 'GB'),), (('stateOrProvinceName', 'Greater Manchester'),), (('localityName', 'Salford'),), (('organizationName', 'COMODO CA Limited'),), (('commonName', 'COMODO RSA Domain Validation Secure Server CA'),)), 'version': 3, 'serialNumber': 'C2A2F4569BC4511FCBDCB12861A0A451', 'notBefore': 'Jun 23 00:00:00 2018 GMT', 'notAfter': 'Sep 21 23:59:59 2019 GMT', 'subjectAltName': (('DNS', '.geokaps.com'), ('DNS', 'geokaps.com')), 'OCSP': ('http://ocsp.comodoca.com',), 'caIssuers': ('http://crt.comodoca.com/COMODORSADomainValidationSecureServerCA.crt',), 'crlDistributionPoints': ('http://crl.comodoca.com/COMODORSADomainValidationSecureServerCA.crl',)}
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 343, in _make_request
self._validate_conn(conn)
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 849, in _validate_conn
conn.connect()
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/connection.py", line 376, in connect
_match_hostname(cert, self.assert_hostname or hostname)
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/connection.py", line 386, in _match_hostname
match_hostname(cert, asserted_hostname)
File "/data/data/com.termux/files/usr/lib/python3.6/ssl.py", line 327, in match_hostname
% (hostname, ', '.join(map(repr, dnsnames))))
ssl.CertificateError: hostname 'www511.playercdn.net' doesn't match either of '*.geokaps.com', 'geokaps.com'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/requests/adapters.py", line 445, in send
timeout=timeout
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/util/retry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www511.playercdn.net', port=443): Max retries exceeded with url: /173/0/FrajYf_5UfNhi9_0zX-rKA/1531355552/170427/Mfl2V9pcNI2CH3r.mp4 (Caused by SSLError(Certificate

Continued...
Sent from my Redmi Note 3 using FastHub

Sent from my Redmi Note 3 using FastHub

Masterani Download Error

Describe The Bug

Unable to download from Masterani. Error: Expecting value: line 1 column 1 (char 0)

To Reproduce

# anime dl 'https://www.masterani.me/anime/watch/2911-isekai-maou-to-shoukan-shoujo-no-dorei-majutsu/5' --episodes 1
anime: anime-downloader 3.3.0
anime: Extracting episode info from page
Expecting value: line 1 column 1 (char 0)

Tried a different episode of a new Anime to test, with the same result:

# anime dl 'https://www.masterani.me/anime/watch/337-suzumiya-haruhi-no-yuuutsu/1' --episodes 1
anime: anime-downloader 3.3.0
anime: Extracting episode info from page
Expecting value: line 1 column 1 (char 0)

DEBUG Log

# anime dl 'https://www.masterani.me/anime/watch/337-suzumiya-haruhi-no-yuuutsu/1' --episodes 1 --log-level DEBUG
INFO root: anime-downloader 3.3.0
DEBUG root: Platform: Linux-4.4.0-131-generic-x86_64-with-Ubuntu-16.04-xenial
DEBUG root: Python 3.5.2
INFO root: Extracting episode info from page
Traceback (most recent call last):
  File "/usr/local/bin/anime", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/anime_downloader/cli.py", line 95, in dl
    anime = cls(anime_url, quality=quality)
  File "/usr/local/lib/python3.5/dist-packages/anime_downloader/sites/anime.py", line 39, in __init__
    self.get_data()
  File "/usr/local/lib/python3.5/dist-packages/anime_downloader/sites/masterani.py", line 53, in get_data
    res = res.json()
  File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 892, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

9anime api changed

Traceback (most recent call last):
File "/home/sunny/.local/lib/python3.6/site-packages/anime_downloader/sites/nineanime.py", line 33, in getData
url = data['target']
KeyError: 'target'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/sunny/.local/bin/anime", line 11, in
sys.exit(cli())
File "/home/sunny/.local/lib/python3.6/site-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/home/sunny/.local/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/sunny/.local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/sunny/.local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/sunny/.local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/sunny/.local/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/sunny/.local/lib/python3.6/site-packages/anime_downloader/cli.py", line 94, in dl
for episode in anime:
File "/home/sunny/.local/lib/python3.6/site-packages/anime_downloader/sites/anime.py", line 71, in getitem
ep_no=ep_id[0])
File "/home/sunny/.local/lib/python3.6/site-packages/anime_downloader/sites/anime.py", line 113, in init
self.getData()
File "/home/sunny/.local/lib/python3.6/site-packages/anime_downloader/sites/nineanime.py", line 39, in getData
) from e
anime_downloader.sites.exceptions.AnimeDLError: 9anime probably changed their API again. Check the issueshere https://github.com/vn-ki/anime-downloader/issues. If it has not been reported yet, please open a new issue

Every time I try to edit the config.json anime downloader breaks

the config.json
{
"dl": {
"download_dir": ".",
"external_downloader": "",
"file_format": "{anime_title}/{anime_title}_{ep_no}",
"force_download": false,
"log_level": "INFO",
"player": null,
"provider": "kissanime",
"quality": "1080p", "720p"
"skip_download": false,
"url": false
},
"watch": {
"log_level": "INFO",
"provider": "9anime",
"quality": "720p"
}
}
the error im getting

File "c:\program files (x86)\python\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\program files (x86)\python\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Program Files (x86)\python\Scripts\anime.exe_main
.py", line 5, in
File "c:\program files (x86)\python\lib\site-packages\anime_downloader\cli.py", line 9, in
from anime_downloader.players.mpv import mpv
File "c:\program files (x86)\python\lib\site-packages\anime_downloader\players\mpv.py", line 2, in
from anime_downloader import config
File "c:\program files (x86)\python\lib\site-packages\anime_downloader\config.py", line 79, in
Config = _Config()
File "c:\program files (x86)\python\lib\site-packages\anime_downloader\config.py", line 43, in init
self._CONFIG = self.read_config()
File "c:\program files (x86)\python\lib\site-packages\anime_downloader\config.py", line 72, in read_config
conf = json.load(configfile)
File "c:\program files (x86)\python\lib\json_init
.py", line 296, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "c:\program files (x86)\python\lib\json_init
.py", line 348, in loads
return _default_decoder.decode(s)
File "c:\program files (x86)\python\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "c:\program files (x86)\python\lib\json\decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ':' delimiter: line 11 column 9 (char 302)

Download slowly slows down?

I am on windows 10 home and the download starts at a few megabytes (about 2,5) per second but then slowly starts slowing down, usually finishind the download at around 600 kb/s. I have noticed this as an issue mainly with downloaders from the windows command line/powershell. To make sure it was just a windows problem, i tried installing it on linux, but i can't for the life of me figure out how to set it up. Could you maybe make a .sh script to install all dependencies, install anime dl, and add everything needed to PATH? That, or a very step by step tutorial would be appreciated.

9Anime API Error

Anime downloader �[32manime�[0m: anime-downloader 3.0.0

just installed all the software needed and used to the following commands,

anime watch --new
and added Phi-Brain ~ Puzzle of God: The Orpheus Order
anime watch --list
opened Phi-Brain ~ Puzzle of God: The Orpheus Order
used download to try and download it

got the following error:

Traceback (most recent call last):
File "c:\users\kaidako\appdata\local\programs\python\python37-32\lib\site-packages\anime_downloader\sites\nineanime.py", line 33, in _get_sources
url = get_stream_url(self._base_url, params)
File "c:\users\kaidako\appdata\local\programs\python\python37-32\lib\site-packages\anime_downloader\sites\nineanime.py", line 30, in get_stream_url
return data['target']
KeyError: 'target'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\users\kaidako\appdata\local\programs\python\python37-32\lib\site-packages\anime_downloader\sites\nineanime.py", line 42, in _get_sources
url = data['target']
KeyError: 'target'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "c:\users\kaidako\appdata\local\programs\python\python37-32\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\users\kaidako\appdata\local\programs\python\python37-32\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\Kaidako\AppData\Local\Programs\Python\Python37-32\Scripts\anime.exe_main
.py", line 9, in
File "c:\users\kaidako\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 722, in call
return self.main(*args, **kwargs)
File "c:\users\kaidako\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "c:\users\kaidako\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\kaidako\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\kaidako\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "c:\users\kaidako\appdata\local\programs\python\python37-32\lib\site-packages\anime_downloader\cli.py", line 212, in watch
list_animes(watcher, quality, download_dir)
File "c:\users\kaidako\appdata\local\programs\python\python37-32\lib\site-packages\anime_downloader\cli.py", line 285, in list_animes
for episode in anime:
File "c:\users\kaidako\appdata\local\programs\python\python37-32\lib\site-packages\anime_downloader\sites\anime.py", line 74, in getitem
ep_no=ep_id[0])
File "c:\users\kaidako\appdata\local\programs\python\python37-32\lib\site-packages\anime_downloader\sites\anime.py", line 118, in init
self.get_data()
File "c:\users\kaidako\appdata\local\programs\python\python37-32\lib\site-packages\anime_downloader\sites\anime.py", line 143, in get_data
self._sources = self._get_sources()
File "c:\users\kaidako\appdata\local\programs\python\python37-32\lib\site-packages\anime_downloader\sites\nineanime.py", line 48, in _get_sources
) from e
anime_downloader.sites.exceptions.AnimeDLError: 9anime probably changed their API again. Check the issueshere https://github.com/vn-ki/anime-downloader/issues. If it has not been reported yet, please open a new issue

Problems in python 2 version

Describe the bug
I found that lack of future imports and use of f-strings in python 2 version. But there can be more errors like that. I did not went through the entire code.

To reproduce
anime-dl --help will give the error due to no print function was imported. And when I fix that I got f-string error with the same command.

anime-dl --help   # This is just a one scenario 

Wiki instructions for Windows Install using the choco package manager

Describe the feature here
This is for choco users, or choco users with limited/no understanding of: CLI/python, pip, env/path config, etc.

Once you choco, you choco for life.

Proposed Wiki Entry Installation#WinChoco

Windows via choco

  • Using the Chocolatey Package manager (via Windows Nuget) to

    • Install these pre-reqs: git python3 aria2 mpv
    • Refresh/Update environment changes (choco refreshenv command)
    • clone this repository to [C:]\Users\[USERNAME]\anime-downloader
    • setup/build anime-downloader from "%userprofile%\anime-downloader"
    • run anime watch command
  • the choco install command SHOULD be run with an administrator privledged cmd.exe console:

    • [WindowsKey] > "cmd.exe" > [Shift]+[Ctrl]+[Enter] > (Click "Yes")
choco install -y git python3 aria2 mpv
  • the rest of the commands SHOULD be run in an un-privledged/normal cmd.exe console:
    • [WindowsKey] > "cmd.exe" > [Enter]
refreshenv
git clone https://github.com/vn-ki/anime-downloader "%userprofile%\anime-downloader"
cd /d "%userprofile%\anime-downloader"
setup.py build
setup.py install
anime watch "[insert anime title here]"

3.4.1 update produces now another error

Describe the bug
uum hi again! :D
just updated and now I get a different error... (on win and "ubuntu" btw)

To reproduce

$ sudo anime dl "dragon ball" -ll DEBUG
INFO root: anime-downloader 3.4.1
DEBUG root: Platform: Linux-4.4.0-17134-Microsoft-x86_64-with-Ubuntu-16.04-xenial
DEBUG root: Python 3.5.2
DEBUG root: https://www8.9anime.is/search?keyword=dragon+ball
DEBUG root: Search results
...
 1: Dragon Ball                                 Ep 153/153
 2: Dragon Ball (Dub)                           Ep 153/153 | DUB
 3: Dragon Ball Super                           Ep 131/131
 4: Dragon Ball Z Kai                           Ep 98/98
 5: Dragon Ball Super Movie (Dub)               Preview | DUB
 6: Dragon Ball Z (Uncrop)                      Ep ?/291
 7: Dragon Ball GT (Dub)                        Ep 64/64 | DUB
 8: Dragon Ball Specials                        Ep 2/2 | Special
 9: Dragon Ball Z                               Ep 291/291
...
Enter the anime no:  [1]: 9
INFO root: Selected Dragon Ball Z
INFO root: Extracting episode info from page
DEBUG root: Metadata scraping error: list index out of range
DEBUG root: data-ts: 1533823200
Traceback (most recent call last):
  File "/usr/local/bin/anime", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/anime_downloader/cli.py", line 99, in dl
    fallback_qualities=fallback_qualities)
  File "/usr/local/lib/python3.5/dist-packages/anime_downloader/sites/anime.py", line 42, in __init__
    self.get_data()
  File "/usr/local/lib/python3.5/dist-packages/anime_downloader/sites/anime.py", line 60, in get_data
    self._episode_urls = self._scarpe_episodes(soup)
  File "/usr/local/lib/python3.5/dist-packages/anime_downloader/sites/nineanime.py", line 104, in _scarpe_episodes
    soup = BeautifulSoup(requests.get(api_url).json()['html'], 'html.parser')
  File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 896, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Download Quality

When using the program, if a quality of a certain video is unavailable it will move down to the closest one possible. If I was looking for Boku No Hero Acadamia and they didn't have 720, it would get 360. Then after it finds the 360p version, it downloads all the rest in 360p even if there is a better quality available. Not a big problemo just something I noticed.

Kissanime provider not working

anime dl --download-dir "D:\Shows\Anime" --provider kissanime "sound of the sky"
�[32manime�[0m: anime-downloader 3.0.0
 1: So Ra No Wo To

Enter the anime no:  [1]: 1
anime: Selected So Ra No Wo To
anime: Extracting episode info from page
'NoneType' object has no attribute 'find_all'

It does this with anything I try to download from kissanime and yes I did install with cloudflare.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.