Closed TwistedMexi closed 3 years ago
Yeah, I haven't found the way around Cloudflare's rules yet. cURL would be the next step. I started looking at using https://github.com/KyranRana/cloudflare-bypass to try and get through, but haven't figured out the workaround.
If you want to take a shot at it and open up a pull-request, I'm all for it.
It's definitely the user-agent missing for the initial issue, but I haven't figured out how to get CURL to follow the 301 redirect after. (haven't spent much time on it yet). I'll see what I can do.
Might be that the 3** needs to be captured and another cURL then sent out as a followup? Don't mind me, just brainstorming without actually thinking.
I've been implementing a Patreon feed in rss-bridge and I found that if you use cURL you can do some trickery to get around this protection. I had to set the Accept-Language
header to en-US
and make the cipher list I guess not look like cURL/look more like a web browser by removing the DHE-RSA-CHACHA20-POLY1305
cipher. For that you can do something like:
curl_setopt($curl_resource, CURLOPT_SSL_CIPHER_LIST, 'DEFAULT:!DHE-RSA-CHACHA20-POLY1305');
A non-standard user agent may also be necessary but I'm not certain of that.
See here for how I did it. That also has some links to other people who are dealing with this.
(Trying to implement this in my own project) I can't get this to work using stream contexts. I could rewrite this to use CURL but trying to avoid CloudFlare's bot detection is probably playing cat'n'mouse forever.
Users should petition to Patreon getting their shit together.
See also the discussion here: https://www.patreondevelopers.com/t/feature-suggestion-acquire-patreon-posts/462/12
Can we get this fixed?
I've released a new version (v.3) that covers everything and adds a bunch of new stuff. That's the good news. The bad news, it now requires a Patreon API Access Token, and you can only retrieve information from the account associated with that access token.
This needs to be replaced with curl and valid useragent headers I believe. Cloudflare is rejecting it as a bad request now.