Random User Agent Generator Function

  • Share this:

Code introduction


This function uses the generate_user_agent method from the urllib3 library to generate a random user agent string.


Technology Stack : urllib3

Code Type : Function

Code Difficulty : Beginner


                
                    
def get_random_user agent():
    import random
    from urllib3 import util
    user_agents = util.generate_user_agent()
    return user_agents                
              
Tags: