def author_info(self, topic):
author_url = home_page_url+"/api/members/show.json?username="+topic.author
response = session.get(author_url)
data = json.loads(response.content)
user = User()
user.id = data.get('id')
user.name = data.get('username')
user.website = data.get('website')
user.twitter = data.get('twitter')
user.github = data.get('github')
user.location = data.get('location')
user.tagline = data.get('tagline')
user.bio = data.get('bio')
user.time = format_time(data.get('created'))
return user
评论列表
文章目录