def __getattr__(self, attr):
        for replacement in settings.REPLACEMENTS:
            attr = attr.replace(replacement, '')

        attr = attr.lower()

        if attr == 'random':
            attr = self.data['randomize'][
                str(random.randint(0, len(self.data['randomize']) - 1))
            ]
        else:
            for shortcut, value in settings.SHORTCUTS:
                if attr == shortcut:
                    attr = value
                    break

        try:
            return self.data['browsers'][attr][
                random.randint(
                    0, len(self.data['browsers'][attr]) - 1
                )
            ]
        except __HOLE__:
            return None
dataset/ETHPy150Open SickRage/SickRage/lib/fake_useragent/fake.py/UserAgent.__getattr__