Ejemplo n.º 1
0
    def __init__(self, *args, **kwargs):
        BasePage.__init__(self, *args, **kwargs)

        # Check the 'oops' error message when adopteunmec guys are gay.
        b = self.document.getElementsByTagName('body')[0]
        for div in b.getElementsByTagName('div'):
            if div.getAttribute('id') == 'oops':
                raise BrowserUnavailable('Oops')

        # Check when the account is temporarily blocked.
        for img in self.document.getElementsByTagName('img'):
            if img.getAttribute('src') == 'http://s.adopteunmec.com/img/exemple.jpg':
                raise AdopteBanned('Your account is blocked. You have to unblock by yourself but we can\'t help you.')
Ejemplo n.º 2
0
 def __init__(self, *args, **kwargs):
     BasePage.__init__(self, *args, **kwargs)
     self._player_cache = {}