def _crawler_static(path):
""" Serve Chrome crawler static files. """
# Fetch file content
try:
file_content = resource_string(_pkg_name, "chrome_crawler_frontend/"+path)
except IOError:
abort(404, "Not Found")
# Guess MIME type from file name
mime_type = guess_type(path)[0]
if mime_type:
res.set_header(b"content-type", mime_type)
# Return file content
return file_content
# Custom static files
评论列表
文章目录