Steem Curation Bot

in #utopian-io7 years ago (edited)

Overview

  • What is the project about?

This script will up-vote posts from a set of tags. These tags can be set manually in the configuration file or they can be pulled from either hot, trending or created.

You must be familiar with NodeJS and JavaScript before attempting to use this script. You can follow my posts at https://steemit.com/steem/@money-dreamer/steem-javascript-development-links to learn more about development on this technology stack. At minimum, you will have to be able to edit the config file and run the script from a command prompt.

These following parameters can be set in the configuration file:

config.steem.type =  'created'; //created, hot or trending
config.steem.tags =  ['steem','steemit','utopian-io']; //tags. leave empty for all trending tags
config.steem.amount = 1; //percentage of vote for each vote
config.steem.delay = 5; //delay in seconds between each vote
config.steem.username = process.env.STEEM_USER || 'ENTER_USERNAME_HERE';
config.steem.password =  process.env.STEEM_PASSWORD || 'ENTER_PASSWORD_HERE';


  • Technology Stack

The project is built in NodeJS with JavaScript and npm. It uses the SteemJS package which is set in package.json. Set-up the development environment by installing NodeJS and npm. Change to the directory of the script in a terminal and execute npm install --save. Run the script by entering command node upvote_recent_from_trending_tags.js.

  • Roadmap

Make more parameters in config.js to select which posts get upvoted.
Add functionality to upvote comments also.

  • How to contribute?

Upvote, re-steem and comment on this post. Follow my Steem account. Follow, Star, watch, clone, fork, commit, push & pull this GitHub repository/profile.

Relevant Posts



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Absolutely think this would be a great bot to have. My only hesitation is by up-voting via bot you're account will run out of voting power and need to wait for it to regain. or is that just a myth?

That is true. If this bot is run once, it should only bring the voting power down by a few percent. Each vote is set at 1% by default. Make the number of votes smaller by limiting the tags in the config.js file.

That's awesome. Thanks.

It's much easier to understand javascript with your contributions. I would like to ask if you can confirm does this code work, because I can't find answer anywhere. I tried it several times, but it does not work for me. Maybe I've made something wrong. Thank you!

const json = JSON.stringify(['reblog', {
  account: username,
  author: 'author',
  permlink: 'permlink'
}]);

steem.broadcast.customJson(privPostingWif, [], [username], 'follow', json, (err, result) => {
  console.log(err, result);
});

Is this a re-steem? I was looking on how to accomplish that. I will try to get it working.

Yes, there are only few examples and variations of that code but I didn't succeed to put in work any. But it should be correct.
I would like to talk with you about it on discord on steemit chat? My username is same on both.

Thank you for the contribution. It has been approved.

I made 2 pull request to your repo to fix some issues.

  • problem with the package name
  • hard coded username in the script.

Then I've updated the config with my other steem account information, made the percentage 100%. Btw the variable name is confusing. config.steem.amount = 100 , you've re-used some code but you should rename this.

So maybe your formula needs some work because it would not let me vote. See error:

  payload: 
   { id: 12,
     error: 
      { code: 1,
        message: '10 assert_exception: Assert Exception\nabs_rshares > STEEMIT_VOTE_DUST_THRESHOLD || o.weight == 0: Voting weight is too small, please accumulate more voting power or steem power.\n    {}\n    th_a  steem_evaluator.cpp:1195 do_apply\n\n    {"o":{"voter":"cryptonewsly","author":"juecoree","permlink":"code-blocks-for-beginners-1-or-understanding-basic-c-programming-structure-and-function","weight":100}}\n    th_a  steem_evaluator.cpp:1504 do_apply\n\n    {"op":["vote",{"voter":"cryptonewsly","author":"juecoree","permlink":"code-blocks-for-beginners-1-or-understanding-basic-c-programming-structure-and-function","weight":100}]}\n    th_a  database.cpp:2893 _apply_transaction\n\n    {"trx":{"ref_block_num":9928,"ref_block_prefix":2468399217,"expiration":"2018-01-20T15:24:21","operations":[["vote",{"voter":"cryptonewsly","author":"juecoree","permlink":"code-blocks-for-beginners-1-or-understanding-basic-c-programming-structure-and-function","weight":100}]],"extensions":[],"signatures":["2031bb7ebddb167f5900f47f5264d3335db780bd2a28f65b5b9fde210f1607d65a430ea80fd74ba347a77b342c8250acda3a177a1a1f3c0ae2adde20fb44155f61"]}}\n    th_a  database.cpp:2897 _apply_transaction\n\n    {"trx":{"ref_block_num":9928,"ref_block_prefix":2468399217,"expiration":"2018-01-20T15:24:21","operations":[["vote",{"voter":"cryptonewsly","author":"juecoree","permlink":"code-blocks-for-beginners-1-or-understanding-basic-c-programming-structure-and-function","weight":100}]],"extensions":[],"signatures":["2031bb7ebddb167f5900f47f5264d3335db780bd2a28f65b5b9fde210f1607d65a430ea80fd74ba347a77b342c8250acda3a177a1a1f3c0ae2adde20fb44155f61"]}}\n    th_a  database.cpp:660 push_transaction\n\n    {"call.method":"call","call.params":["network_broadcast_api","broadcast_transaction_synchronous",[{"ref_block_num":9928,"ref_block_prefix":2468399217,"expiration":"2018-01-20T15:24:21","operations":[["vote",{"voter":"cryptonewsly","author":"juecoree","permlink":"code-blocks-for-beginners-1-or-understanding-basic-c-programming-structure-and-function","weight":100}]],"extensions":[],"signatures":["2031bb7ebddb167f5900f47f5264d3335db780bd2a28f65b5b9fde210f1607d65a430ea80fd74ba347a77b342c8250acda3a177a1a1f3c0ae2adde20fb44155f61"]}]]}\n    th_a  websocket_api.cpp:124 on_message',
        data: [Object] } } } undefined

Also, I would like to suggest you try cloning your own repo, then trying the instruction for yourself, then running the code. You would have discovered some of the issues here.

You can contact us on Discord.
[utopian-moderator]

I merged your pull requests. I'm assuming the STEEMIT_VOTE_DUST_THRESHOLD error happens with accounts that have smaller amounts of SP.

Hey @money-dreamer I am @utopian-io. I have just upvoted you!

Achievements

  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Hi, first of all sorry for my late reply. I tried to find a clear definition of what a curation bot is? And how it works?

Via Google I did not find an answer. This post is the most recent I came up. And I directly recognized your name as I already follow you. Can you help me out and give some sort explanation? Or a link to a post?

A curation bot would upvote posts based on some parameters. It is the bot owner that specifies which posts to upvote to try to maximize the earnings.

There are other reasons a bot owner would want to use a curation bot. Possibly, they want to upvote posts for certain causes or upvote followers posts to gain a larger audience.

I would read the white paper on Steem to get a good understanding of what curation is and learn about other important topics:

https://steem.io/SteemWhitePaper.pdf

Thanks for the question!

Thanks!

I started to read the white paper. But for now I stranded at page 13. As there is so much to learn and so many great posts, I really spend to much time on Steemit.

Do you by any chance know a very profitable curation bot? I just wonder what the maximum curation percentage could be?
I mean custom reward as percentage of your SP amount. Last week I had something like 0.025 reward shared by 15 SP multiply with 100% and I had something like 0.16%

This bot was merged into this repository:

https://github.com/AdamCox9/Steemit-Follow-Bot

The bot is named:

https://github.com/AdamCox9/Steemit-Follow-Bot/blob/master/upvote_recent_from_trending_tags.js

I will be updating it soon to further integrate it into this merged code base.

Amazing initiative!

I am now going to become your follower. Thank you for your works. I too dream of money.

This post is ok..thanks for your contribution in my post..Good lock@money-dreamer

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.029
BTC 66552.34
ETH 3451.80
USDT 1.00
SBD 2.65