File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -128,6 +128,25 @@ def getTrama(self) -> str:
128128 soupeddata = BeautifulSoup (self .html , "html.parser" )
129129 return soupeddata .find ("div" , { "class" : "desc" }).get_text ()
130130
131+ @HealthCheck
132+ def getCover (self ) -> str :
133+ """
134+ Ottiene l'url dell'immagine di copertina dell'anime.
135+
136+ Returns:
137+ Url dell'immagine di copertina dell'anime.
138+
139+ Raises:
140+ DeprecatedLibrary: Cambiamento del sito Animeworld.
141+
142+ Example:
143+ ```py
144+ return str # Url dell'immagine di copertina dell'anime
145+ ```
146+ """
147+ soupeddata = BeautifulSoup (self .html , "html.parser" )
148+ return soupeddata .find ("div" , { "id" : "thumbnail-watch" }).find ("img" )["src" ]
149+
131150 @HealthCheck
132151 def getInfo (self ) -> Dict [str , str ]:
133152 """
Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ def test_anime(self):
9090 """
9191 self .assertIsInstance (self .anime .getName (), str )
9292 self .assertIsInstance (self .anime .getTrama (), str )
93+ self .assertIsInstance (self .anime .getCover (), str )
9394
9495 info = self .anime .getInfo ()
9596 self .assertIsInstance (info , dict )
You can’t perform that action at this time.
0 commit comments