'Try and parse the JSON returned from Twitter and return
an empty dictionary if there is any error. This is a purely
defensive check because during some Twitter network outages
it will return an HTML failwhale page.'

def _ParseAndCheckTwitter(self, json):

    try:
        data = simplejson.loads(json)
        self._CheckForTwitterError(data)
    except ValueError:
        if ('<title>Twitter    /    Over    capacity</title>' in json):
            raise TwitterError('Capacity    Error')
        if ('<title>Twitter    /    Error</title>' in json):
            raise TwitterError('Technical    Error')
        raise TwitterError('json    decoding')
    return data
