Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (19 sloc) 924 Bytes

Library usage

Anime downloader can be used as a library too.

The following code searches for 'one punch' from

:py:func:`~anime_downloader.sites.init.get_anime_class` can be used to import specific sites using the url one of :py:data:`~anime_downloader.commands.dl.sitenames`.

from anime_downloader.sites import get_anime_class

Twist = get_anime_class('')
search ='one punch')

# You can directly import twist too
from anime_downloader.sites.twistmoe import TwistMoe
anime = TwistMoe(search[0].url)

# Get first episodes url

In the above example TwistMoe is a concrete implementation of :py:class:`anime_downloader.sites.anime.Anime`. Search results is list of :py:class:`anime_downloader.sites.anime.SearchResult`.

You can’t perform that action at this time.