real_time_analysis.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:jd_analysis 作者: awolfly9 项目源码 文件源码
def record_result(self, result, color = 'default', font_size = 16, strong = False, type = 'word',
                      br = True, default = False, new_line = False):
        self.full_result = ''
        if type == 'word' and default == False:
            if strong:
                result = '<strong style="color: %s; font-size: %spx;">%s</strong>' % (color, font_size, result)
            else:
                result = '<span style="color: %s; font-size: %spx;">%s</span>' % (color, font_size, result)
        elif type == 'image':
            result = markdown2.markdown(result)

        self.full_result += result

        if br:
            self.full_result += '<br>'
        if new_line:
            self.full_result += '\n'

        utils.push_redis(guid = self.guid, product_id = self.product_id, info = self.full_result, type = type)

    # ?????????
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号