malscraper package¶
Subpackages¶
Submodules¶
malscraper.Cache module¶
-
class
malscraper.Cache.
Cache
(preload: bool = False)¶ Bases:
object
Class that handles fetching and caching of myanimelist data
-
__init__
(preload: bool = False)¶ Initializes the cache directories :param preload: Preloads the current cache into memory
-
flush_time
= 86400¶ Specifies the flush time for the cached data
-
in_memory
= {'anime': {}, 'manga': {}, 'users': {}}¶ In-Memory cache
-
initialized
= False¶ Global initialized variable set to true the first time the constructor is called
-
load_mal_page
(mal_id: int, media_type: malscraper.types.MediaType.MediaType)¶ Loads a myanimelist page :param mal_id: The ID of the anime/manga :param media_type: The type of media to load :return: The HTML data
-
load_user_xml
(username: str) → bs4.BeautifulSoup¶ Loads a user’s XML data :param username: The username to fetch the data for :return: The XML user data
-
malscraper.MalAnime module¶
malscraper.UserMalAnime module¶
-
class
malscraper.UserMalAnime.
UserMalAnime
(mal_id: int, username: str)¶ Bases:
malscraper.MalAnime.MalAnime
Class that extends the myanimelist Anime model by integrating user-specific data
-
__init__
(mal_id: int, username: str)¶ Initializes a user-enabled MAL Anime object :param mal_id: The ID of the series on MAL :param username: The username of the user on MAL
-