Replies: 20 comments 2 replies
-
Beta Was this translation helpful? Give feedback.
-
Any news? I have spent a lot of time trying to find a solution. |
Beta Was this translation helpful? Give feedback.
-
|
There is quite similar discussion in RSSBridge repository. Let's join forces! @aledeg @math-GH @0x199x Please, take a look at curl-impersonate project. Any thoughts? |
Beta Was this translation helpful? Give feedback.
-
|
Another example of problem #4556 |
Beta Was this translation helpful? Give feedback.
-
|
@Alkarex |
Beta Was this translation helpful? Give feedback.
-
If anyone is motivated to develop an extension, that would be welcomed. I can support with additional extension hooks, should that be necessary. |
Beta Was this translation helpful? Give feedback.
-
|
Hi! I have a working solution that I have been using for a couple years and could be implemented into an extension. I use I run both FreshRSS and FlareSolver in separate docker containers. The biggest barrier between FlareSolverr and FreshRSS is that FlareSolverr needs a post request with some specific details. The response is also needs a bit of parsing. To bridge this capability gap, I wrote a little php code that that takes a feed url as a parameter and then makes a proper post request to FlareSolverr and then returns the HTML response. Here is the workflow:
<?php
//Returns request for website protected by Cloudflare
//Requires ghcr.io/flaresolverr/flaresolverr docker container
$feed = $_GET['feed'];
$session = $_GET['session'];
$ch = curl_init();
$headers = [
'Content-Type: application/json'
];
$postData = [
'cmd' => 'request.get',
'url' => $feed,
'session' => $session
];
//
curl_setopt($ch, CURLOPT_URL, "http://localhost:8191/v1"); //This is my flaresolverr address
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36');
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($postData));
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$array = json_decode(curl_exec($ch), true);
echo $array['solution']['response'];
curl_close($ch);
I have had incredible consistency by using this. Here is a description of the extension:
Hope this helps :) |
Beta Was this translation helpful? Give feedback.
-
|
Check out Prowlarr and how they implement the cloudflare bypass. |
Beta Was this translation helpful? Give feedback.
-
|
Looks good @ryancom16 👍🏻 |
Beta Was this translation helpful? Give feedback.
-
|
Is there a way to add this to the docker image? |
Beta Was this translation helpful? Give feedback.
-
|
@SMylk Most likely as a FreshRSS extension, and with flaresolverr added to docker-compose |
Beta Was this translation helpful? Give feedback.
-
|
I reckon there is no extension yet then :( |
Beta Was this translation helpful? Give feedback.
-
|
Contributions welcome ;-) |
Beta Was this translation helpful? Give feedback.
-
|
Solved my issue by sending feeds through feedburner, not ideal, but it works. |
Beta Was this translation helpful? Give feedback.
-
This is good, but i get "This does not appear to be a valid RSS or Atom feed. " for every feed I try, however it can load it and I see the content in the browser. |
Beta Was this translation helpful? Give feedback.
-
|
Hi all, I came across this thread and I was inspired by @ryancom16's solution to write a full plugin for FreshRSS which you can find here: I initially had the same problem as @SMylk - it turns out that the headless browser inside Flaresolverr injects style information to RSS feeds so I added some logic that strips this away and just produces a pure RSS feed using PHP's |
Beta Was this translation helpful? Give feedback.
-
|
@ravenscroftj Is there a way to make it work with the website url used as a feed url? I use web scraping as a type of feed source in FreshRSS, and passing the url through this plugin causes |
Beta Was this translation helpful? Give feedback.
-
|
@enchained I think that will only work if you enter the url of a website that returns a feed, usually ending in .rss. The plugin is looking for a specific format. So, I think what you are looking to do is create a custom RSS feed out of website that is protected by CF. For this, you can use RSS-Bridge and create your own bridge. Refer to the documentation, but this has worked extremely well for me and works extremely well with FreshRSS. What you would do is create a custom bridge for your website. Each "bridge" is coded to retrieve the web information, parse it, and then format it as an RSS feed. I have a FlareSolverr instance running in a docker. When my custom bridge queries a CF protected site, I send that request to my FlareSolverr and it returns the HTML that I can parse. Note that my above code that inspired the extension is now out of date. FlareSolverr has been updated since. In the bridge I request the website contents in this way FlareSolverr3.php However, I believe I could just call FlareSolverr directly from the bridge itself if I wanted to. After you have your working feed in you copy of RSS-Bridge, you can added it to FreshRSS |
Beta Was this translation helpful? Give feedback.
-
|
Related guide for server admins https://openrss.org/blog/using-cloudflare-on-your-website-could-be-blocking-rss-users |
Beta Was this translation helpful? Give feedback.
-
|
It might be an idea to add FreshRSS as an verfied Bot in the Cloudflare Bots Directory? (here paired with the search term 'rss')
See further Cloudflares reference documentation regarding Web Bot Auth. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
An increasingly large number of feeds are blocked by Cloudflare due to misconfiguations by web developers. Unfortunately, it's becoming more and more common and it's making great tools like FreshRSS less useful, at no fault of the software.
Describe the solution you’d like
I don't know exactly what it is I'm suggesting or how this should be approached, if it even can be. So consider this more of a potential feature discussion rather than a request. There IS a solution to this problem, but it comes in the form of a Python library. I wanted to open up a discussion on the topic to see if there's anything FreshRSS could do with this.
There is a python library called cloudscraper that works brilliantly for getting around Cloudflare restrictions. There was a node js library of the same name, but it is now defunct.
From the cloudscraper readme:
Are there any options available to implement something like this.. either natively or via extension?
Describe alternatives you’ve considered
.
Additional context
.
Beta Was this translation helpful? Give feedback.
All reactions