Sha256: dcb340641e2113a9df3ca4ad5356f11dcfa7c05260e589bbcd293ecf0b33e052
Contents?: true
Size: 845 Bytes
Versions: 2
Compression:
Stored size: 845 Bytes
Contents
// List following and followers from several accounts var users = ['ariyahidayat', 'detronizator', 'KDABQt', 'lfranchi', 'jonleighton']; function follow(user, callback) { var page = require('webpage').create(); page.open('http://mobile.twitter.com/' + user, function (status) { if (status === 'fail') { console.log(user + ': ?'); } else { var data = page.evaluate(function () { return document.querySelector('div.timeline-following').innerText; }); console.log(user + ': ' + data); } callback.apply(); }); } function process() { if (users.length > 0) { var user = users[0]; users.splice(0, 1); follow(user, process); } else { phantom.exit(); } } process();
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
phantomjs.rb-0.0.2 | vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/follow.js |
phantomjs.rb-0.0.1 | vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/follow.js |