Add an option to set a custom user agent to retrieve individual feeds#3494
Add an option to set a custom user agent to retrieve individual feeds#3494Alkarex merged 5 commits intoFreshRSS:masterfrom Jules-Bertholet:3493-custom-ua
Conversation
app/i18n/en/sub.php
Outdated
| 'ttl' => 'Do not automatically refresh more often than', | ||
| 'url' => 'Feed URL', | ||
| 'useragent' => 'Set the user agent for fetching this feed', | ||
| 'useragent_help' => 'Example: <kbd>FeedBurner</kbd>', |
There was a problem hiding this comment.
Please use another example, avoiding specific product names, but a more general browser, e.g.
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0)
|
Please add a line for your new string in |
| if ($cookie != '') { | ||
| $opts[CURLOPT_COOKIE] = $cookie; | ||
| } | ||
| if ($useragent != '') { |
There was a problem hiding this comment.
I know that the code around does not use it, but I think it should. We will fix it when working on it.
This allows retrieving the original RSS feed when websites use services like FeedBurner.
|
Works fine. But maybe this option should be made available from the Add feed page ( Furthermore, we should either only allow those options for admins, or make them use a user-specific cache, as this might otherwise randomly affect other users of the same FreshRSS instance. See #3367 (comment) This should be in another PR though, but must be done before the release of 1.18.0. |
|
Patch to avoid SimplePie cache pollution when changing cURL options: #3502 |
* SimplePie prevent cache polution #fix #3367 (comment) #fix #3494 (comment) * Fix bug * Minor improvement * Update cache filename in FreshRSS (1/2) * cacheFilename temp * New SimplePie get_cache_filename() * Fix typos * Update lib/SimplePie/SimplePie.php Typo * Include user-agent and timeout * fix array_merge * Declaration * force_feed was lost in a commit
|
@Jules-Bertholet I have added the user-agent (and proxy) option to the subscription page to add a new feed: Could you please give it a quick test? |
|
@Alkarex Works great! (Proxy not tested) |
|
Thanks for the quick test :-) |
|
Looks nice :-)
…On Tue, Mar 9, 2021 at 8:51 PM Alexandre Alapetite ***@***.***> wrote:
Merged #3494 <#3494> into master.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3494 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABRQBNYUHXY4HMUUIVGHGTTCZ34DANCNFSM4YQSW22Q>
.
|
|
@Jules-Bertholet Could you please add a line for you in https://github.com/FreshRSS/FreshRSS/blob/master/CREDITS.md ? |

This allows retrieving the original RSS feed when websites use services like FeedBurner.
Closes #3493
Changes proposed in this pull request:
How to test the feature manually:
https://www.themoneyillusion.com/feed/atomFeedBurnerhttps://www.themoneyillusion.com/feed/atom, and was not changed to the FeedBurner feed because of a 3XX redirect before you added the user-agentfeedproxy.google.comor similarPull request checklist:
Additional information can be found in the documentation.