Upvote bot in less than 10 lines of code

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@xeroc·
0.000 HBD
Upvote bot in less than 10 lines of code
Dear Steemians,

**Upvote bot** in less than 10 lines of code

```
from piston.steem import Steem
import os
import json
steem = Steem(wif=os.environ["WIF"])
authors = json.loads(os.environ["AUTHORS"])
for c in steem.stream_comments():
    if c["author"] in authors:
        print(c.upvote())
```

It reqquires that you put your WIF key and JSON list of AUTHORS into an
environmental variable:

```
export WIF="<wif-posting-key>" AUTHORS='["xeroc", "dantheman", "ned", "arhag"]'
```

### Note
This currently requries that you install the python-steem library as well as piston from the development branch.

Have fun!
👍 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,