ClementJ18 / moddb

A Python scrapper to access ModDB mods, games and more as objects
https://moddb.readthedocs.io
MIT License
13 stars 8 forks source link

Addon.save() does not work #6

Closed Xabab closed 2 years ago

Xabab commented 3 years ago

When trying to save addon (e.g. https://www.moddb.com/mods/stalker-anomaly/addons/anomaly-hd-models-addon),

class File(BaseMetaClass):
    def save(self, path = None): 
        mirror = join(download.find("a", string=f"download {self.name}")["href"])

throws TypeError: 'NoneType' object is not subscriptable because it tries to search for an addon title instead for a filename

image

Simply needs to be changed to:

mirror = join(download.find("a", string=f"download {self.filename}")["href"])

ClementJ18 commented 2 years ago

Fixed in 22c92e3