user-agents
user-agents copied to clipboard
How to get the first 500 most-common user agents
Hi,
I do this userAgent = new UserAgents({ deviceCategory: 'desktop', userAgent: /^Mozilla/ }); to get Mozilla user agent on desktop device.
I want to get the first 500 most-common/recent Mozilla user agent on desktop device. To do that I probably need to do the filtering using the custom function.
I don't know how to filter to get the first 500 most-common/recent Mozilla user agent on desktop device.
Can you help me?
This isn't supported by the current API, but it's a good feature suggestion.
I see your blog post User-Agents — A random user agent generation library that's always up to date but I couldn't find any information about the UA file description.
In this file, does the UAs are sorted based on the weight?
Yes, they are sorted based on weight. If you would like to parse the user-agents.json.gz file directly, then you can safely assume that they are sorted by decreasing weight. The weight is also included in each JSON entry.
What is my user agent tool is giving you popular User Agent list on global scale.
A related use case would be to get the 500 most recent UAs.
I assume the weight relates to the frequency the UAs are observed, rather than their age.