Git Product home page Git Product logo

anidbcli's Introduction

anidbcli

Anidbcli is a simple command line interface for managing your anime collection on your local computer or NAS (using only ssh).

Requirements

  • Python 3.6 or newer (version 3.5 seems to work as well)

Key features

  • ed2k hashing library utilizing multiple cores
  • adding anime to mylist
  • utilize data from anidb to move/rename the files
  • moves/renames the subtitle and other files with same extension
  • encryption

Installation

The package can be installed automatically using pip.

pip install anidbcli
pip install --upgrade anidbcli #update

Package can be also installed from source like this.

python setup.py install

After installation anidbcli can be invoked like a python module

python -m anidbcli

or directly by typing following in the command line

anidbcli

Quickstart

The basic syntax is

anidbcli [OPTIONS] ed2k/api [OPTIONS] ARGS

If you want to just generate ed2k links for mkv and mp4 files recursively for given folders and copy them to clipboard, use:

anidbcli -r -e mkv,mp4 ed2k -c "path/to/directory" "path/to/directory2"
Where
  • -r is recursive
  • -e comma separated list of extensions, that are treated as anime files

To add all mkv files from directory resursively to mylist use:

anidbcli -r -e mkv api -u "username" -p "password" -k "apikey" -a "path/to/directory"
Where
  • "password" is your anidb password
  • "username" is your anidb username
  • "apikey" is anidb upd api key, that you can set at https://anidb.net/user/setting. If no key is provided, unencrypted connection will be used.

Optionally, if you don't provide password or username, you will be prompted to input them.

anidbcli -r -e mkv api -k "apikey" -a "path/to/directory"
Enter your username: "username"
Enter your password: "password"

To set files to a specified state use:

anidbcli -r -e mkv api -u "username" -p "password" -k "apikey" --state 0 --show-ed2k -a "path/to/directory"
Where
  • "show-ed2k" is an optional parameter to show/print out ed2k links, while adding/renaming files.
  • "state" is your desired MyList file state (see https://wiki.anidb.net/Filestates).
The number 0 can be substituted for different states:
  • 0 is unknown (default)
  • 1 is internal storage
  • 2 is external storage
  • 3 is deleted
  • 4 is remote storage

To rename all mkv and mp4 files in directory recursively using data from api you can call

anidbcli -r -e mkv,mp4 api -u "username" -p "password" -k "apikey" -sr "%ep_no% - %ep_english% [%g_name%]" "path/to/directory"
Where
  • "-r" rename using provided format string
  • "-s" prepend original file path to each renamed file. Without this flag the files would me moved to current directory.
  • "-U" use with -a (-aU). Adds the files to mylist as unwatched.
Also along with the parameter "-r" you can use one of the following parameters:
  • "-h" Create hardlinks instead of renaming.
  • "-l" Create softlinks instead of renaming.
  • "-t" Save session info instead of logging out (session lifetime is 35 minutes after last command). Use for subsequent calls of anidbcli to avoid api bans.

Anidbcli should be called with all the parameters as usual. If the session was saved before more than 35 minutes, a new session is created instead.

You can also move watched anime from unwatched directory to watched directory and add it to mylist at the same time using following command.

anidbcli -r -e mkv,mp4 api -u "username" -p "password" -k "apikey" -xr "watched/%a_english%/%ep_no% - %ep_english% [%g_name%]" "unwatched/anime1" "unwatched/anime2"
Where
  • "-x" Delete empty folders after moving all files away.

NOTE: All files with same name and different extension (fx. subtitle files) will be renamed/moved as well.

Selected usable tags:
  • %md5% - md5 hash of file.
  • %sha1% - sha1 hash of file.
  • %crc32% - crc32 hash of file.
  • %resolution% - file resolution, for example "1920x1080"
  • %aired% - Episode aired date. Only option that needs "--date-format" option. You can find list of available tags at https://docs.python.org/3.6/library/time.html#time.strftime.
  • %year% - Year, the anime was aired. Can be a timespan, if the anime was aired several years "1990-2005" etc.
  • %a_romaji% - Anime title in romaji.
  • %a_kanji% - Anime title in kanji.
  • %a_english% - English anime title.
  • %ep_no% - Episode number. Prepends the necessary zeros, fx. 001, 01
  • %ep_english% - English episode name.
  • %ep_romaji% - Episode name in romaji.
  • %ep_kanji% - Episode name in kanji.
  • %g_name% - Group that released the anime. fx. HorribleSubs.
  • %g_sname% - Short group name.

Complete list of usable tags in format string:

%fid%, %aid%, %eid%, %gid%, %lid%, %status%, %size%, %ed2k%, %md5%, %sha1%, %crc32%, %color_depth%,
%quality%, %source%, %audio_codec%, %audio_bitrate%, %video_codec%, %video_bitrate%, %resolution%,
%filetype%, %dub_language%, %sub_language%, %length%, %aired%, %filename%, %ep_total%, %ep_last%, %year%,
%a_type%, %a_categories%, %a_romaji%, %a_kanji%, %a_english%, %a_other%, %a_short%, %a_synonyms%, %ep_no%,
%ep_english%, %ep_romaji%, %ep_kanji%, %g_name%, %g_sname%, %version%, %censored%

anidbcli's People

Contributors

adameste avatar andy2244 avatar jonybat 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

Watchers

 avatar  avatar  avatar  avatar  avatar

anidbcli's Issues

Some extra tag options.

Really like the module so far, quick and easy to use.
Yet i have trouble emulating common scene naming schemes, so maybe some extra format virtual tag options could be added?

  1. %year% seems to always output a range, even if its the same year. So a new %s_year% should always result in a single year output.
  2. Something like a virtual %s_resolution% (short) tag. So "1280x720" will result in the normal "720p" string.

Maybe allow us to hand over a extra regex parameter or local string/format script, that is run just in between the format and final move/rename logic?

Feature request: Hard Link Creation

In order to support other programs that use the files (things like torrent clients), instead of directly renaming and moving them, an option to create a second hard link to each file which will then be renamed/organized would be very useful.

Fresh installation using pip not working

~# pip install anidbcli
Collecting anidbcli
Collecting pyperclip (from anidbcli)
  Using cached https://files.pythonhosted.org/packages/2d/9a/23059a00dfd52eb700bd03c4ee3a6954cae60827539c3488026c8742a555/pyperclip-1.6.4.tar.gz
Collecting colorama (from anidbcli)
  Using cached https://files.pythonhosted.org/packages/db/c8/7dcf9dbcb22429512708fe3a547f8b6101c0d02137acbd892505aee57adf/colorama-0.3.9-py2.py3-none-any.whl
Collecting click (from anidbcli)
  Using cached https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl
Collecting joblib (from anidbcli)
  Using cached https://files.pythonhosted.org/packages/f6/26/317725ffd9e8e8c0eb4b2fc77614f52045ddfc1c5026387fbefef9050eec/joblib-0.12.2-py2.py3-none-any.whl
Collecting pycryptodome (from anidbcli)
  Using cached https://files.pythonhosted.org/packages/40/26/1546cda8b55c08001c9100c031bd1be4c93edb18bee788877f7e23fc1ecd/pycryptodome-3.6.6-cp27-cp27mu-manylinux1_x86_64.whl
Building wheels for collected packages: pyperclip
  Running setup.py bdist_wheel for pyperclip ... done
  Stored in directory: /root/.cache/pip/wheels/73/8c/77/a973e2fbf4808af077582b1740b4cbf9e100262da0166e90d8
Successfully built pyperclip
Installing collected packages: pyperclip, colorama, click, joblib, pycryptodome, anidbcli
Successfully installed anidbcli-1.22 click-6.7 colorama-0.3.9 joblib-0.12.2 pycryptodome-3.6.6 pyperclip-1.6.4

~# anidbcli
Traceback (most recent call last):
  File "/usr/local/bin/anidbcli", line 7, in <module>
    from anidbcli import main
  File "/usr/local/lib/python2.7/dist-packages/anidbcli/__init__.py", line 1, in <module>
    from .anidbconnector import AnidbConnector
  File "/usr/local/lib/python2.7/dist-packages/anidbcli/anidbconnector.py", line 4, in <module>
    import anidbcli.encryptors as encryptors
  File "/usr/local/lib/python2.7/dist-packages/anidbcli/encryptors.py", line 1, in <module>
    from abc import ABC, abstractmethod
ImportError: cannot import name ABC

What are the exact dependencies for running the tool? OS is Debian 9.5 amd64.

Question

how to use the %aired% tag? i tried %aired% --date-format %Y but it doesn't work. i just want to get the year. i'm aware of the %year% tag but it can be a timespan and i don't want that. thanks.

Encoding in setup.py file

Hi

When installing from source it throws the following error:

File "setup.py", line 12
SyntaxError: Non-ASCII character '\xc5' in file setup.py on line 12, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

I'm using UTF-8 encoding.

According to docs, adding # coding=latin-1 fixes it.

Question/Feature Request

Is this program able to create target directories with parameters from hashed files?

For example, given a directory where new files are downloaded; I would like to move and rename files to:

\AnimeShare\AnimeName [sometag-animeId]\EpisodeNo.VersionIfGreaterThanV1 - [ShortGroupName] (LowerCaseCRC).extension

__init__.py points to inexisting file

from .anidbconnector import AnidbConnector Total 3 (delta 2), reused 0 (delta 0)
ModuleNotFoundError: No module named 'anidbcli.anidbconnector'

__init__.py points to .anidbconnector, but the file is called AnidbConnector.py

API bans

Hi

Did you ever had issues with API bans?

I seem to get it after executing anidbcli api -u user -p pass -k key -sr '%a_romaji% - ep%ep_no% - %ep_english% - [%g_name%]' 'file' 5 or so times in a row.

Question about adding episode as watched

Sorry if were searching wrong but I haven't found any mention about this. My question:

When I add some series (ie. multiple episodes) to my list as unwatched but stored on my HDD and so on, then watch an episode and want to update my list in a way that that one episode will be recorded as watched, anidbcli api -a anime-ep01.mkv successfully generates the ed2k link but then throws a warning informing me the episode is already in my list and exits. Is it possible to update an episode which is already in my list with the anidbcli tool?

Just for the record:
$ anidbcli --version
anidbcli, version 1.53

Thanks a lot for your help and for the effort with the development! :)

Renaming doesn't work properly.

Updating the anidb library seems working. But when I try to rename my files, they always end up in " [] - -.mkv". I tried all possible combinations from the available tags but none of them seems to work.

[Request] Fallback to romaji

When hashing a series such as Gintama' with the %a_english% sort option it will rename the episode to
- 01 - Nobody with Natural Straight Hair Can Be That Bad.mkv

where if you set the filter to %a_romaji% it will rename the episode properly
Gintama' - 01 - Nobody with Natural Straight Hair Can Be That Bad.mkv.

The reason this is caused is because people in a lot of cases do not set the main title on the series for English (example). this is usually because there is no English translation for the show or the show title is already in English so it is just left as the official Japanese title

could something be implemented to have a fallback to romanji if there is no English title found?

Appending id to folder names?

i want to add a "[anidb-%anime_id%]" to folder names for use with hama plex plug-in, is this possible? let me break this into a couple of questions...
1- is renaming a certain folder possible? using the folder name as anime name and then the anime related variables are available
2- is renaming folders inside a certain folder possible? with a %folder_name% or %anime_id% tag requirement in the new name obviously
3- if 2 is possible does the %folder_name% tag even exist?

"IndexError: list index out of range" when looking for ep_kanji of specific episode

Traceback:

[INFO] Processing file "[Bloat]_Neon_Genesis_Evangelion_-_12_[290900C5].mkv"
[SUCCESS] Generated ed2k link.
Traceback (most recent call last):
  File "/usr/local/bin/anidbcli", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/dist-packages/anidbcli/cli.py", line 111, in main
    cli(obj={})
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 555, 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/anidbcli/cli.py", line 82, in api
    res = operation.Process(file_obj)
  File "/usr/local/lib/python3.5/dist-packages/anidbcli/operations.py", line 110, in Process
    fileinfo["ep_kanji"] = parsed[39]
IndexError: list index out of range

parsed contents before the exception (length of 39):

['914683', '22', '124', '10303', '0', '4097', '554862092', 'f039ea49b97f2f2f64263d23adbf7951', '36bd827a5d2f5a525015e78ced17aac0', '9fe7e2dd8fcc3ea4b7d8845291e7f7dfcbab3828', '290900c5', '', 'high', 'DVD', 'AC3', '448', 'H264|AVC', '2700', '704x480', 'mkv', 'japanese', 'english', '1401', '819417600', 'Shinseiki Evangelion - 12 - She Said: "Don\'t Make Others Suffer for Your Personal Hatred." - [Bloat](290900c5).mkv', '26', '26', '1995-1996', 'TV Series', 'Japan,Piloted Robot,Shounen,Angst,New,Mecha,Twisted,Violence,Action,Genetic Modification,Alien,Middle School,Post-apocalypse,Gunfights,Sci-Fi,Air Force,Military,Nopan,Conspiracy,Religion,Future,Ecchi,Small Breasts,Earth,Americas,Germany,Europe,United States of America,Pantsu,Navy,Running with Food in Mouth,Nudity', 'Shinseiki Evangelion', '新世紀エヴァンゲリオン', 'Neon Genesis Evangelion', "新世紀エヴァンゲリオン'新世纪福音战士'Neon Genesis Evangelion'Евангелион'신세기 에반게리온'ניאון ג'נסיס אוונג'ליון'อีวานเกเลี่ยน: มหาสงครามวันพิพากษา'Evangelion", "nge tv'NGE'ева'eva'sse'eva tv'єва", "Evangelion TV'Neon Genesis Evangelion Renewal'Neon Genesis Evangelion Platinum'Евангелион'Evangelion'Євангеліон нового покоління'Нова ера: Євангеліон'Євангеліон", '12', 'She Said: "Don\'t Make Others Suffer for Your Personal Hatred."', 'Kiseki no Kachi w']

parsed contents of an episode (E11 - The Day Tokyo-3 Stood Still.mkv) from the same series that is ok (length 42):

['914682', '22', '123', '10303', '0', '4097', '517199348', 'bf5088b9e394ee35c7599846c75f2f1c', '1ff57b689f08667e8920065b3ad047ea', '83a1b4628f1e3d047532dd5b02bc214e4ff1667f', '1c50d9d5', '', 'high', 'DVD', 'AC3', '448', 'H264|AVC', '2485', '704x480', 'mkv', 'japanese', 'english', '1401', '818812800', 'Shinseiki Evangelion - 11 - The Day Tokyo-3 Stood Still - [Bloat](1c50d9d5).mkv', '26', '26', '1995-1996', 'TV Series', 'Japan,Piloted Robot,Shounen,Angst,New,Mecha,Twisted,Violence,Action,Genetic Modification,Alien,Middle School,Post-apocalypse,Gunfights,Sci-Fi,Air Force,Military,Nopan,Conspiracy,Religion,Future,Ecchi,Small Breasts,Earth,Americas,Germany,Europe,United States of America,Pantsu,Navy,Running with Food in Mouth,Nudity', 'Shinseiki Evangelion', '新世紀エヴァンゲリオン', 'Neon Genesis Evangelion', "新世紀エヴァンゲリオン'新世纪福音战士'Neon Genesis Evangelion'Евангелион'신세기 에반게리온'ניאון ג'נסיס אוונג'ליון'อีวานเกเลี่ยน: มหาสงครามวันพิพากษา'Evangelion", "nge tv'NGE'ева'eva'sse'eva tv'єва", "Evangelion TV'Neon Genesis Evangelion Renewal'Neon Genesis Evangelion Platinum'Евангелион'Evangelion'Євангеліон нового покоління'Нова ера: Євангеліон'Євангеліон", '11', 'The Day Tokyo-3 Stood Still', 'Seishi Shita Yami no Naka de', '静止した闇の中で', 'Bloat', 'Bloat']

I'm not familiar to what's supposed to be returned from the API, so I'm just providing the error and details. Any more information or print that you would need just ask me.

Failed to get file info: Data must be aligned to block boundary in ECB mode

Hi

I seem to be getting these errors quite often. I haven't been able to figure out exactly what is causing them, but running anidbcli less frequently seems to alleviate it, which leads me to believe that its yet another API issue. It is not file dependent, as running some minutes/hours later on the same file, does not throw the error anymore.

This is the log:

[SUCCESS] Generated ed2k link.
[ERROR] Failed to get file info: Data must be aligned to block boundary in ECB mode

And after removing the except in line 72 of operations.py:

[SUCCESS] Generated ed2k link.
Traceback (most recent call last):
  File "/opt/anidbcli/bin/anidbcli", line 11, in <module>
    load_entry_point('\''anidbcli==1.53'\'', '\''console_scripts'\'', '\''anidbcli'\'')()
  File "/opt/anidbcli/lib/python3.6/site-packages/anidbcli/cli.py", line 139, in main
    cli(obj={})
  File "/opt/anidbcli/lib/python3.6/site-packages/Click-7.0-py3.6.egg/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/opt/anidbcli/lib/python3.6/site-packages/Click-7.0-py3.6.egg/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/opt/anidbcli/lib/python3.6/site-packages/Click-7.0-py3.6.egg/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/anidbcli/lib/python3.6/site-packages/Click-7.0-py3.6.egg/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/anidbcli/lib/python3.6/site-packages/Click-7.0-py3.6.egg/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/opt/anidbcli/lib/python3.6/site-packages/Click-7.0-py3.6.egg/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/opt/anidbcli/lib/python3.6/site-packages/anidbcli/cli.py", line 84, in api
    res = operation.Process(file_obj)
  File "/opt/anidbcli/lib/python3.6/site-packages/anidbcli/operations.py", line 70, in Process
    res = self.connector.send_request(API_ENDPOINT_FILE % (file["size"], file["ed2k"]))
  File "/opt/anidbcli/lib/python3.6/site-packages/anidbcli/anidbconnector.py", line 117, in send_request
    res = self.crypto.Decrypt(res)
  File "/opt/anidbcli/lib/python3.6/site-packages/anidbcli/encryptors.py", line 28, in Decrypt
    ret = self.aes.decrypt(message)
  File "/opt/anidbcli/lib/python3.6/site-packages/Crypto/Cipher/_mode_ecb.py", line 195, in decrypt
    raise ValueError("Data must be aligned to block boundary in ECB mode")
ValueError: Data must be aligned to block boundary in ECB mode'

Just rename without generating ed2k links?

I'm not interested in generating ed2k links, but really interested in the rename feature. Problem is that everytime I rename a folder with a lot of files, it keeps creating the hashes taking a long time (specially in a low resource NAS).

Am I missing something or to rename it indeed needs to create the ed2k links? Are they used in the API for searching? If they are needed to the rename function to the files being properly renamed you can close this issue (although it would be nice to add this information to README).

BTW, thanks for this package!

error: 'utf-8' codec can't decode bytes

Getting those errors for a batch, but only episode files 8,12, give this error?

[INFO] Processing file "d:\[Judas] Hamefura - S01E08.mkv"
[SUCCESS] Generated ed2k link.
[ERROR] Failed to get file info: 'utf-8' codec can't decode bytes in position 1397-1398: invalid continuation byte
[INFO] Processing file "d:\[Judas] Hamefura - S01E12.mkv"
[SUCCESS] Generated ed2k link.
[ERROR] Failed to get file info: 'utf-8' codec can't decode byte 0xe3 in position 1398: invalid continuation byte

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd1 in position 1398: invalid continuation byte when downloading info

The error was just [ERROR] Failed to get file info: 'utf-8' codec can't decode byte 0xd1 in position 1398: invalid continuation byte when trying to get information from a file. So I removed the try except from operations.py, printed ret variable and now have a full traceback:

[INFO] Processing file "Gurren Lagann [Dual Audio] [BD 1080p] Episode 08.mkv"
[SUCCESS] Generated ed2k link.
b"220 FILE\n1426430|4575|73552|0|0|4096|958797008|5b4ba917f9ee4b4be4ed42e45c2d8307|05f196849d408479f888c42ce0532205|86c379bcf8de54c489b115de18594dfdb5792a1b|8b9ddd6b||very high|Blu-ray|FLAC'(HE-)AAC|1504'202|H264/AVC|3521|1920x1080|mkv|japanese'english|english'english|1461|1179619200|Tengen Toppa Gurren Lagann - 08 - Farewell Comrades! - [RAW](8b9ddd6b).mkv|27|27|2007-2007|TV Series|Transforming Robot,Future,Sci-Fi,Mecha,Plot Continuity,Shounen,Earth,Action,Piloted Robot,New,Post-apocalypse,Comedy,General Lack of Common Sense,Alien,Humanoid Alien,Adventure,Skimpy Clothing,Tragedy,Space,Slapstick,Desert,Calling Your Attacks,Shipboard,Anthropomorphism,Boobs in Your Face,Angst,Politics,Romance,Ecchi,Violence,Boing,Space Travel,Large Breasts,Moon,Nosebleed,Lethal Cooking,Parody,Nudity,Pantsu|Tengen Toppa Gurren Lagann|\xe5\xa4\xa9\xe5\x85\x83\xe7\xaa\x81\xe7\xa0\xb4 \xe3\x82\xb0\xe3\x83\xac\xe3\x83\xb3\xe3\x83\xa9\xe3\x82\xac\xe3\x83\xb3|Gurren Lagann|\xe5\xa4\xa9\xe5\x85\x83\xe7\xaa\x81\xe7\xa0\xb4 \xe3\x82\xb0\xe3\x83\xac\xe3\x83\xb3\xe3\x83\xa9\xe3\x82\xac\xe3\x83\xb3'Gurren Lagann'Sfondamento dei Cieli Gurren Lagann'\xd0\x93\xd1\x83\xd1\x80\xd1\x80\xd0\xb5\xd0\xbd-\xd0\x9b\xd0\xb0\xd0\xb3\xd0\xb0\xd0\xbd\xd0\xbd'\xec\xb2\x9c\xec\x9b\x90\xeb\x8f\x8c\xed\x8c\x8c \xea\xb7\xb8\xeb\xa0\x8c\xeb\x9d\xbc\xea\xb0\x84'\xe0\xb8\xad\xe0\xb8\xa0\xe0\xb8\xb4\xe0\xb8\x99\xe0\xb8\xb4\xe0\xb8\xab\xe0\xb8\xb2\xe0\xb8\xa3\xe0\xb8\xab\xe0\xb8\xb8\xe0\xb9\x88\xe0\xb8\x99\xe0\xb8\x97\xe0\xb8\xb0\xe0\xb8\xa5\xe0\xb8\xa7\xe0\xb8\x87\xe0\xb8\xaa\xe0\xb8\xa7\xe0\xb8\xa3\xe0\xb8\xa3\xe0\xb8\x84\xe0\xb9\x8c \xe0\xb8\x81\xe0\xb8\xb8\xe0\xb9\x80\xe0\xb8\xa3\xe0\xb9\x87\xe0\xb8\x99\xe0\xb8\xa5\xe0\xb8\xb2\xe0\xb8\x81\xe0\xb8\xb1\xe0\xb8\x99\xe0\xb8\x99\xe0\xb9\x8c'\xd0\x9d\xd0\xb5\xd0\xb1\xd0\xb5\xd1\x81\xd0\xb5\xd0\xbd \xd0\xbf\xd1\x80\xd0\xbe\xd0\xb1\xd0\xb8\xd0\xb2 \xd0\x93\xd1\x83\xd1\x80\xd0\xb5\xd0\xbd \xd0\x9b\xd0\xb0\xd0\xb3\xd0\xb0\xd0\xbd|ttgl tv'Lagann'Gurren'Gurren Lagann'ttgl'\xe5\xa4\xa9\xe5\x85\x83|Heaven-Piercing Gurren Lagann'\xd0\x93\xd1\x83\xd1\x80\xd1\x80\xd0\xb5\xd0\xbd-\xd0\x9b\xd0\xb0\xd0\xb3\xd0\xb0\xd0\xbd\xd0\xbd: \xd0\xbd\xd0\xb0 \xd0\xbf\xd1\x80\xd0\xbe\xd1\x80\xd1\x8b\xd0\xb2!'\xd0\x93\xd1\x83\xd1\x80\xd1\x80\xd0\xb5\xd0\xbd \xd0\x9b\xd0\xb0\xd0\xb3\xd0\xb0\xd0\xbd\xd0\xbd - \xd0\xbf\xd1\x80\xd0\xbe\xd1\x87\xd1\x8c \xd0\xb8\xd0\xb7 \xd1\x8d\xd1\x82\xd0\xbe\xd0\xb3\xd0\xbe \xd0\xbc\xd0\xb8\xd1\x80\xd0\xb0'Poko\xc5\x99itel nebes Gurren-Lagann'Gurren-Lagann'\xd2\x90\xd1\n\x08\x08\x08\x08\x08\x08\x08\x08"
Traceback (most recent call last):
  File "/usr/local/bin/anidbcli", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/dist-packages/anidbcli/cli.py", line 139, in main
    cli(obj={})
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 555, 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/anidbcli/cli.py", line 84, in api
    res = operation.Process(file_obj)
  File "/usr/local/lib/python3.5/dist-packages/anidbcli/operations.py", line 71, in Process
    res = self.connector.send_request(API_ENDPOINT_FILE % (file["size"], file["ed2k"]))
  File "/usr/local/lib/python3.5/dist-packages/anidbcli/anidbconnector.py", line 117, in send_request
    res = self.crypto.Decrypt(res)
  File "/usr/local/lib/python3.5/dist-packages/anidbcli/encryptors.py", line 32, in Decrypt
    ret = ret.decode("utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd1 in position 1398: invalid continuation byte

end tag

Would it be possible to put "(end)" on final episodes?

anidbcli is failing for anime with huge ammount of releases

anidbcli is failing for anime with huge amount of releases. For example:
https://anidb.net/anime/70
https://anidb.net/anime/2359

Traceback (most recent call last): File "/usr/local/bin/anidbcli", line 11, in <module> load_entry_point('anidbcli==1.63', 'console_scripts', 'anidbcli')() File "/usr/local/lib/python3.6/site-packages/anidbcli/cli.py", line 141, in main cli(obj={}) File "/usr/local/lib/python3.6/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python3.6/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.6/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python3.6/site-packages/click/decorators.py", line 21, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/lib/python3.6/site-packages/anidbcli/cli.py", line 86, in api res = operation.Process(file_obj) File "/usr/local/lib/python3.6/site-packages/anidbcli/operations.py", line 142, in Process fileinfo["ep_no"] = parsed[36] IndexError: list index out of range

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.