|
|
@ -1,14 +1,18 @@ |
|
|
|
'use strict' |
|
|
|
const requestsync = require('sync-request'), |
|
|
|
url = process.argv[2] || 'https://user:pass@social.hatthieves.es' |
|
|
|
user = process.argv[2] || 'user', |
|
|
|
pass = process.argv[3] || 'pass', |
|
|
|
site = process.argv[4] || 'https://social.hatthieves.es', |
|
|
|
url = site.split('://')[0] + '://' + user + ':' + pass + '@' + site.split('://')[1] |
|
|
|
|
|
|
|
try { |
|
|
|
let actors, |
|
|
|
followed = [], |
|
|
|
count = 100 |
|
|
|
count = 100, |
|
|
|
account = JSON.parse(requestsync('GET', url + '/api/v1/accounts/' + user).getBody()).id |
|
|
|
do { |
|
|
|
let id = actors && actors.length > 0 ? actors[actors.length - 1].id : '', |
|
|
|
body = requestsync('GET', url + '/api/v1/accounts/9lM7CeFGQNLWp38fgW/following?max_id=' + id + '&limit=' + count) |
|
|
|
body = requestsync('GET', url + '/api/v1/accounts/' + account + '/following?max_id=' + id + '&limit=' + count) |
|
|
|
try { |
|
|
|
actors = JSON.parse(body.getBody()) |
|
|
|
if (actors && actors.length > 0) { |
|
|
|