Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from steem import Steem
- s = Steem(["https://api.steemit.com"])
- def get_voter(post_identifier):
- post_identifier = post_identifier.split("/")
- votes = s.get_active_votes(post_identifier[0],post_identifier[1])
- voter = []
- for i in votes:
- if (i["voter"] != post_identifier[0]):
- voter.append(i["voter"])
- return voter
- def get_newest_post(username):
- newest_post = s.get_discussions_by_blog({"limit":1,"tag":username})
- if(newest_post!=[]):
- return newest_post[0]["author"]+"/"+newest_post[0]["permlink"]
- else:
- return None
- username = "wil1liam"
- post_identifier = get_newest_post(username)
- print(get_voter(post_identifier))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement