def showTimeMap(urir, format):
urir = getCompleteURI(urir)
s = surt.surt(urir, path_strip_trailing_slash_unless_empty=False)
indexPath = ipwbConfig.getIPWBReplayIndexPath()
cdxjLinesWithURIR = getCDXJLinesWithURIR(urir, indexPath)
tmContentType = ''
if format == 'link':
tm = generateLinkTimeMapFromCDXJLines(
cdxjLinesWithURIR, s, request.url)
tmContentType = 'application/link-format'
elif format == 'cdxj':
tm = generateCDXJTimeMapFromCDXJLines(
cdxjLinesWithURIR, s, request.url)
tmContentType = 'application/cdxj+ors'
resp = Response(tm)
resp.headers['Content-Type'] = tmContentType
return resp
评论列表
文章目录