def __init__(self, sunsign=None):
        """
        Create a Horoscope
        """

        if not is_valid_sunsign(sunsign):
            raise HoroscopeException("Invalid horoscope sunsign")

        self.sunsign = sunsign.lower()
        self.url = "http://new.theastrologer.com/" + self.sunsign
        self.date_today = date.today()
        try:
            self.html_resp = get(self.url)
        except Timeout as e:
            raise HoroscopeException(e)
        except RequestException as e:
            raise HoroscopeException(e)
        self.tree = html.fromstring(self.html_resp.content)
def __init__ ( self , sunsign = None ) : if not is_valid_sunsign ( sunsign ) : raise HoroscopeException ( "Invalid horoscope sunsign" ) self . sunsign = sunsign . lower ( ) self . url = "http://new.theastrologer.com/" + self . sunsign self . date_today = date . today ( ) try : self . html_resp = get ( self . url ) except Timeout as e : raise HoroscopeException ( e ) except RequestException as e : raise HoroscopeException ( e ) self . tree = html . fromstring ( self . html_resp . content )
Create a Horoscope