#NEWLINE# def _convert_to_text( link ) : #NEWLINE# #INDENT# parsed = urlparse . urlparse ( link . url ) #NEWLINE# site = parsed [ 1 ] #NEWLINE# rest = ' ' . join ( re . split ( '[/.-_]' , parsed [ 2 ] ) ) #NEWLINE# data = ( '%s %s %s user*%s topic:%s %s' % ( site , rest , link . text , link . user . username , link . topic . name , link . topic . full_name ) ) #NEWLINE# data = data . replace ( "'" , '*' ) #NEWLINE# data = data . replace ( '%' , '*' ) #NEWLINE# return data