Skip to content

Package documentation

Vishnunarayan K I edited this page May 8, 2019 · 3 revisions

Documentation

anime_downloader is designed to be used in your own package too.

With URL

You can get the provider class using get_anime_class function. You can either provide the url to get the class or you can specify the name of the site.

from anime_downloader import get_anime_class

# Both of the below functions return the same class
NineAnime = get_anime_class('9anime')
NineAnime = get_anime_class('https://www4.9anime.is/watch/dragon-ball-super-dub.r65p')

Now that you have the class required for your site, you can start hacking around.

anime = NineAnime('https://www4.9anime.is/watch/dragon-ball-super-dub.r65p', quality='480p')
	
print(anime.title)
print(anime.image)  # Poster. This will be renamed to poster in a future release.
print(len(anime))  # No of episodes for the anime
print(anime.url)  # The site url for the anime.
print(anime.quality)
print(anime.meta)  # A dictionary containing extra metadata. Can be empty and can vary across sites.
print(anime.sitename)  # In case you want to know which site.

quality can any of ['360p', '480p', '720p']. If not this line will raise AnimeDlError.

Get an episode from anime

ep = anime[0]

ep is an object of corresponding episode class for each anime.

print(ep.ep_no) # int: Episode number of the episode
print(ep.pretty_title)  # str: title in the format <animename>-<ep_no>
print(ep.image)  # thumbnail. Will be renamed to thumbnail in a future release
print(ep.quality)
print(ep.stream_url)  # stream url for the epiosde.
print(ep.title)  # title from site. Most probably giberrish

ep.download()  # downloads the episode