<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_domain(cls, domain, version=None, require_https=True):
 """ Try to find a hive for the given domain; raise an error if we have to failover to HTTP and haven't explicitly suppressed it in the call. """

        url = 'https://' + domain + '/api/hive.json'
        try:
            return cls.from_url(url, version=version, require_https=require_https)
        except MissingHive:
            url = 'http://' + domain + '/api/hive.json'
            return cls.from_url(url, version=version, require_https=require_https)