Skip to content

Commit

Permalink
getArticle: always get the latest content
Browse files Browse the repository at this point in the history
  • Loading branch information
macbre committed Jul 1, 2014
1 parent 2547cc9 commit 9d9037d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ module.exports = (function() {
this.options[key] = val;
},

getRand: function() {
return Math.random().toString().split('.').pop();
},

logIn: function(username, password, callback /* or just callback */) {
var self = this;

Expand Down Expand Up @@ -198,7 +202,8 @@ module.exports = (function() {
var params = {
action: 'query',
prop: 'revisions',
rvprop: 'content'
rvprop: 'content',
rand: this.getRand()
};

// both page ID or title can be provided
Expand Down

0 comments on commit 9d9037d

Please sign in to comment.