'Function to scrape
contents of a \'p\' tag'

def get_paragraph_contents(self, paragraph):

    p = paragraph
    if (p is None):
        return ''
    final_p = '<p>{}</p>'
    text = ''
    for e in p:
        if (e is not None):
            try:
                if (e.name == 'code'):
                    text += '<code>{}</code>'.format(e.string)
                elif (e.name == 'a'):
                    code = e.find('code')
                    text += '<code>{}</code>'.format(e.string)
                else:
                    text += e.text
            except:
                text += e.string
    return final_p.format(self.replace_unicodes(text))
