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
评论列表
文章目录