views.py 文件源码

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

项目:ComBunqWebApp 作者: OGKevin 项目源码 文件源码
def get_releases(self):
        res = requests.get(
            'https://api.github.com/repos/OGKevin/combunqwebapp/releases') \
            .json()

        try:
            data = res[:7]
        except TypeError as e:
            logging.error(e)
            return None
        else:
            for x in data:
                x['created_at'] = arrow.get(x['created_at']).format('Do MMM')
                x['body'] = markdown2.markdown(x['body'])
            return data
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号