twitter-scrape-account-stats
Version:
scrape public Twitter data w/out API access
39 lines (28 loc) • 927 B
JavaScript
// Generated by CoffeeScript 1.10.0
(function() {
var ArgumentParser, argparser, argv, getAccountStats, group, packageInfo;
getAccountStats = require('./').getAccountStats;
packageInfo = require('../package');
ArgumentParser = require('argparse').ArgumentParser;
argparser = new ArgumentParser({
version: packageInfo.version,
addHelp: true,
description: packageInfo.description
});
group = argparser.addMutuallyExclusiveGroup({
required: true
});
group.addArgument(['--id'], {
type: 'string',
help: 'The userId of the account to scrape.',
dest: 'userId'
});
group.addArgument(['--username', '-u'], {
type: 'string',
help: 'Username of the account to scrape. Within Twitter, this is called the "screen_name".'
});
argv = argparser.parseArgs();
getAccountStats(argv).then(function(res) {
return console.log(JSON.stringify(res));
});
}).call(this);