Turn public Facebook & Twitter timelines into RSS
Invocation:
node SCRIPT URL OUTPUTFILE
Examples:
$ node fb2rss/tw2rss.js https://twitter.com/ndurner ndurner.rss
$ node fb2rss/fb2rss.js https://de-de.facebook.com/diezeit diezeit.rss
- Running this frequently (e.g. every hour) will entail an IP address ban
- only the first batch of content is saved currently (~ 20 posts)
- Running on AWS
-
EC2 t2.nano seems sufficient
-
EC2 instance starts can be scheduled cheaply through AWS Lambda
Node.js script:
-
var aws = require('aws-sdk'); var https = require('https'); var url = require('url'); exports.handler = function(event, context) { var ec2 = new aws.EC2({ region: '✍ instance region here ✍' }); var params = { InstanceIds: [ '✍ instance-id-here ✍', ], AdditionalInfo: '', DryRun: false }; ec2.startInstances(params, function(err, data) { if (err) console.log(err, err.stack); else console.log(data); }); }
IAM role:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents" ], "Resource": "arn:aws:logs:*:*:*" }, { "Effect": "Allow", "Action": [ "ec2:StartInstances", "ec2:StopInstances" ], "Resource": "*" } ] }