Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get the first 500 most-common user agents #3

Open
LeMoussel opened this issue Feb 20, 2019 · 5 comments
Open

How to get the first 500 most-common user agents #3

LeMoussel opened this issue Feb 20, 2019 · 5 comments
Assignees

Comments

@LeMoussel
Copy link

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?

@sangaline sangaline changed the title Hox to get the first 500 most-common user agents How to get the first 500 most-common user agents Feb 21, 2019
@sangaline
Copy link
Member

This isn't supported by the current API, but it's a good feature suggestion.

@sangaline sangaline self-assigned this Feb 21, 2019
@LeMoussel
Copy link
Author

LeMoussel commented Feb 22, 2019

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?

@sangaline
Copy link
Member

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.

@web-apply
Copy link

web-apply commented Mar 7, 2020

What is my user agent tool is giving you popular User Agent list on global scale.

@lonix1
Copy link

lonix1 commented Mar 15, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants