Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PatreonBridge] Add new bridge #1254

Merged
merged 2 commits into from
Sep 7, 2019
Merged

Conversation

Roliga
Copy link
Contributor

@Roliga Roliga commented Aug 9, 2019

Fixes #1024.

This bridge includes the information you'd see if you weren't logged in to Patreon, so only a short excerpt of the post content and blurred image previews, but it's the best we can do without authenticating as a user who has subscribed to the creators.

It also uses the undocumented API that the patreon.com page itself uses. See daemionfox/patreon-feed and splitbrain/patreon-rss for projects that do something similar. This does require some trickery to bypass some recently introduced Cloudflare protection though, so hopefully that keeps working.

Patreon changes post URLs when the post title is updated, so set a UID
based on the post ID instead.
@teromene teromene merged commit abb74f0 into RSS-Bridge:master Sep 7, 2019
@teromene
Copy link
Member

teromene commented Sep 7, 2019

Thanks for the great bridge !

infominer33 pushed a commit to web-work-tools/rss-bridge that referenced this pull request Apr 17, 2020
* [PatreonBridge] Add new bridge

* [PatreonBridge] Add UID to articles

Patreon changes post URLs when the post title is updated, so set a UID
based on the post ID instead.
@xthursdayx
Copy link

xthursdayx commented Sep 15, 2021

Now that PR #1343 which allows for private feeds is merged, do you have an idea for how to incorporate private Patreon feeds into your bridge. I tried messing around with it, but didn't get far. Thanks!

Checking out the scripts running on Patreon once I logged in and accessed a page I support, it seems like the two things that would be relevant to getting this working are the beginning of this script:

 <script>
      window.patreon = window.patreon || {};
      window.patreon.apiServer = "www.patreon.com/api";
      window.patreon.webServer = "www.patreon.com";
      window.patreon.userId = "XXXXXXXX";
      window.patreon.csrfSignature = "2XXXXXXXXXXXXXXXXXXXXXXXXX";
      window.patreon.requestUUID = "CCCCCC-CCCC-CCCC-CCC-CCCCCCCCC";
      window.patreon.fbPixelId = "XXXXXXXXX";

      window.patreon.theme = 'america';

      window.patreon.bootstrap = window.patreon.bootstrap || {};
      window.patreon.campaignFeatures = window.patreon.campaignFeatures || {};
      window.patreon.experiments = window.patreon.experiments || {};
      window.patreon.featureFlags = window.patreon.featureFlags || {};
      window.patreon.presets = window.patreon.presets || {};

And this script:

 <script type="text/javascript">
    (function(e,t){var n=e.amplitude||{_q:[]};var r=t.createElement("script");r.type="text/javascript";
  r.async=true;r.src="https://d24n15hnbwhuhn.cloudfront.net/libs/amplitude-2.10.0-min.gz.js";
  r.onload=function(){e.amplitude.runQueuedFunctions()};var i=t.getElementsByTagName("script")[0];
  i.parentNode.insertBefore(r,i);var s=function(){this._q=[];return this};function o(e){
  s.prototype[e]=function(){this._q.push([e].concat(Array.prototype.slice.call(arguments,0)));
  return this} }var a=["add","append","clearAll","prepend","set","setOnce","unset"];for(var c=0;c<a.length;c++){
  o(a[c])}n.Identify=s;var u=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties","identify","clearUserProperties"];
  function p(e){function t(t){e[t]=function(){e._q.push([t].concat(Array.prototype.slice.call(arguments,0)));
  } }for(var n=0;n<u.length;n++){t(u[n])} }p(n);e.amplitude=n})(window,document);

    var amk="XXXXXXXXXXXXXXXXXXXXXXXXX";
    var options = {
      includeUtm: true,
      includeReferrer: true,
      saveParamsReferrerOncePerSession: false,
    };
        var cid = '' + XXXXXXXX
        amplitude.init(amk, cid, options);

    /**
     * Set user properties here.
     * Nothing personally identifying though!!
     * (no: name, email, location etc... we're better than that)
     */
    var amplitudeIdentify = new amplitude.Identify()
    amplitudeIdentify.setOnce('initialLandingPage', window.location.toString())
    amplitude.identify(amplitudeIdentify)
  </script>

I'm not really sure how to use that information, but there it is.

@sabberworm
Copy link

FWIW, I recently reached out to Patreon support asking for private article feeds. This was their response:

Hi there,

Thank you so much for writing in with this idea. I can see how a feature like this would be helpful.

I shared your suggestion with our engineers, so we could keep this in mind moving forward. While I can't guarantee that this will result in any changes, we make sure we review each piece of feedback we receive.

If you have any other questions, I'll be here to help!
All the best,

William

I think if enough people write in with the same request, it may get more traction. IMHO we should always bug platforms to implement feeds first and only create bridges as a last resort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bridge request for Patreon
4 participants