def get_house_detail(self, html):
        """Get bedroom, bathroom, sqft and more information.

        Example: http://www.zillow.com/homedetails/8510-Whittier-Blvd-Bethesda-MD-20817/37183103_zpid/
        """
        if "I'm not a robot" in html:
            raise exc.CaptchaError(url)

        data = {"errors": dict()}
        soup = self.get_soup(html)

        # header part, bedroom, bathroom, sqft
        header = soup.find("header", class_="zsg-content-header addr")
        if header is None:
            raise exc.ParseError(url)

        try:
            h3 = header.find("h3")
            if h3 is None:
                raise exc.ParseError

            span_list = h3.find_all("span", class_="addr_bbs")
            if len(span_list) != 3:
                raise exc.ParseError

            text = span_list[0].text
            try:
                bedroom = float_filter(text)
                data["bedroom"] = bedroom
            except:
                data["errors"][
                    "bedroom"] = "can't parse bedroom from %r" % text

            text = span_list[1].text
            try:
                bathroom = float_filter(text)
                data["bathroom"] = bathroom
            except:
                data["errors"][
                    "bathroom"] = "can't parse bathroom from %r" % text

            text = span_list[2].text
            try:
                sqft = int_filter(text)
                data["sqft"] = sqft
            except:
                data["errors"]["sqft"] = "can't parse sqft from %r" % text
        except:
            pass

        # Facts, Features, Construction, Other (FFCO)
        div_list = soup.find_all(
            "div", class_=re.compile("fact-group-container zsg-content-component"))

        for div in div_list:
            h3 = div.find("h3")
            if h3.text == "Facts":
                try:
                    facts = list()
                    for li in div.find_all("li"):
                        facts.append(li.text.strip())
                    data["facts"] = facts
                except Exception as e:
                    data["errors"]["facts"] = str(e)

            if h3.text == "Features":
                features = list()
                try:
                    for li in div.find_all("li"):
                        if '"targetDiv"' not in li.text:
                            features.append(li.text.strip())
                    data["features"] = features
                except Exception as e:
                    data["errors"]["features"] = repr(e)

            if h3.text == "Appliances Included":
                appliances = list()
                try:
                    for li in div.find_all("li"):
                        appliances.append(li.text.strip())
                    data["appliances"] = appliances
                except Exception as e:
                    data["errors"]["appliances"] = repr(e)

            if h3.text == "Additional Features":
                additional_features = list()
                try:
                    for li in div.find_all("li"):
                        additional_features.append(li.text.strip())
                    data["additional_features"] = additional_features
                except Exception as e:
                    data["errors"]["additional_features"] = repr(e)

            if h3.text == "Construction":
                construction = list()
                try:
                    for li in div.find_all("li"):
                        construction.append(li.text.strip())
                    data["construction"] = construction
                except Exception as e:
                    data["errors"]["construction"] = repr(e)

            if h3.text == "Other":
                other = list()
                try:
                    for li in div.find_all("li"):
                        other.append(li.text.strip())
                    data["other"] = other
                except Exception as e:
                    data["errors"]["other"] = repr(e)

        if len(data["errors"]) == 0:
            del data["errors"]

        if data:
            return data
        else:
            return None
def get_house_detail ( self , html ) : if "I'm not a robot" in html : raise exc . CaptchaError ( url ) data = { "errors" : dict ( ) } soup = self . get_soup ( html ) header = soup . find ( "header" , class_ = "zsg-content-header addr" ) if header is None : raise exc . ParseError ( url ) try : h3 = header . find ( "h3" ) if h3 is None : raise exc . ParseError span_list = h3 . find_all ( "span" , class_ = "addr_bbs" ) if len ( span_list ) != 3 : raise exc . ParseError text = span_list [ 0 ] . text try : bedroom = float_filter ( text ) data [ "bedroom" ] = bedroom except : data [ "errors" ] [ "bedroom" ] = "can't parse bedroom from %r" % text text = span_list [ 1 ] . text try : bathroom = float_filter ( text ) data [ "bathroom" ] = bathroom except : data [ "errors" ] [ "bathroom" ] = "can't parse bathroom from %r" % text text = span_list [ 2 ] . text try : sqft = int_filter ( text ) data [ "sqft" ] = sqft except : data [ "errors" ] [ "sqft" ] = "can't parse sqft from %r" % text except : pass div_list = soup . find_all ( "div" , class_ = re . compile ( "fact-group-container zsg-content-component" ) ) for div in div_list : h3 = div . find ( "h3" ) if h3 . text == "Facts" : try : facts = list ( ) for li in div . find_all ( "li" ) : facts . append ( li . text . strip ( ) ) data [ "facts" ] = facts except Exception as e : data [ "errors" ] [ "facts" ] = str ( e ) if h3 . text == "Features" : features = list ( ) try : for li in div . find_all ( "li" ) : if '"targetDiv"' not in li . text : features . append ( li . text . strip ( ) ) data [ "features" ] = features except Exception as e : data [ "errors" ] [ "features" ] = repr ( e ) if h3 . text == "Appliances Included" : appliances = list ( ) try : for li in div . find_all ( "li" ) : appliances . append ( li . text . strip ( ) ) data [ "appliances" ] = appliances except Exception as e : data [ "errors" ] [ "appliances" ] = repr ( e ) if h3 . text == "Additional Features" : additional_features = list ( ) try : for li in div . find_all ( "li" ) : additional_features . append ( li . text . strip ( ) ) data [ "additional_features" ] = additional_features except Exception as e : data [ "errors" ] [ "additional_features" ] = repr ( e ) if h3 . text == "Construction" : construction = list ( ) try : for li in div . find_all ( "li" ) : construction . append ( li . text . strip ( ) ) data [ "construction" ] = construction except Exception as e : data [ "errors" ] [ "construction" ] = repr ( e ) if h3 . text == "Other" : other = list ( ) try : for li in div . find_all ( "li" ) : other . append ( li . text . strip ( ) ) data [ "other" ] = other except Exception as e : data [ "errors" ] [ "other" ] = repr ( e ) if len ( data [ "errors" ] ) == 0 : del data [ "errors" ] if data : return data else : return None
Get bedroom, bathroom, sqft and more information.

        Example: http://www.zillow.com/homedetails/8510-Whittier-Blvd-Bethesda-MD-20817/37183103_zpid/