def append_random_bottlecap_phrase(message):
 bottlecap = None
 try:
  wp = WikiPage.get(Frontpage, g.wiki_page_gold_bottlecaps)
  split_list = re.split('^[*-] ', wp.content, flags=re.MULTILINE)
  choices = [item.strip() for item in split_list if item.strip()]
  if len(choices):
   bottlecap = choice(choices)
 except NotFound:
  pass
 if bottlecap:
  message += ('\n\n> ' + bottlecap)
 return message

def append_random_bottlecap_phrase ( message ) : bottlecap = None try : wp = WikiPage . get ( Frontpage , g . wiki_page_gold_bottlecaps ) split_list = re . split ( '^[*-] ' , wp . content , flags = re . MULTILINE ) choices = [ item . strip ( ) for item in split_list if item . strip ( ) ] if len ( choices ) : bottlecap = choice ( choices ) except NotFound : pass if bottlecap : message += ( '\n\n> ' + bottlecap ) return message
appends a random "bottlecap" phrase from the wiki page .