UserAgentRotator constructor

UserAgentRotator({
  1. List<String>? userAgents,
  2. Random? random,
})

Creates a new UserAgentRotator with the given user agents

If no user agents are provided, a default list will be used

Implementation

UserAgentRotator({List<String>? userAgents, Random? random})
  : _userAgents = userAgents ?? _defaultUserAgents,
    _random = random ?? Random();