QuickStart
First, let's import the library:
Session (Optional)
It may be necessary to change the base_url
of all links if the AnimeWorld site changes from https://www.animeworld.ac
to something else.
To do this, you need to modify the session's base_url
(SES):
Find
Now let's try searching for an anime:
Output
[
{
"id": 1717,
"name": "Sword Art Online",
"jtitle": "Sword Art Online",
"studio": "A-1 Pictures",
"release": "July 5, 2014",
"episodes": 25,
"state": "1",
"story": 'Kazuto "Kirito" Kirigaya, a programming genius, enters an interactive virtual reality with multiple players (a "massively multiplayer online" or "MMO") called "Sword Art Online." The problem is that once inside, players can only leave by winning the game—because "game over" means certain death.',
"categories": [...],
"image": "https://img.animeworld.ac/locandine/36343l.jpg",
"durationEpisodes": "23",
"link": "https://www.animeworld.ac/play/sword-art-online.N0onT",
"createdAt": "2020-08-02T15:42:44.000Z",
"language": "jp",
"year": "2012",
"dub": False,
"season": "summer",
"totViews": 461576,
"dayViews": 204,
"weekViews": 459,
"monthViews": 6416,
"malId": 11757,
"anilistId": 11757,
"mangaworldId": None,
"malVote": 7.35,
"trailer": "https://www.youtube.com/embed/6ohYYtxfDCg?enablejsapi=1&wmode=opaque",
},
...
]
The find function returns a list of dictionaries, one for each anime found. Each dictionary contains a lot of information, including the name, number of episodes, release date, link, etc.
Anime
The Anime class is the core object of this library. To instantiate it, you need to pass the anime's link, which can be obtained directly from the AnimeWorld website or from the previously mentioned find function.
Warning
You can pass the full link to the Anime
class, like this:
base_url
(https://www.animeworld.ac
) will be replaced with the one defined in the Session (SES).
With this class, you can retrieve information about the anime:
Output
Title: Sword Art Online
----------------------------------
Synopsis: Kazuto "Kirito" Kirigaya, a programming genius, enters an interactive virtual reality with multiple players (a "massively multiplayer online" or "MMO") called "Sword Art Online." The problem is that once inside, players can only leave by winning the game—because "game over" means certain death.
----------------------------------
General Information:
Category: Anime
Audio: Japanese
Release Date: July 8, 2012
Season: Summer 2012
Studio: A-1 Pictures
Genre: ['Adventure', 'Action', 'Fantasy', 'Game', 'Romance', 'Drama']
Score: 8.36 / 10
Duration: 23 min/ep
Episodes: 25
Status: Completed
Views: 461,733
----------------------------------
Most importantly, you can download the episodes:
Info
If no argument is passed to the getEpisodes()
method, ALL episodes of the anime will be retrieved.
Warning
ep.number
is a str
attribute. More information here.