Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
vn-ki committed Jul 12, 2019
1 parent 7d3e6aa commit 7aac995
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 18 deletions.
33 changes: 15 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,25 @@
<br>
<br>
<a href="https://travis-ci.com/vn-ki/anime-downloader">
<img src="https://img.shields.io/travis/com/vn-ki/anime-downloader.svg?style=popout-square&logo=Travis%20CI">
<img src="https://img.shields.io/travis/com/vn-ki/anime-downloader.svg?style=for-the-badge&logo=Travis%20CI">
</a>
<a href="https://codecov.io/gh/vn-ki/anime-downloader">
<img src="https://img.shields.io/codecov/c/github/vn-ki/anime-downloader.svg?logo=codecov&style=popout-square">
<img src="https://img.shields.io/codecov/c/github/vn-ki/anime-downloader.svg?logo=codecov&style=for-the-badge">
</a>
<a href="https://pypi.org/project/anime-downloader/">
<img src="https://img.shields.io/badge/Python-3.3%2B-lightblue.svg?style=popout-square&logo=python">
<img src="https://img.shields.io/badge/Python-3.3%2B-lightblue.svg?style=for-the-badge&logo=python">
</a>
<a href="https://pypi.org/project/anime-downloader/">
<img src="https://img.shields.io/pypi/v/anime-downloader.svg?color=lightblue&logo=python&style=popout-square">
<img src="https://img.shields.io/pypi/v/anime-downloader.svg?color=lightblue&logo=python&style=for-the-badge">
</a>
<a href="https://discord.gg/Qn2nWGm">
<img src="https://img.shields.io/discord/483008720167632929.svg?color=%237289DA&label=Discord&logo=Discord&style=popout-square">
<img src="https://img.shields.io/discord/483008720167632929.svg?color=%237289DA&label=Discord&logo=Discord&style=for-the-badge">
</a>
<a href="https://anime-downlader.rtfd.io">
<img src="https://img.shields.io/readthedocs/anime-downlader.svg?logo=read%20the%20docs&style=for-the-badge">
</a>
</div>


---

Expand Down Expand Up @@ -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).

Expand All @@ -62,25 +68,16 @@ 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.

**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

Expand Down
2 changes: 2 additions & 0 deletions anime_downloader/sites/animeflv.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

class Animeflv(Anime, sitename='animeflv'):
"""
Nice things
Siteconfig
----------
Expand Down
8 changes: 8 additions & 0 deletions anime_downloader/sites/anistream.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@


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']

Expand Down
3 changes: 3 additions & 0 deletions anime_downloader/sites/helpers/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@


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
Expand Down
8 changes: 8 additions & 0 deletions anime_downloader/sites/nineanime.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ def get_stream_url(base_url, params, DD=None):

@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']

Expand Down
3 changes: 3 additions & 0 deletions anime_downloader/sites/twistmoe.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ def _get_sources(self):


class TwistMoe(Anime, sitename='twist.moe'):
"""
Twist.moe
"""
sitename = 'twist.moe'
QUALITIES = ['360p', '480p', '720p', '1080p']
_api_url = "https://twist.moe/api/anime/{}/sources"
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions docs/usage/sites.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Site Configs
------------

.. autoclass:: anime_downloader.sites.animeflv.Animeflv
.. autoclass:: anime_downloader.sites.anistream.Anistream
.. autoclass:: anime_downloader.sites.nineanime.NineAnime

0 comments on commit 7aac995

Please sign in to comment.