Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Update UserAgent.php #511

Merged
merged 2 commits into from
May 20, 2015
Merged

Update UserAgent.php #511

merged 2 commits into from
May 20, 2015

Conversation

ajbdev
Copy link
Contributor

@ajbdev ajbdev commented Jan 25, 2015

Updating random user agent strings to appear more modern

I based my changes off a recent log file on a relatively active website I help maintain

ajbdev and others added 2 commits January 25, 2015 01:54
Updating random user agent strings to appear more modern
@ajbdev
Copy link
Contributor Author

ajbdev commented Jan 25, 2015

I am aware that the contributers file reads: "Avoid changing existing sets of data. Some developers use Faker with seeding for unit tests ; changing the data makes their tests fail."

However, the UserAgent provider is a bit unique, as realistic fake data evolves much quicker than the other providers. I'm running into a use case where I am using faker to generate a fake user agent for a scraper. Given the current state of Faker it will create a pattern of outdated browsers, which is undesirable for a scraping tool.

@fzaninotto
Copy link
Owner

Does that mean we'll have to update this provider each time a browser vendor bumps their version? I don't think it makes sense.

I agree with you that the current useragents are outdated, but Faker doesn't mean to be exhaustive, it means to be random.

I wonder what other users feel about this?

@ajbdev
Copy link
Contributor Author

ajbdev commented Jan 26, 2015

Yeah, I can certainly understand that point of view - there's no way I would want to maintain this so frequently. Really I just did the PR to cover my specific use case, if it's a no-go I understand I'll just use my fork.

If the data was just a year or two old it would have been fine for my use case, but it was pretty far outdated. If it's ever been considered to update it, here's an opportunity with most of the work already done.

I'll be in the same spot again in 2-3 years, but I'm comfortable saying that I'd maintain a frequency at that rate :)

fzaninotto added a commit that referenced this pull request May 20, 2015
@fzaninotto fzaninotto merged commit 2dffbe1 into fzaninotto:master May 20, 2015
@fzaninotto
Copy link
Owner

Thanks!

@bomjastik
Copy link

Hi @ajbdev.

Just decided to use this functionality for a random user-agent generation too.

I can't find a more specific solution/api.

I'll be in the same spot again in 2-3 years.

The time is definitely have come :)

Will, you able to update this again?

Regards!

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

Successfully merging this pull request may close these issues.

3 participants