#NEWLINE# def add_type( self , type ) : #NEWLINE# #INDENT# prefix = 'og: http://ogp.me/ns#' #NEWLINE# if ( type is not 'website' ) : #NEWLINE# #INDENT# bits = type . split ( '.' ) #NEWLINE# if ( not self . prefixes ) : #NEWLINE# #INDENT# self . prefixes . append ( prefix ) #NEWLINE# #UNINDENT# prefix = '{0}: http://ogp.me/ns/{0}#' . format ( bits [ 0 ] ) #NEWLINE# #UNINDENT# if ( prefix not in self . prefixes ) : #NEWLINE# #INDENT# type_handler = ogp_types . get ( type ) #NEWLINE# if type_handler : #NEWLINE# #INDENT# self . doc . head . add_meta ( property = 'og:type' , content = type ) #NEWLINE# self . prefixes . append ( prefix ) #NEWLINE# type_handler ( self . doc )