Closed Lucki closed 8 months ago
Hmm, to be honest, I now think that it is probably a better idea to just use a custom user agent as you suggested in the first place. That would be a simpler change and would keep the same download logic for all adapters.
If it causes issues down the road we will probably have to find a proper solution that works for all adapters.
Sure! Is RandomWallpaperGnome3/3.0
fine as the string? Want me to change this PR or do it yourself?
Thanks!
While testing my various configured sources for the initial genericjson improvements again, I stumbled upon a source which doesn't work for the default
Mozilla/5.0
User-Agent. The site is protected by Cloudflare and I assume that the User-AgentMozilla/5.0
lets Cloudflare believe that JavaScript should be available and tries to test it with an anti bot challenge. Using a different string as the User-Agent goes around this test - I only tested this withRandomWallpaperGnome3/3.0
.As a first thought I added a simple input to the configuration which lets the user override the User-Agent if necessary and falls back to the default if not set.
Reference: https://github.com/ifl0w/RandomWallpaperGnome3/pull/174#discussion_r1355676741