From 7aac995330ed7a79662c4359bca77642f6a0e0b0 Mon Sep 17 00:00:00 2001 From: Vishnunarayan K I Date: Fri, 12 Jul 2019 23:11:36 +0530 Subject: [PATCH] docs: update --- README.md | 33 ++++++++++++-------------- anime_downloader/sites/animeflv.py | 2 ++ anime_downloader/sites/anistream.py | 8 +++++++ anime_downloader/sites/helpers/util.py | 3 +++ anime_downloader/sites/nineanime.py | 8 +++++++ anime_downloader/sites/twistmoe.py | 3 +++ docs/index.rst | 1 + docs/usage/sites.rst | 6 +++++ 8 files changed, 46 insertions(+), 18 deletions(-) create mode 100644 docs/usage/sites.rst diff --git a/README.md b/README.md index e72660c..75953fc 100644 --- a/README.md +++ b/README.md @@ -5,21 +5,25 @@

- + - + - + - + - + + + + + --- @@ -47,11 +51,13 @@ Yeah. Me too! That's why this tool exists. - 9anime - twist.moe -- KissAnime [cloudflare] -- Masterani.me [cloudlfare] -- KissCartoon [cloudflare] +- KissAnime +- KissCartoon - Gogoanime -- AnimePahe [cloudflare] +- AnimePahe +- Anistream +- Animeflv (Latin) +- Masterani.me [cloudlfare] (site shut down) **Note:** To download from sites marked [cloudflare], anime-downloader has to be installed with cloudflare support (see below). @@ -62,17 +68,9 @@ You can install the stable release from PyPI: $ pip install anime-downloader ``` -To install with cloudflare support (read note below): -```bash -$ pip install anime-downloader[cloudflare] -``` - To install the dev version: ```bash $ pip install -U git+https://github.com/vn-ki/anime-downloader.git - -# To install with cloudflare support -$ pip install -U git+https://github.com/vn-ki/anime-downloader.git#egg=anime-downloader[cloudflare] ``` If you have trouble installing, see extended installation instructions [here](https://github.com/vn-ki/anime-downloader/wiki/Installation) or join the [discord server](https://discord.gg/Qn2nWGm) for help. @@ -80,7 +78,6 @@ If you have trouble installing, see extended installation instructions [here](ht **Note**: - For cloudflare scraping [cfscrape](https://github.com/Anorov/cloudflare-scrape) is used. It depends on [`node-js`](https://nodejs.org/en/). So if you want to use cloudflare, make sure you have [node-js](https://nodejs.org/en/) installed. - You might have to use pip3 depending on your system -- If you are using zsh, don't forget to escape `[` and `]` using `\`. ## Usage diff --git a/anime_downloader/sites/animeflv.py b/anime_downloader/sites/animeflv.py index f542717..523df89 100644 --- a/anime_downloader/sites/animeflv.py +++ b/anime_downloader/sites/animeflv.py @@ -7,6 +7,8 @@ import json class Animeflv(Anime, sitename='animeflv'): """ + Nice things + Siteconfig ---------- diff --git a/anime_downloader/sites/anistream.py b/anime_downloader/sites/anistream.py index 91019c3..386df55 100644 --- a/anime_downloader/sites/anistream.py +++ b/anime_downloader/sites/anistream.py @@ -5,6 +5,14 @@ import json class Anistream(Anime, sitename='anistream.xyz'): + """ + Site: http://anistream.xyz + + Config + ------ + version: One of ['subbed', 'dubbed] + Selects the version of audio of anime. + """ sitename = 'anistream.xyz' QUALITIES = ['360p', '480p', '720p', '1080p'] diff --git a/anime_downloader/sites/helpers/util.py b/anime_downloader/sites/helpers/util.py index 6bcd128..b01e2d0 100644 --- a/anime_downloader/sites/helpers/util.py +++ b/anime_downloader/sites/helpers/util.py @@ -2,14 +2,17 @@ import logging def not_working(message): + orig_message = message message += " You can use `anime -ll DEBUG` to use it." def wrapper(cls): class NotWorking: + """Site is not working""" def __init__(self, *args, **kwargs): raise RuntimeError(message) def search(cls, *args, **kwargs): raise RuntimeError(message) + NotWorking.__doc__ = orig_message logger = logging.getLogger("anime_downloader") if logger.level == logging.DEBUG: return cls diff --git a/anime_downloader/sites/nineanime.py b/anime_downloader/sites/nineanime.py index 84e2813..e524f2d 100644 --- a/anime_downloader/sites/nineanime.py +++ b/anime_downloader/sites/nineanime.py @@ -61,6 +61,14 @@ class NineAnimeEpisode(AnimeEpisode, sitename='9anime'): @helpers.not_working("9anime introduced captcha.") class NineAnime(Anime, sitename='9anime'): + """ + Site: 9anime + + Config + ------ + server: One of ['rapidvideo', 'streamango'] + Selects the server. + """ sitename = '9anime' QUALITIES = ['360p', '480p', '720p', '1080p'] diff --git a/anime_downloader/sites/twistmoe.py b/anime_downloader/sites/twistmoe.py index 0a238fa..126f355 100644 --- a/anime_downloader/sites/twistmoe.py +++ b/anime_downloader/sites/twistmoe.py @@ -27,6 +27,9 @@ class TwistMoeEpisode(AnimeEpisode, sitename='twist.moe'): class TwistMoe(Anime, sitename='twist.moe'): + """ + Twist.moe + """ sitename = 'twist.moe' QUALITIES = ['360p', '480p', '720p', '1080p'] _api_url = "https://twist.moe/api/anime/{}/sources" diff --git a/docs/index.rst b/docs/index.rst index 8121ee8..707c764 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -41,6 +41,7 @@ NOTE: To download from sites marked `[cloudflare]`, anime-downloader has to be i usage/dl usage/watch usage/config + usage/sites advanced/custom_site api/base_classes.rst api/helper_functions.rst diff --git a/docs/usage/sites.rst b/docs/usage/sites.rst new file mode 100644 index 0000000..7c00fbe --- /dev/null +++ b/docs/usage/sites.rst @@ -0,0 +1,6 @@ +Site Configs +------------ + +.. autoclass:: anime_downloader.sites.animeflv.Animeflv +.. autoclass:: anime_downloader.sites.anistream.Anistream +.. autoclass:: anime_downloader.sites.nineanime.NineAnime