A great addition. Hive.vote was not working as my expectations were. I will definitely check this tool.
Btw I m also working on a node.js code from last 15 days almost, for autovoting n to detect spammy accounts. My Recent Post tells all details n in the comments below my post anyone can find the 400+ spam accounts i muted in last 10+ days.
Though, till yet, i m tired/sick of all the coding/logics/syntax/testing/logging but i really want to add something under this wonderful post.
In last 15 days, I ve followed 1500+ real worthy human content creators while also muted 400+ spammers.
If anyone interested to take advantage of my follow/mute list then u can use two approaches (both are keyless) given below:
1 Termux/Linux:
Type nano fetchlists.js n hit enter
Then copy paste these lines below:
// code starts here.............
const { Client } = require('@hiveio/dhive');
const fs = require('fs');
const readline = require('readline-sync');
const client = new Client(["https://api.hive.blog", "https://anyx.io"]);
/**
Countdown logic for startup
*/
function getTargetAccount() {
console.log("\n--- 🛡️ Lists Fetcher ---");
console.log("Waiting 8s... (Press Enter foror enter name below)");
// readline-sync timeout returns null if nothing is entered
const input = readline.question('', { timeout: 8000 });
const target = (input === null || input.trim() === '') ? 'glimpsytips.dex' : input.trim().replace('@', '');
console.log(🚀 Targeting: @${target});
return target;
}
/**
Fetch following/muted lists with real-time count display
*/
async function fetchList(account, type) {
let list = [];
let lastAccount = '';
let limit = 1000;
let running = true;
const label = type === 'blog' ? 'Following' : 'Muted';while (running) {
// condenser_api.get_following [account, startAccount, type, limit]
const result = await client.call('condenser_api', 'get_following', [account, lastAccount, type, limit]);if (result.length <= 1 && lastAccount !== '') break; if (result.length === 0) break; const batch = lastAccount === '' ? result : result.slice(1); batch.forEach(item => list.push(item.following)); // Update the line in-place so it looks clean in Termux process.stdout.write(`\r📡 Fetching ${label}: ${list.length} accounts found...`); if (result.length < limit) { running = false; } else { lastAccount = result[result.length - 1].following; }}
process.stdout.write(✅ Done!\n);
return list;
}
/**
File Management Logic
*/
function saveToFile(filename, data, account) {
let finalPath = filename;
const fileExists = fs.existsSync(filename);if (fileExists) {
console.log(\n⚠️ FILE EXISTS: ${filename});
console.log(1. Overwrite existing ${filename});
console.log(2. Create new file (${account}_${filename}));const choice = readline.question("Choice (1 or 2): "); if (choice === '2') { finalPath = `${account}_${filename}`; }}
try {
fs.writeFileSync(finalPath, data.join('\n'), 'utf8');
console.log(💾 Saved ${data.length} entries to: ${finalPath});
} catch (err) {
console.error(❌ Error writing file: ${err.message});
}
}
async function start() {
const target = getTargetAccount();
try {
const following = await fetchList(target, 'blog');
const muted = await fetchList(target, 'ignore');
console.log(""); // Spacer
saveToFile('following.txt', following, target);
saveToFile('muted.txt', muted, target);
console.log("\n✅ Operation Complete.");
} catch (err) {
console.error("\n❌ API Error:", err.message);
}
}
start();
// End of Code..................
Hit ctrl+x then press Enter twice n nano will exit saving the code .
Now simply type
node fetchlists.js
N hit enter
The code will wait 8 seconds for u to enter any other account if not willing to fetch follow/mute lists. N will save fetched lists in current working directory as files following.txt n muted.txt
I assume that everything is uptodate with nodejs pkg installed n dhive libs available in the current working directory.
2 Google colab lovers:
Step 1: Install Dependencies
Run this in the first cell of your Colab notebook to install the required Node.js libraries.
!npm install @hiveio/dhive
Step 2: The Code (Modified for Colab)
Paste this into the second cell. I have replaced the readline-sync logic with an environment variable approach so you can easily change the target account.
// Code starts here.......
%%writefile fetchlists.js
const { Client } = require('@hiveio/dhive');
const fs = require('fs');
const client = new Client(["https://api.hive.blog", "https://anyx.io"]);
// In Colab, we pull the account name from an environment variable set in Python
const TARGET_ACCOUNT = process.env.TARGET_USER || 'glimpsytips.dex';
async function fetchList(account, type) {
let list = [];
let lastAccount = '';
let limit = 1000;
let running = true;
const label = type === 'blog' ? 'Following' : 'Muted';
console.log(`📡 Starting fetch for ${label}...`);
while (running) {
try {
const result = await client.call('condenser_api', 'get_following', [account, lastAccount, type, limit]);
if (result.length <= 1 && lastAccount !== '') break;
if (result.length === 0) break;
const batch = lastAccount === '' ? result : result.slice(1);
batch.forEach(item => list.push(item.following));
// Colab terminal doesn't support \r (carriage return) well, so we use standard logging
console.log(`[Progress] ${label}: ${list.length} accounts found...`);
if (result.length < limit) {
running = false;
} else {
lastAccount = result[result.length - 1].following;
}
} catch (e) {
console.error(`❌ Batch error: ${e.message}`);
break;
}
}
return list;
}
function saveToColab(filename, data) {
try {
fs.writeFileSync(filename, data.join('\n'), 'utf8');
console.log(💾 File Saved: ${filename} (${data.length} entries));
} catch (err) {
console.error(❌ Error writing file: ${err.message});
}
}
async function start() {
console.log(🛡️ Lists Fetcher | Target: @${TARGET_ACCOUNT});
try {
const following = await fetchList(TARGET_ACCOUNT, 'blog');
const muted = await fetchList(TARGET_ACCOUNT, 'ignore');
saveToColab('following.txt', following);
saveToColab('muted.txt', muted);
console.log("\n✅ Operation Complete. Check the folder icon on the left.");
} catch (err) {
console.error("\n❌ API Error:", err.message);
}
}
start();
// Code ends here...............
Step 3: Run the Script
Run this in the third cell to execute the code. You can change target_user to any Hive name you want.
##code for third cell starts here..........
import os
##Set your target account here
os.environ['TARGET_USER'] = 'glimpsytips.dex'
##Execute the Node.js file
!node fetchlists.js
##Code ends here...............
The files (following.txt, muted.txt) will appear in the Files tab (folder icon on the left). Note that these files are deleted when the Colab session ends.
Hope my comment somehow added value to the post.
RE: PeakD AutoVote - Never Miss a Vote for your Favorite Projects and Authors