Closed ndragon798 closed 3 months ago
Worth noting @hay-kot has a very similar PR: https://github.com/mealie-recipes/mealie/pull/3457 It looks like it'd be more future-proof, though on the face of it he hasn't finished testing it.
I'm looking at adding a more robust UA rotation method but I wanted a simple fix for now. There quite a few api's that we could pull a list of current UAs automatically and just rotate through those so we don't get an 1 user-agent banned.
https://github.com/mealie-recipes/mealie/pull/3457 - Is tested. (failing CI is unrelated to PR)
I'm looking at adding a more robust UA rotation method but I wanted a simple fix for now. There quite a few api's that we could pull a list of current UAs automatically and just rotate through those so we don't get an 1 user-agent banned.
Is an interesting idea. If you implement this, I'd suggest letting it be user configurable either by a comma separated list via ENV variable or a JSON file or something and then using a factory pattern or something to pick one at random which one to use.
Closing the PR since the other one was merged.
What type of PR is this?
What this PR does / why we need it: Update user-agent to bypass block on thekitchn.com
Which issue(s) this PR fixes: #3524
Tested via spinning it up in docker-compose