Skip to content

Instantly share code, notes, and snippets.

@FGRibreau
Created June 28, 2014 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save FGRibreau/596be738763bfc7d84e5 to your computer and use it in GitHub Desktop.
Save FGRibreau/596be738763bfc7d84e5 to your computer and use it in GitHub Desktop.
How to automatically vote on VoicePolls -__- #ScriptKiddieLevel
/**
* How to automatically vote on VoicePolls -__- #ScriptKiddieLevel
*
* Guys, you should really check — at least — for IPs and — at least — put a rate-limit on API calls.
*
* Usage :
* $ npm install async request
* $ node vote.js
*/
var times = 10000; // how many times should the script vote
var questionId = 1127000; // question id
var vote = 0; // 0 to n
var async = require('async');
var req = require('request');
async.timesSeries(times, function(n, f){
req({
method: 'POST',
url: ['https://api.voicepolls.com/1/questions/', questionId, '/vote/', vote].join('')
}, function(http, err, body){
console.log(body);
f();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment