def expand(self, url):
        params = {'shortUrl': url}
        url = '{0}?key={1}'.format(self.api_url, self.api_key)
        response = self._get(url, params=params)

        if response.ok:
            try:
                data = response.json()
            except __HOLE__:
                raise ExpandingErrorException('There was an error expanding'
                                              ' this url - {0}'.format(
                                                  response.content))
            if 'longUrl' in data:
                return data['longUrl']
        raise ExpandingErrorException('There was an error expanding '
                                      'this url - {0}'.format(
                                          response.content))
dataset/ETHPy150Open ellisonleao/pyshorteners/pyshorteners/shorteners/googl.py/Google.expand