anime-downloader/docs/advanced/custom_site.rst

17 lines
948 B
ReStructuredText
Raw Permalink Normal View History

2018-10-09 08:04:27 -07:00
Writing your own custom site class
**********************************
2018-10-15 10:10:35 -07:00
:code:`anime_downloader` is built with easy extensibility in mind.
Each of the sites (in the tool) can roughly be classfied into two catagories;
2018-10-15 10:10:35 -07:00
- Sites which don't use Cloudflare DDoS protection: Ex: :py:class:`~anime_downloader.sites.nineanime.NineAnime`
- Sites which use Cloudflare DDoS protection: Ex: :py:class:`~anime_downloader.sites.kissanime.KissAnime`
2018-10-15 10:10:35 -07:00
2019-03-22 07:27:26 -07:00
All sites have the base class :py:class:`~anime_downloader.sites.anime.Anime`.
There are helper functions defined by :py:func: `anime_downloader.sites.helpers.request.get` and :py:func:`anime_downloader.sites.helpers.request.post`.
2019-03-22 07:27:26 -07:00
You are expected to use these functions to perform any network requests.
There is also a helper function :py:func:`anime_downloader.sites.helpers.request.soupfiy` for making `BeautifulSoup` s out of requests.
All requests are cached. So don't worry about making requests twice.