def __math_garden_area(plot_surface, build_surface): # If plot_surface and build_surface are not None: if plot_surface and build_surface: # Convert string to int plot_surface = Cleaner.string_to_int(plot_surface.strip()) build_surface = Cleaner.string_to_int(build_surface.strip()) # If plot_surface and build_surface exists: if plot_surface and build_surface: print(plot_surface - build_surface) return plot_surface - build_surface return None
def search_col_xs_7(title, room_type): """ Search for a given room in a 'col_xs_7' under 'More Info'. Append its number to 'room_number'. """ nonlocal rooms_number result = self.__get_text( self.__scrap_field_value('div', 'col-xs-7 info-name', title)) if result: rooms_number += Cleaner.string_to_int(result, 1) has_found[room_type] = True