'how to collect information of viewer of my python web server

I created a Python web server using the following code:

import os

from http.server import HTTPServer, CGIHTTPRequestHandler

os.chdir('.')

server_object = HTTPServer(server_address=('', 80), RequestHandlerClass=CGIHTTPRequestHandler)

server_object.serve_forever()

I want to access the information of browsers that refer to my web server, information such as: IP address, type of browser agent, browsing time ... but I do not know which Python library to use, please help



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source