def get_character(self, character_id):
try:
character = self.eve.get_character(character_id)
except requests.HTTPError as ex:
# Patch for character being unresolvable and ESI throwing internal errors
# Temporarily stub character to not break our behavior.
if ex.response.status_code == 500:
character = { 'name': 'Unknown character', 'corporation_id': 98356193 }
else:
raise
return '**%s** (https://zkillboard.com/character/%d/) (%s)' % (
character['name'],
character_id,
self.get_corporation(character['corporation_id'])
)
评论列表
文章目录