chrome_crawler.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:chrome-crawler 作者: lqf96 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号