code: def login(self, session=None):
          
          session = session or self.client.session
          try:
              response = session.get(self.login_url)
          except ConnectionError:
              raise APIError(None, self.login_url, None, 'ConnectionError')
          except Exception as e:
              raise APIError(None, self.login_url, None, e)
          app_key = re.findall(r'''"appKey":\s"(.*?)"''', response.text)
          if app_key:
              self.app_key = app_key[0]
          else:
              raise RaceCardError("Unable to find appKey")
docs: Parses app key from betfair exchange site.
  
          :param requests.session session: Requests session object