create account

RE: Howto: Steemit Bot Tutorial For Newbies #1 - Votebot by sneak

View this thread on: hive.blogpeakd.comecency.com

Viewing a response to: @felixxx/howto-steemit-bot-tutorial-for-newbies-1-votebot

· @sneak · (edited)
$0.03
Change the following line:

`steem = Steem(wif="5yourpostingkeyhere")`

to

`steem = Steem(wif=os.environ['WIF_POSTING'])`

Then, before you run the script, in the terminal, set the following environment variable:

`export WIF_POSTING='5KDWWnSQiPtVhzCquaBWhbWS8UNoAkeNuuCm8uJJE6EiSqt514p'`

(or whatever your WIF is, the above example is a worthless random key)

then run the script as normal.  It will pick up the posting key from your `WIF_POSTING` environment variable.  Now you can save your code on GitHub or wherever else safely. :)
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorsneak
permlinkre-felixxx-howto-steemit-bot-tutorial-for-newbies-1-votebot-20161214t000219499z
categoryhowto
json_metadata{"tags":["howto"]}
created2016-12-14 00:00:42
last_update2016-12-14 00:01:24
depth1
children2
last_payout2017-01-14 05:45:51
cashout_time1969-12-31 23:59:59
total_payout_value0.025 HBD
curator_payout_value0.006 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length538
author_reputation28,694,344,106,492
root_title"Howto: Steemit Bot Tutorial For Newbies #1 - Votebot"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id1,997,761
net_rshares818,595,986,213
author_curate_reward""
vote details (32)
@felixxx ·
Thanks !

For the next episode I wanted to use a config file instead. :)
properties (22)
authorfelixxx
permlinkre-sneak-re-felixxx-howto-steemit-bot-tutorial-for-newbies-1-votebot-20161214t000227735z
categoryhowto
json_metadata{"tags":["howto"]}
created2016-12-14 00:02:27
last_update2016-12-14 00:02:27
depth2
children0
last_payout2017-01-14 05:45:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length72
author_reputation215,966,691,940,393
root_title"Howto: Steemit Bot Tutorial For Newbies #1 - Votebot"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id1,997,769
net_rshares0
@xeroc ·
$0.04
Actually, since the latest release of python-steem, the library also contains a wallet that can be managed through `piston`.
Just import your keys with
```
piston addkeys
```
and use
```python
from steem import Steem
```

Since wif keys are stored encrypted, you will be asked to provide the password when voting. If you want to unlock the wallet from script, you can use the `UNLOCK` environmental variable:
```
UNLOCK="wallet-passphrase" python3 bot.py
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorxeroc
permlinkre-sneak-re-felixxx-howto-steemit-bot-tutorial-for-newbies-1-votebot-20161214t070922101z
categoryhowto
json_metadata{"tags":["howto"]}
created2016-12-14 07:09:21
last_update2016-12-14 07:09:21
depth2
children0
last_payout2017-01-14 05:45:51
cashout_time1969-12-31 23:59:59
total_payout_value0.041 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length454
author_reputation118,819,064,085,695
root_title"Howto: Steemit Bot Tutorial For Newbies #1 - Votebot"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,000,271
net_rshares1,018,612,501,814
author_curate_reward""
vote details (29)