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 @@ -74,6 +74,10 @@ print("----------------------------------\n")
7474print (" Plot:" , anime.getTrama())
7575print (" ----------------------------------\n " )
7676
77+ # Cover
78+ print (" Cover: " , anime.getCover())
79+ print (" ----------------------------------\n " )
80+
7781# General information
7882info = anime.getInfo()
7983print (" General Information:\n " , " \n " .join(
Original file line number Diff line number Diff line change @@ -74,6 +74,10 @@ print("----------------------------------\n")
7474print (" Trama:" , anime.getTrama())
7575print (" ----------------------------------\n " )
7676
77+ # La locandina
78+ print (" Cover: " , anime.getCover())
79+ print (" ----------------------------------\n " )
80+
7781# Informazioni generali
7882info = anime.getInfo()
7983print (" Informazioni generali:\n " , " \n " .join(
Original file line number Diff line number Diff line change 2323 favicon : static/img/logo.svg
2424 features :
2525 - navigation.sections
26+ - navigation.tracking
2627 - search.suggest
2728 - content.code.annotate
2829 - content.code.copy
@@ -68,12 +69,15 @@ plugins:
6869 - locale : it
6970 name : Italiano
7071 build : true
71- - autorefs
72+ - autorefs :
73+ resolve_closest : true
7274- git-revision-date-localized :
7375 type : date
7476 locale : en
7577- search :
76- lang : en
78+ lang :
79+ - en
80+ - it
7781- mkdocstrings :
7882 default_handler : python
7983 handlers :
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