user
Write a code to detect the type of browser that is used to access the page.
assistant

"""
Code to detect the type of browser that is used to access the page
"""

import requests 
import re 

def get_browser_type():
    user_agent = requests.get('http://www.useragentstring.com/').text
    reg_ex = r"(?<=User\sAgent\:\s)(.*?)(?=\))"
    m = re.search(reg_ex,user_agent)
    return m.group()
    
if __name__ == '__main__':
    print(get_browser_type())