def GET(self, user):
baseurl = user.strip('/').split('/')
if len(baseurl) > 0:
user = baseurl[-1]
if not user:
raise steam.items.InventoryError("Need an ID")
try:
prof = models.user(user).load()
ctx = models.sim_context(prof).load()
for ct in (ctx or []):
ct.setdefault("inventory_logo", '')
return template.sim_selector(prof, ctx)
except steam.items.InventoryError as E:
raise web.NotFound(template.errors.generic("Failed to load backpack ({0})".format(E)))
except steam.user.ProfileError as E:
raise web.NotFound(template.errors.generic("Failed to load profile ({0})".format(E)))
except steam.api.HTTPError as E:
raise web.NotFound(template.errors.generic("Couldn't connect to Steam (HTTP {0})".format(E)))
except models.CacheEmptyError as E:
raise web.NotFound(template.errors.generic(E))
评论列表
文章目录