@@ -27,7 +27,7 @@ class Highscores(abc.Serializable):
2727 Attributes
2828 ----------
2929 world: :class:`str`
30- The world the highscores belong to.
30+ The world the highscores belong to. If this is ```None``, the highscores shown are for all worlds.
3131 category: :class:`Category`
3232 The selected category to displays the highscores of.
3333 vocation: :class:`VocationFilter`
@@ -117,7 +117,7 @@ def from_content(cls, content):
117117 raise InvalidContent ("content does is not from the highscores section of Tibia.com" )
118118 world_filter , vocation_filter , category_filter = filters
119119 world = world_filter .find ("option" , {"selected" : True })["value" ]
120- if world == "ALL WORLDS " :
120+ if world == "ALL" :
121121 world = None
122122 category = int (category_filter .find ("option" , {"selected" : True })["value" ])
123123 vocation_selected = vocation_filter .find ("option" , {"selected" : True })
@@ -147,7 +147,7 @@ def from_content(cls, content):
147147 return highscores
148148
149149 @classmethod
150- def get_url (cls , world , category = Category .EXPERIENCE , vocation = VocationFilter .ALL , page = 1 ):
150+ def get_url (cls , world = None , category = Category .EXPERIENCE , vocation = VocationFilter .ALL , page = 1 ):
151151 """Gets the Tibia.com URL of the highscores for the given parameters.
152152
153153 Parameters
@@ -165,6 +165,8 @@ def get_url(cls, world, category=Category.EXPERIENCE, vocation=VocationFilter.AL
165165 -------
166166 The URL to the Tibia.com highscores.
167167 """
168+ if world is None :
169+ world = "ALL"
168170 return get_tibia_url ("community" , "highscores" , world = world , category = category .value , profession = vocation .value ,
169171 currentpage = page )
170172
0 commit comments